Short answer
One of the two versions has no DNS record, or no redirect between them. Make sure both
yourdomain.com and www.yourdomain.com resolve, then redirect one to the other so there is a single canonical address.Learn more
- Site works with www but not without (or the reverse)Fix a domain that only loads with or without www: the missing DNS record, SSL coverage and the redirect to your preferred version.
- www or no www? Choosing and enforcing one versionWhether to use www.yourdomain.co.uk or yourdomain.co.uk, why you should pick one, and how to redirect the other to it.
- Redirects with .htaccess: copy-ready examplesWorking .htaccess redirect rules for single pages, whole folders, domain changes, HTTPS and www — with notes on 301 vs 302 and avoiding loops.