Root and www configuration
Choose one canonical hostname and make sure every public hostname follows the same crawler-rendering path.
On this page
Treat these as separate hostnames
example.com and www.example.com are different hostnames. A rendering configuration that works on one does not automatically work on the other.
Choose one as the canonical public address. Then make the other hostname permanently redirect to it while preserving the path and query string where appropriate.
A reliable sequence
- Decide whether the root or www hostname is canonical.
- Configure the canonical hostname to reach the intended hosting or crawler-rendering path.
- Add a permanent redirect from the alternate hostname to the canonical hostname.
- Set a matching canonical URL in the page metadata.
- Update sitemap URLs and internal links to use only the canonical hostname.
Test both hostnames
For each hostname, test the home page and an important deep link. Check normal requests and crawler-style requests separately. You want one final HTTPS URL, one canonical tag, and one consistent crawler response.
If www works but the root does not, inspect the DNS and redirect configuration for the root domain specifically. If the root works but www does not, inspect the www record and forwarding rule. Do not assume that a redirect in a browser proves the crawler route is also correct.
Avoid redirect chains. One permanent redirect from the alternate hostname to the canonical hostname is easier for users, crawlers, and operations to reason about.
Instructions for your connected site
Open account setup for domain-specific values, diagnostics and copy-ready configuration. These stay private to your workspace.