Root → www: the 301 redirect
You want one official address. To you, pangaea.id and www.pangaea.id are the same site — but
to a search engine they're two different sites, and any SEO credit (links, rankings) gets split
between them. So we pick one canonicalⓘ address and make the other permanently redirect to it.
For pangaea.id the canonical is www.pangaea.id — it's what the sitemapⓘ, the hreflang tags and
every <link rel="canonical"> point at. The bare pangaea.id sends visitors there with a 301
("moved permanently")ⓘ.
The steps
- Add both custom domains in the Pages project:
www.pangaea.id(the real one) andpangaea.id. - Create the Redirect Rule — Cloudflare → Rules → Redirect Rules → Create:
- When incoming host equals
pangaea.id - Then Static redirect →
https://www.pangaea.id+ path, status 301, with "preserve query string" on.
- When incoming host equals
That's it. The bare domain now 301s to www, paths and query strings intact.
Where this fits
This is the finishing touch on go-live, after the domain is on Cloudflare (Part 1) and the site ships via Pages (Part 2). The plain-English diary note is One address, not two →.
Sources