NodeJS, Nginx, domain name not resolving without www.

Posted September 21, 2019 1.6k views

Hi guys,

So I have a domain name registered as I’ve been working with this domain for a month now let’s say, and today when I ran my droplet I could not access the server through this domain. However, if I try with I can access the server, but I can’t figure out why it won’t work with the A record (

I have Nginx installed and configured and I am serving a MERN app on the server. I’ve also been running sudo nginx -t, and all the nginx files seem to be in order The Nginx server-block for is as follows:

server {
    listen 80;
    listen [::]:80;
    location {
        proxy_pass http://localhost:3000;

I’ve also made the soft link between this server block and the sites-enabled directory.

Any help would be gladly appreciated.

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.

Submit an Answer
4 answers

Hi @ivanssardelic,

I see the domain is resolving now, can you please confirm what was the issue? Was it a root Cname record or was it something else?

Kind regards,

Hey @KFerdinandov,

Yeah, it is working now. I was trying yesterday and it wasn’t working and after your answer I checked and it worked. I didn’t change anything. I was working with droplet snapshots, and perhaps it took more time (much more) to revert to the earlier state.

Still, it shouldn’t be breaking out of nothing. Hopefully, it won’t happen again.

Thanks for the reply, and I’ll post here again if it happens again.



Hey @KFerdinandov

Again is not resolving, while is resolving. Have no clue why this is happening.



Turns out it’s a local issue with Chrome. For some reason, Chrome will not resolve on my machine.

Thanks for your time and effort @KFerdinandov!

Cheers mate!