Forwarding Domains to Single IP

Hi,

Recently i got that cloudflare can resolve every cloudflare websites in a single cloudflare ip.
i have been looking for domain ip like nslookup and it shows 2 ip’s from cloudflare 172.66.. ,172.66.. and while ping with those guys latency are 20-30ms.So i tried to ping with all ip’s in a range like 172.66..1 - 172.66..255 then i got less than 10ms ip were it can resolve every domains that hosted on cloudflare.I forwarded every cloudflare hosted domains(apk***/com/io) into that single ip (104...*).

will it cause any problem if i am forwarding every domain into that single ip?

Thanks in advance!

It’s not exactly clear what problem you are trying to solve.

If you are doing this in your own DNS Resolver, it will probably work fine until it stops working. All Cloudflare IPs will work for all :orange: hostnamrs. But Cloudflare can and will make changes that result in IP ranges being routed differently which will result in worse performance for you. They might stop using a particular prefix, and again you will have a problem.

You should never put Cloudflare IPs as the origin for a Cloudflare hosted domain. That just results in an errror (and Cloudflare will not know where to source content for the request).

Hi Michael,
when i point domain to it’s origin server it takes some seconds to load or sometimes it never load.so i made resolver to point nearby cloudflare server ip as origin server and it loads websites faster than i expect, it takes only 2sec to load websites that hosted on cloudflare. i am using this method for more than 3 days.

Any issues will happen due to the method i am using it?

Cloudflare uses an Anycast network, so “nearby” does not really exist. The same subnets are announced from over 200 different POPs that Cloudflare run worldwide, and the magic of the Internet directs you to the best POP.

Are your usual DNS resolvers poorly performing? My hardcoding some DNS entries to improve performance that’s the only thing that is really changing.

Is this your own website, or random websites using Cloudflare?

yep sometimes my resolver performs like s***.
no it’s random websites

Then the easy solution is to try a different resolver! 1.1.1.1/1.0.0.1 are public Resolvers Cloudflare provide and they are very proud of their performance.

In general, using a static IP for Cloudflare sites will work just fine. Until it stops working. And clearly you will get no support from anybody when that happens. But I’ve done something similar without issue for many years.

1 Like

thanks michael let me try that one.

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