My website not work when there is www at the beginning od website's address

February 19, 2015 2.6k views

Hi. I finally moved my website, but I have problem. When I type example.com (not my actual website address) in my browser, the site works like a charm. But when I type www.example.com, then I have this error: "Server not found. Firefox can't find the server at www.example.com".

I have proper DNS addresses set in my domain register (ovh.com) and added to DO's DNS section. I'm using Ubuntu 14.04 x64 with Sentora panel. Domain added via Sentora panel and files uploaded to domain's public_html folder created by Sentora. I've checked Sentora virtual host file (httpd-vhosts.conf) and my domain has proper addresses:

ServerName example.com
ServerAlias  www.example.com

Can anyone tell me what should I do, to make it work?

2 Answers

You need to configure DNS to resolve www. A CNAME might do it.

  • rascul, thank you very much. It worked. The solution was so simple. I've been fighting this for 2 days :)

  • I have two domains I have switched over to digital ocean, for one this fix worked perfectly. for the other I am still waiting. Should this be an instantaneous switch?

Have another answer? Share your knowledge.