Domain name not working without "www."

January 29, 2017 2.5k views
Nginx Ubuntu 16.04 DNS

I have added domains to control panel like :
However when I open my website : or
just a file get downloaded to my system.

Please let me know if I’m missing something.

3 Answers


You’ll need to properly setup your NGINX server blocks for each website and make sure PHP is being handled in each one of the, else you may run in to issues such as the one your describing.

To get a more detailed look, I’d need to take a look at your website server block, which can be found within /etc/nginx/sites-available.

some more info : I have moved my wordpress blog from Apache to NGINX. , ubuntu 16.04 LEMP stack

Now not working even with www.

@jtittle Thank you !!..Indeed there were issues with PHP handing in server blocks..also, Index.php was missing in server block..Thanks for the help !

Have another answer? Share your knowledge.