How to setup a subdomain that points to a different IP address from my Netlify app

Hello,

I currently have a domain that I bought from NameSilo that I use for my Netlify app (Netlify app URL: blissful-wiles-087f93.netlify.com). A while back I configured the domain to use Netlify’s NameServers instead of NameSilo’s so going to my website goes to my Netlify app. Right now however, I would like my Netlify app to point to the main domain of the website, while having a subdomain point to a different IP address for something else, in other words:

mysite.com → Netlify app
subdomain.mysite.com → My other server

To accomplish this, I tried doing a few things. First, I added an A record on Netlify DNS config to point to the ip address, but this did not work. Secondly, I tried removing Netlify’s NameServers from the NameSilo DNS config, and used NameSilo’s servers instead. I then added a CNAME record on NameSilo config to point to my Netlify app (blissful-wiles-087f93.netlify.com), with a TTL of 3600. However my site doesn’t load like this either.

Does anyone know why the latter approach isn’t working? And if there are better approaches to solve the problem I’m having?

You could use either of the approaches.

  1. If you use Netlify DNS, pointing an A record for the subdomain should work fine. It depends on what the external server is expecting the configuration to be. Some might expect a CNAME record.
  2. If you use NameSilo DNS, you’d have to point to Netlify as explained here:

Solved, nevermind. The issue was on the Docker configuration side.

Summary

Hi @hrishikesh,
I have a very similar problem. I have set the A record to my homeserver IP address, but it’s not working well. I ran the “dig subdomain.mydomain.com” command, at it respond to the IP address of homeserver, but it doesn’t load anything at all, however I guess everything is configured properly on the homeserver side (80 and 443 ports are open to the right internal IP).

I can’t get a new Let’s Encrypt certificate there: "A server was found at this domain, but it returned an unexpected status code Invalid domain or IP. "

What could be wrong?

1 Like