Files/resources are not served by cloudflare from the nearest location

Hi!. I have tested my website with GTmetrix using the test server located in London, UK but I notice that the files/resources served by Cloudflare are loaded from the ip 104.21.64.253 which belongs to a Cloudflare server located in San Francisco, CA, USA . This causes my website metrics to be worse with Cloudflare. Why don’t they load from a server located in London, UK?

Cloudflare uses anycast, a IP address isn’t advertised from a single datacenter, but from hundreds. So tools which think an IP should have a ‘location’ are generally incorrect with regards to any anycast address.

https://www.cloudflare.com/learning/dns/what-is-anycast-dns/

1 Like

If you want to identify the specific location that served a request look at the RayID response header. The three characters on the end are the IATA airport code for the location that served the request. In the example below, CDG is Paris Charles de Gaulle.

% curl https://community.cloudflare.com --silent -o /dev/null --dump-header - | grep -i cf-ray
cf-ray: 71abefgd60f1-CDG
2 Likes

Thank you cscharff. Your explanation is very clear. Best regards

Thanks Miguel.
I tried in the browser using the url https://mydomain.com/cdn-cgi/trace and I was also able to get the three characters of the IATA airport (in the line colo=ABC). Best regards

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