DNS rolves to the wrong IP when proxy is on

Domain resolves to old IP when proxy is on but will go to the correct one once the proxy is turned off.
This domain’s DNS was moved from another CloudFlare account and I’m wondering if this is something I can fix or can this only be fixed by CloudFlare’s Support?

May I ask have you checked if the nameservers of the domain name are up-to-date and propagated already?

Was the domain removed from the “old CF account” after successfully adding it to the “new CF account”?

Yes or it wouldn’t be resolving to the correct IP once the proxy is turned off.

I do not have control over the old account and I’m unable to get ahold of the person/company that does.

If you have added your nameservers from your new Cloudflare account, then this one’s are “in charge” and you sould be able to manage DNS records for it.

Meaning, when you set the IP to the “new origin/server”, and set :orange: (proxied), within few seconds or minutes it should resolve to correct one.

Good, once’s the domain name nameservers are set to your new Cloudflare account, the domain name will be removed from the old Cloudflare account after few days (Cloudflare detects the changes and removes domains which are no more pointing to the Cloudflare nameservers given for the CF account where the domain/zone is being added.)

  • the owner of the “old CF account” should receive an e-mail with a notification like "domain.xyz has moved, even status “Moved” under the domain name at the Cloudflare dashboard …

Therefore, after successful propagation due to recently changed or moved domain to your new Cloudflare account, for a proper DNS propagation time, it may take up to 24-48 hours to apply the changes, even some time too for your local DNS (or the ISP provider) to apply the changes and respect it as-is.

In the meantime, you could try to flush the dns for yourdomain.com using below tools for the NS type of the DNS record (selected from the dropdoen menu):

Thanks. The issue isn’t that the Name Servers aren’t resolving correctly, The issue is that once the proxy is active it points to the old server. I’ve had this issue in the past with a Kinsta hosted website and was only able to get the site to resolve correctly once the site was removed from Kinsta. It seems like CloudFlare prioritize some web hosts over others. Maybe they use websockets that cause this issue if the host on the old server is still active.

May I ask have you changed your A or CNAME record value(s) and pointed to the new hosting where the content of the new website exist?

I doubt, but hm …

Nevertheless, I have had migrated websites, only I changed the value for A record to the new IP address/hosting server and cleared the cache at Cloudflare (Purge the Cache). It was working within a minutes or so.

Has your DNS records somehow revereted to the old values? Did you checked that, if using some 3rd-party intergration of Cloudflare like eZoic, etc.?

  • you have stated Kinsta …

I have migrated many website and updated hundreds IP records but this is only an issue when moving away from a few web hosts.

The IP was changed weeks ago. It only points to the old IP once the proxy is active. This issue likely stems from the old hosts having integration with Cloudflare. They have an API that is still providing instructions to the API and overriding the IP that is provided in Cloudflare itself once the proxy is on.

The records that are in my Cloudflare haven’t reverted. Nothing has changed since I’ve updated the A record which was on Nov. 19th.

This is the 3rd time I’ve ran into this issue and have opened a ticket with Cloudflare support each time. The first time was with a 3rd party still having the domain in their hosting settings and would only resolve to the new IP with the proxy on once they removed it completely from their host.

The 2nd time was when I was testing Kinsta as a host. Once I was attempting to move away from Kinsta the same issue occurred but since I had access to Kinsta I was able to see it wasn’t Cloudflare’s cache but they were still directing the domain (Only when the proxy was on) to that host. Once I removed that domain from Kinsta the problem went away.

Cloudflare’s support helped fix the issue.

The issue was with the old host’s custom hostname (SSL for SaaS) still being live. Due not having access or the 3rd party not fulfilling the request to remove it Cloudflare removed to old configuration settings allowing my settings to take affect when the proxy is turned back on.

1 Like