Report this

What is the reason for this report?

Why Is My WWW Domain Not Working While the Main Domain Works Fine?

Posted on May 9, 2026

Hello,

I’m facing an issue with my website domain setup and need help troubleshooting it.

My main domain www is not working or loading properly.

However, my other domain, withou www , is working perfectly without any issues.

Both are related to the same business, and I want www and non-www to work correctly as well.

Could you please help me check:

  1. DNS configuration issues

  2. Domain pointing or nameserver problems

  3. SSL certificate issues

  4. Hosting or server configuration problems

  5. Redirect setup between both domains

I would like to understand why non-www is working, but www is not.

Please advise on how to fix this issue.

Thank you.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

This is almost always a missing DNS record. If your main domain works but www does not, you likely have an A record for the root domain but no CNAME or A record for www.

Check your DNS settings in DigitalOcean under Networking > Domains and make sure you have something like this:

A     @       your-server-ip
CNAME www     @

Or alternatively:

A     @       your-server-ip
A     www     your-server-ip

If the DNS records look correct, the next thing to check is your web server config. Nginx and Apache need to explicitly list both yourdomain.com and www.yourdomain.com as server names, otherwise requests to www will not be handled correctly.

For Nginx:

server_name yourdomain.com www.yourdomain.com;

For SSL, if you are using Certbot make sure the certificate covers both versions:

sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

Start with the DNS records, that is the most likely cause. You can verify what is actually resolving using:

dig www.yourdomain.com
dig yourdomain.com

If one returns an IP and the other does not, that confirms it is a DNS issue.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.