CDNs and edge caching: how distributed delivery works
You look up the IP address of a website and it belongs to a delivery network, not to the company that hosts the site. That is a CDN at work: it serves cacheable content from edge servers near visitors and keeps the origin server behind them. DNS, Anycast or the provider’s own steering decides which edge you reach.
How a CDN serves content from the edge
A CDN keeps copies of cacheable content on edge nodes in many locations. The first request for a file reaches an edge that does not have it yet, so the edge fetches it from the origin and stores it. Later requests are answered from the stored copy until it expires. The edge is chosen by a DNS answer that depends on where you ask from, by Anycast, where one IP address is announced from many places, or by the provider’s own steering.
How to tell whether a response came from the cache
Look at the response headers. Cache-Control says whether a response may be stored and for how long. Age shows how many seconds the copy has spent in a cache. Many CDNs add their own cache-status header with a HIT or MISS value. Repeat the request and compare: a miss followed by a faster hit shows that caching works.
Why a CDN IP is not the origin address
The address your browser connects to belongs to an edge node, and many unrelated sites can share it. A lookup of that IP describes the CDN, and it does not necessarily reveal where the origin server is. To keep the two apart, look up the domain’s registration data with 2ip domain information and compare that with what you learn about the edge IP. HTTP caching rules are defined in RFC 9111.