[Support Guide] How are requests routed to the nearest Netlify CDN node?

Last reviewed by Netlify Support in August 2023

This happens automatically, assuming that you’ve followed the DNS configuration best practices. When your DNS is setup reasonably, our CDN is designed to intelligently route your visitors to the CDN node nearest them on the network. This means that European visitors will load their site from a node in Europe, Australians from Australia, etc. The net result is less latency for your visitors when browsing your site.

But that’s not what you asked - you asked “How does it work?” If you want the lower-level details, our DNS provider is NS1 and we use their geographic routing feature to power our lookups. That article has the details about how the feature works, but the TL;DR is that the IP address returned from your DNS lookup will be one that is currently active and nearest to your computer. Our CDN also has some logic which makes sure that we only return nodes which are currently in operation, so in case a node is taken down for maintenance or otherwise misbehaves, traffic will not be sent to it.

In many locations, our CDN has more than one node, so you may see a variety of IP address responses if you repeatedly look up a correctly configured hostname:

$ host netlify.com
netlify.com has address 3.128.161.103
netlify.com has address 3.129.233.119
netlify.com has IPv6 address 2600:1f16:204:f100:2100:720:55a8:df93
netlify.com has IPv6 address 2600:1f16:204:f101:7044:1ec0:c203:f1c3

$ host netlify.com
netlify.com has address 35.229.48.116
netlify.com has address 34.73.83.172
netlify.com has IPv6 address 2600:1f18:2489:8200::c8
netlify.com has IPv6 address 2600:1f18:2489:8202::c8

Those two commands were run within 1 second of one another from the same location, and show several of our CDN nodes that were in rotation when the commands were run.

If you’re not sure about your DNS setup, the main thing to be sure of is that your custom domain (the “main name” you have set for the site) is not an “A” record but instead a CNAME if you don’t use our DNS hosting. If you do use our DNS hosting, it should be a “NETLIFY” type record as shown in our UI.

Got questions? This thread is a great place to ask, but please include your hostname(s) including which is the custom domain so we can get you the best answers! That custom domain will be labeled as “Primary domain” in your Domain Settings configuration in our UI.

1 Like

Last reviewed in August 2021.