All docs
Helpful Info
WWW vs Apex Redirect Setup
Picking a canonical domain form (with or without www.) and configuring the 301 redirect at Cloudflare or your registrar. Niche but trips up every operator.
A small but recurring issue: some customers type your domain with www. in front (www.yourdomain.co.uk), others type just the apex (yourdomain.co.uk). You want both to land on the same site: picking one canonical form and redirecting the other is the standard approach.
Pick a canonical form
Modern convention is apex without www (yourdomain.co.uk). Shorter, cleaner. Most operators we work with default to this; old-school .com sites often use www.. Either is fine; what matters is consistency.
If you bought through Cloudflare Registrar
Open the Cloudflare dashboard → your domain → Rules → Page Rules (or the newer Bulk Redirect / Single Redirect section). Add one rule:
- If URL matches
www.yourdomain.co.uk/* - Then 301 redirect to
https://yourdomain.co.uk/$1(status: 301 Moved Permanently).
Save. Hits to www now permanently redirect to the apex. SEO equity transfers (301s pass PageRank). Customers see the cleaner URL.
If you bought through another registrar
Two paths:
- Move DNS to Cloudflare, which means changing your nameservers to Cloudflare’s. Same registrar, just DNS is now at Cloudflare. Then use the page-rule approach above. We recommend this anyway, since Cloudflare’s DNS UI is the best in the business and you get free SSL + DDoS protection.
- Use your registrar’s redirect feature(most, including Namecheap and GoDaddy, offer URL forwarding from www to apex built-in, usually labelled “URL Forwarding” or “Domain Forwarding”) and set it to 301-redirect
www.yourdomain.co.uktohttps://yourdomain.co.uk.
Verifying it works
- Open a private/incognito window.
- Type
www.yourdomain.co.ukand hit return. - The URL bar should snap to
yourdomain.co.uk(no www) and your site should load. - Run
curl -I https://www.yourdomain.co.ukin a terminal. You should seeHTTP/2 301with alocation: https://yourdomain.co.uk/header.
Why this matters
- SEO duplicate content: without a redirect, Google can index both www and apex versions as separate URLs. Splits ranking equity and dilutes your search presence.
- Customer trust takes a hit when you send a marketing email link to
yourdomain.co.ukbut havewww.yourdomain.co.ukin your footer, creating a subtle “is this a real company?” signal. - Analytics fragmentationis real too; without the redirect, GA4 and your CAPI events split across two hostnames. Reports show 60% of your traffic on the “wrong” version.
Related: Connect Your Custom Domain · SEO Defaults.
