DNS Troubleshooting

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.

Common causes

Missing root recordThe root domain has no A or AAAA record.Add the correct apex DNS record.
Only www configuredHosting provider knows www but not root.Add both domains to hosting.
Bad redirectRoot redirects incorrectly or loops.Check HTTP headers.
CNAME limitationSome DNS providers restrict CNAME at root.Use ALIAS/ANAME or A records if supported.

Checklist

  1. Run DNS Lookup for root and www separately.
  2. Confirm both names point to the expected host.
  3. Check HTTP headers for redirect loops.
  4. Make sure HTTPS certificate covers both names.
  5. 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.