Question

Subdomain pointing to droplet doesn't work. Direct IP (same as what's in DNS A Name) does.

I have a droplet that I’m trying to point a subdomain to and its not responding properly. I keep getting a “Connection Refused”. I have the A name set on my main hosting DNS as such:

NAME TTL CLASS TYPE RECORD subdomain.mysite.com. 1200 IN A 1.2.3.4

Accessing the IP address directly works as expected. But with the subdomain, nothing. I can’t seem to find anything about what to do.


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.

Hello,

As a side note to what has already been mentioned, keep in mind that once you change your DNS it could take up to a few hours for the DNS cache to clear over the Globe before you could see the new records.

Best,

Bobby

Hui @Erik,

First thing’s first, what WebService are you using, is it Apache or Nginx?

Secondly, have you configured your subdomain in Apache/Nginx’s? If not, that might be the reason why you are not being able to load it.

Depending on what you are using, you can follow this article to help you out :

Nginx

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04#step-5-setting-up-server-blocks-recommended

Apache

https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-20-04#step-5-setting-up-virtual-hosts-recommended