Pointing domain and sub-domain to different IP addresses

I am hosting my domain and a sub-domain at two different hosting providers (different IP addresses).

We created two separate A name records pointing the two URLs to their respective IP addresses.

HOWEVER, both are pointing to the same IP address.

What am I doing wrong??

Many thanks!

Hi @ram2,

Are they, by any chance, proxied and, therefore, pointing to completely different IPs that may be Cloudflare’s?

Hi @domjh
Thanks for explaining why they point to 104… However, the two A records are supposed to point to TWO DIFFERENT IP addresses (I am referring to the websites at these two different IP addresses). They are NOT. How can I fix that?? Many thanks!

Where are you expecting to see the two different IPs and not? In your Cloudflare Dashboard?

@domjh I am directing www.immigrantvolunteers.org and https://helpinghands.immigrantvolunteers.org to take me to two DIFFERENT sites (at two different hosting providers). I expect to get to each of those sites when I type in the appropriate URL. The second one returns an error - This is default server vhost. There is nothing here.

Pause Cloudflare on the site while you get everything working, then re-enable it. Neither even look to be resolving to Cloudflare IPs at the moment, for me.

You can pause Cloudflare from the Overview tab of the Cloudflare Dashboard, bottom right under Advanced Actions.

Ahh, I read that article and changed the A records and CNAME record to GREY CLOUD (DNS only). That is why they are not resolving to Cloudflare.

Are you asking me to essentially ‘turn off’ Cloudflare for a few minutes and ‘turn it on’ back again?

In which case, Cloudflare is only operating as your DNS provider and should not be affecting any of your traffic. Can you post a screenshot of the DNS records you have in your dashboard? I am still not entirely sure what the issue is here.

@domjh the issue is that the subdomain is NOT taking me to that site. I am geting that error message. What is preventing that from being displayed? What have I done wrong?

You have set a CNAME from the subdomain to the main domain, so the IP addresses will be the same for both. If those are the correct IPs, Cloudflare should not be affecting it and any issues must be coming from your server.

Should I be setting the CNAME differently??

If you want the main domain and the subdomain to point to different servers, then you need to use an A record pointing to the subdomain server’s IP, not a CNAME which points it to the same place as the main domain. This isn’t really Cloudflare related, and if you make sure all your DNS records match those before you moved to Cloudflare, it should work OK.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.