WWW works but root domain does not
www.example.com and example.com are different hostnames. They need DNS and hosting rules that agree with each other.
Checklist
- Run DNS Lookup for root and www separately.
- Confirm both names point to the expected host.
- Check HTTP headers for redirect loops.
- Make sure HTTPS certificate covers both names.
- Pick one canonical version and redirect the other cleanly.
A common clean setup is root domain and www both resolving correctly, with one redirecting to the preferred canonical URL.
For SEO and usability, avoid letting root and www behave like unrelated sites. Search engines should see one preferred version through a clear redirect and canonical URL. Users should be able to type either version and reach the same working site. After fixing DNS, test HTTPS and redirects for both hostnames.
FAQ
Is www required?
No. You can use root, www, or both. The important part is consistent DNS and redirects.
Can root be a CNAME?
Some providers support ALIAS or flattened CNAME behavior at root, but standard DNS has limitations.
Why does HTTPS fail only on root?
The certificate or virtual host may not include the root domain.