How do you make a domain point to different IP addresses depending on the user's network? I never understood how CDNs do this
Some CDNs 'prefer' one approach or the other, e.g. Akamai tends to use DNS, CloudFlare tends to use Anycast, but these days most have the capability to do both or mix them as appropriate.