Report this

What is the reason for this report?

Virtual host / domain only works without www. prefix

Posted on March 4, 2016

Would like to know where i’m making a mistake with the 2 sites i have that i can only access like : site.com instead of www.site.com

I have 3 domains / virtual hosts setup and 1 of them is working perfectly. However the 2 other are setup identical but have this problem.

I did also sudo service apache2 reload to take the new settings but nothing has happened.

Thank you very much for your help.



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.

This comment has been deleted

Hi!

Based on the error message you’re receiving (NAME_NOT_RESOLVED), there is an issue with DNS records for this domain that is preventing it from resolving outside of the ‘www’ subdomain. To correct this, you will need to update the DNS records for this domain to ensure that the root domain resolves to the same IP address as the ‘www’ subdomain (with an A record of its own), or else that it contains a CNAME record pointing to the ‘www’ subdomain, which will result in it resolving to the same IP address as the subdomain by default.

Hope this helps!

DigitalOcean Support

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.