Pointing subdomain to another droplet

June 16, 2017 1.8k views
Nginx CentOS

I have multiple subdomains (testA.example.com, testB.example.com, testC.example.com) in one droplet (IP1). I would like to point a new subdomain (testD.example.com) to a new droplet. I have created an A and CNAME pointing to the new droplet (IP2). When I go to the IP2 on browser, everything works fine, when I ping the testD.example.com, I get the IP2 as expected. However, when I go to testD.example.com, “this site can’t be reached”

Here is the domain name settings:

CNAME www.testD.example.com testD.example.com.
A testD.example.com IP2
CNAME www.example.com example.com.
A example.com IP1
CNAME *.example.com example.com.

Notes: the other subdmonains (testA.example.com, testB.example.com, testC.example.com) are defined in the NGINX configs in IP2. and they are all redirected to HTTPS (I am using Let'sencrypt).

What am I doing wrong?

1 Answer

Hi @makoamena

My guess would be that it’s just browser cache, which is playing a trick. Try restarting your browser - that clears everything up or visit via incognito, but in some cases it doesn’t fix DNS cache issues.

When I go to testD.example.com (before you masked it), I see your domain name written in big letters - and when I visit the the IP address, I see it’s running on Fedora.
So to me, everything looks okay.

  • @hansen Thank you for the reply. I did try clearing cache and incognito, but unfortunately it didn’t fix the issue. I am not sure what is issue here.

    • @makoamena But I can see the text T******* when I visit the domain, so what is not working? If that’s the correct site, then it’s a local problem on your computer/network.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!