No-www OK, but www ERR_NAME_NOT_RESOLVED!


#1

Hello,

I just created my web-server and installed website with easyengine and all works fine !

But, I’ve a little problem, my website is accessible with the url example.com, but www.example.com is not available at all ! I tried many things, nginx configuration, searched many ee commands but nothing seen to be working…

My server conf @ /etc/nginx/sites-available/example.com

server {


    server_name example.com www.example.com;

    access_log /var/log/nginx/example.com.access.log rt_cache; 
    error_log /var/log/nginx/example.com.error.log;


    root /var/www/example.com/htdocs;
    
    

    index index.php index.html index.htm;


    include common/php.conf;      
    
    include common/locations.conf;
    include /var/www/example.com/conf/nginx/*.conf;
}

I’ll use the non-www for now, but a working www is better, for human access and SEO.

Thank you all and sorry for my bad english :confused:


#2

Name not resolved is an issue with your DNS, not with the webserver.

How did you configure your nameservers? Didn’t you forget to add an entry for www in them?


#3

The DNS is the registrar DNS, I’ve just added an entry A with my server’s IP in parameter.


#4

You also must add an A entry for www pointing to your server’s IP.


#5

Thank you, I just tried and it works perfectly !


#6