NodeJS, Nginx, domain name not resolving without www.

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.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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!

Hey @KFerdinandov

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



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.