Report this

What is the reason for this report?

NodeJS, Nginx, domain name not resolving without www.

Posted on September 21, 2019

Hi guys,

So I have a domain name registered as luckynote.io. 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 www.luckynote.io I can access the server, but I can’t figure out why it won’t work with the A record (luckynote.io).

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 luckynote.io is as follows:

server {
    listen 80;
    listen [::]:80;
    server_name luckynote.io www.luckynote.io;
    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.



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!

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.

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

Thanks for your time and effort @KFerdinandov!

Cheers mate!

Hi @ivanssardelic,

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

Kind regards, Kalin

Hey @KFerdinandov

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

Cheers,

Ivan

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.