Redirect a root domain to www
Use the supported apex-domain redirect while serving your website on its matching www hostname.
Content reviewed against platform source: . Available features and permissions can differ by account; this is not a live-service status report.
Open the portal to get startedBefore you start
Access: Site owner with custom-domain entitlement and DNS access
- Understand that example.com is an apex and www.example.com is a subdomain.
- Have permission to edit DNS for the domain.
Steps
Connect www to this site
Use the custom-subdomain guide to bind www.example.com to the intended site. Complete the CNAME, ownership, TLS, and routing checks for www before relying on the apex redirect.
Add the root hostname
In Domains, add example.com. The destination is the matching www hostname automatically; this is not a configurable redirect to an arbitrary website.
Set the approved root records
Copy the portal-provided apex A target and, if offered, AAAA target. At your DNS provider, use @ or its root-domain notation. You may configure either address family or both; every configured address must be an approved redirect endpoint.
Verify and test the redirect
Select Check status and confirm DNS validated. Test a real page and query on the apex over HTTPS. It should redirect to the matching www hostname while preserving the path and query, where the published site is served.
Verify the result
The root domain redirects to the matching www site, and that site loads correctly over HTTPS.
Troubleshooting
- The redirect destination is unavailable.
- Confirm that the matching www hostname is bound to this same site and has completed ownership, TLS, and routing verification.
- The apex does not validate.
- Compare every apex A and AAAA record with the current approved targets shown in Domains. Remove or correct conflicting website records only after reviewing their purpose.