Why am I getting 'This site can’t be reached ...' on Nginx Server Block?

October 2, 2019 240 views
Nginx

Hello All,

I have setup a LEMP One-Click Droplet on Ubuntu 18.04, and then went to the next recommended step of creating/setting up Nginx Server Blocks (https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04)

I tried this the other night fully manually, and was running into the same issue, so I opted to go the One-Click route this time hoping to resolve any issues.

Unfortunately, when trying to access my domain name (which I have pointed to my Droplet’s IP address) I am getting a page which reads…

‘This site can’t be reached 'example’.rip’s server IP address could not be found.
Search Google for very bad things rip
ERRNAMENOT_RESOLVED’

I can’t for the life of me figure out what is causing this. My config file’s server_name for this site is pointing to 'example.rip’ and www.'example’.rip. Is the issue that my website is using a ’.rip’ domain name? I wasn’t able to save my config file as 'example.rip’ because it then turns that file into a .RIP file – so I opted to just save it as 'example’ but from what I can see from the DO default file it saved in there I shouldn’t need to use the full domain name for the config file as long as the settings inside are correct?

Let me know what I need to provide to help resolve this issue.

1 comment
  • Looks like I left my domain’s name in the body of my question accidentally, and can’t seem to edit it or delete and resubmit. Oh well, cat’s out of the bag now.

1 Answer

Hello,

You need to keep the full domain name in your server_name list. Having only the first part of the domain without the domain extension would not work.

Have you tried adding http:// in your browser before your domain to see if that would work?

Can you share your Nginx config here so that I could try and advise you further?

Regards,
Bobby

  • Hey Bobby,

    Thanks for the timely reply. Not sure 100% what happened (think it was my browser caching the broken version,) but I was able to access my domain from a different computer today. Upon returning home I tried to access from the same computer I was struggling to access with and it all seems to be working well.

    Thanks again though.

    I should note/clarify – my full domain name is in the server_name list, I was saying that I saved the config file itself with out the .rip extension (the guide shows ‘example.com’ I basically did 'example’) to avoid having the file become a .RIP file.

Have another answer? Share your knowledge.