Question

Can't access website by domain name, but can by IP

I submitted this question to support about a month ago, but as I haven’t received a response yet I figured I’d ask the community:

I have a droplet setup with an IP of 134.209.63.71. On this droplet, I have setup a website (I setup ssh authentication and can use SFTP to transfer my website to the server, I also setup NGINX and a ufw firewall per DigitalOcean instructions). I also have the domain “kevinthomas.dev” registered through Google Domains. In Google Domains, I’m using Google’s name servers and have setup a custom resource “A” record pointing the kevinthomas.dev domain to the IP of 134.209.63.71. However, when I try and enter “kevinthomas.dev” in my browser, it will not connect. I can access the website by typing in the IP directly, but can’t access it by the domain name.

I have already contacted Google Domains about this and they told me that, from their end, everyone looks setup correctly, and that I should wait 48 hours for the DNS to propagate. I’ve waited over 3 days now, and it’s still not working, and when I contacted them again they told me that, once again, everything looks fine on their end, so I should contact the place that is hosting my server. I’m not sure what steps to take at this point to get my domain working.

Thanks in advance for any help!

Show comments

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.

Mandi Fuller
DigitalOcean Employee
DigitalOcean Employee badge
May 28, 2019
Accepted Answer

Hey there!

First, I just want to apologize, as you didn’t seem to receive our reply to your ticket. One of my colleagues was able to address your ticket on April 29, but it doesn’t look like that made it to you!

I can see that your domain is trying to connect through port 443 (https://) which seems to be blocked:

$ telnet 134.209.63.71 443 Trying 134.209.63.71… telnet: connect to address 134.209.63.71: Operation timed out telnet: Unable to connect to remote host

I can also see that your domain loads fine with http:// and can be verified using the below curl result:

$ curl -IL kevinthomas.dev HTTP/1.1 200 OK

Server: nginx/1.10.3 (Ubuntu)

Date: Mon, 29 Apr 2019 06:27:19 GMT

Content-Type: text/html

Content-Length: 2349

Last-Modified: Sun, 28 Apr 2019 00:51:20 GMT

Connection: keep-alive

ETag: “5cc4f908-92d”

Accept-Ranges: bytes

That being the case, you’ll want to check a few things.

You can list the services that are running on your Droplet with the following command: sudo lsof -iTCP -sTCP:LISTEN -P

Do you see Nginx running on port 443 on the list? If yes, the most likely issue is that your firewall is impacting connections. Please ensure that Port 443 is allowed through any firewalls you have running on the Droplet.

If you do not see it there, the most likely issue is a wrongly configured server block. You will need to check your Nginx configuration and ensure that you have a VirtualHost set up for your domain on Port 443. Here’s some further documentation that will help: http://nginx.org/en/docs/http/configuring_https_servers.html

Hope this helps!

First try sudo service apache2 restart works for me

Wow, just spent a half day tracking down this problem. This problem is Chrome & Firefox now force .dev (and .foo) domains to HTTPS via preloaded HSTS. To fix this you an either serve via HTTPS or disable network.stricttransportsecurity.preloadlist in about:config in Firefox. You can edit chrome://net-internals/#hsts in Chrome but it does not allow users to delete preloaded HSTS settings!! More links below:

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more