Why Does the Same CDN Domain Resolve to Different IP Addresses?
It is usually normal for the same CDN domain to resolve to different IP addresses. A CDN does not necessarily bind a domain permanently to a single server. Instead, it may return different service addresses based on the source of the recursive DNS query, available client network information, geographic and ISP-based policies, and node health. Even when traffic-steering policies remain unchanged, cache timing, multiple address records, and differences between IPv4 and IPv6 can make two queries produce different-looking results.
When troubleshooting, first confirm three things: whether you are querying exactly the same domain and record type, whether you are using the same recursive DNS resolver, and whether the different addresses actually cause access failures or performance degradation. An IP change alone does not establish DNS hijacking, CDN instability, or a change of provider.
It is also important to distinguish two possibilities: different IP addresses do not necessarily mean different physical nodes, and the same IP address does not necessarily serve responses from the same location. The former may reflect multiple entry points into the same service cluster; the latter may involve Anycast. What you actually need to establish is who, on which network, at what time, and through which resolver received which answer—and where the connection ultimately went.
The Roles of Domains, CNAMEs, and Edge IP Addresses
A CDN Domain Is Usually Not a Fixed Name for One Machine
A conventional website can point directly to a server through an A record. With a CDN, the application's domain may use a CNAME to point to a provider-assigned CDN hostname, with subsequent resolution returning A or AAAA addresses. Some products instead provide addresses directly to the requester through proxied DNS records, record flattening, or similar mechanisms, so clients may not see the complete alias chain.
A records map to IPv4 addresses, AAAA records map to IPv6 addresses, and CNAME records define domain aliases. Cloudflare's DNS record type documentation explains these records and describes CNAME flattening in its products. The implementation and presentation of flattening are product-specific; one vendor's rules cannot be applied to every DNS service.
For example, a logical resolution sequence might take the application's domain to a CDN hostname, then to a regional traffic-steering layer, and finally to several IPv4 or IPv6 addresses. Even if the domain owner leaves the first CNAME unchanged, the addresses further down the chain can still change. There is therefore no contradiction in asking, “Why did the IP change when I did not change the DNS configuration?” The CDN integration you control remains unchanged, while the address selection controlled by the CDN has changed.
DNS usually returns a client-facing entry point, not the organization's origin server. Beyond the edge, there may be regional caches, parent caches, or other proxy layers. A resolved address cannot reveal the complete path to the origin, nor does it establish that the origin address has been exposed.
First Distinguish Changes to the Address Set from Changes in Ordering
Suppose two queries both return three addresses, but a different address appears first. This is not the same as all the old addresses disappearing and an entirely different set appearing.
The former may simply be a change in the ordering of a multi-address response. Recursive resolvers, authoritative services, and clients can all affect the final order, and clients do not necessarily connect to the first entry. The latter warrants closer examination of the factors influencing address selection, cache expiration, and configuration changes.
Keep two views when comparing results: the original response to inspect ordering and TTLs, and a deduplicated, sorted list of addresses to compare the sets. Capturing only the first IP address can make normal multi-address responses look like frequent switching.
Why Different Regions and Networks Receive Different Addresses
Authoritative Traffic Steering Often Sees the Recursive DNS Resolver First
Browsers generally do not query root, top-level domain, and authoritative DNS servers themselves. They rely on a recursive resolver configured in the operating system or browser. The recursive resolver queries other servers only when it has no usable cached answer.
Without additional client network information, authoritative traffic steering usually sees the recursive resolver's egress address first, rather than the website visitor's address. A user's physical location therefore does not guarantee that the system will select an entry point based on that location. Users relying on a remote recursive resolver, cross-region corporate DNS, or DNS results obtained through a VPN may receive addresses from an unexpected pool.
This is why an IP change after switching to public DNS does not, by itself, prove that the original resolution was wrong. The new resolver may use different egress points, caches, and traffic-steering inputs. It may improve one network path or make previously accurate local steering less suitable. Actual connections must be tested.
Public DNS services may themselves be distributed. Using the same recursive service address does not guarantee that queries from every region are handled by the same recursive node. Even when cross-region tests specify the same DNS address, their upstream query conditions may not be identical.
ECS Provides a Signal, Not a Precise Client Location
Some recursive and authoritative services support EDNS Client Subnet, or ECS. A recursive query can carry part of the client's network prefix, allowing authoritative traffic steering to use more than the resolver's egress address when assessing location.
However, ECS is not present in every query, nor does it mean the full client IP address is transmitted. Whether it is sent, the prefix length used, whether the authoritative service uses it, and how cache scope is defined all depend on implementation and policy. Using public DNS alone does not establish that traffic steering will be more accurate, and resolution results cannot reveal a user's precise geographic location.
If you suspect ECS is affecting address selection, first record the resolver, query source, and returned addresses, then assess them alongside information observable from the resolver or provider. A query that explicitly includes an ECS prefix can test one traffic-steering branch, but it does not establish that real users will access the service through that branch.
Geography and ISP Are Only Some of the Selection Criteria
A CDN may divide address pools by region, network affiliation, entry-point availability, capacity, or service policy. A geographically closer entry point does not necessarily offer a better path across networks. Residential broadband, mobile networks, and cloud server egress in the same city may also receive different results.
You therefore cannot use one cloud server's resolution results to represent every visitor in the same city. Nor should a city label in an IP database be treated as the node's actual serving location. IP registration data, network affiliation, and the actual forwarding path are different types of evidence.
When collecting samples, retain at least the region, ISP, network type, and address family. Combining these conditions into a discussion of “how many IP addresses this domain has” can hide the variables that actually affect user experience. To broaden your observations, see this approach to observing DNS answers across regions, but use your own query records and request results to explain the specific issue.
Why Repeated Queries from the Same Location Can Also Change
TTL Places Different Caches at Different Points in Time
TTL tells a recursive resolver how long a record can normally be cached. The TTL returned by a recursive service is often the remaining lifetime, not necessarily the value originally configured in the authoritative record.
After a CDN changes addresses, one recursive service may still use an unexpired old answer while another has already queried again and obtained the new answer. A temporary difference does not necessarily indicate conflicting configuration. Records along a CNAME chain can also have different TTLs, so alias cache refreshes and final address refreshes may not happen together.
Applications, operating systems, browsers, and local proxies may also cache results. Some resolvers may use prefetching or controlled serve-stale mechanisms. You therefore cannot promise that all users will update simultaneously after waiting the number of TTL seconds currently displayed in the console. A more reliable approach is to observe whether authoritative answers, recursive answers, and actual client connections gradually converge.
Clearing only the local cache does not clear upstream recursive caches. Switching DNS may simply move you to another old cache. Repeatedly refreshing a web page is no substitute for querying each layer.
Address Pools and Health-Based Steering Can Actively Change Answers
A single domain can have multiple A or AAAA records, and a dynamic authoritative system can return different subsets for different queries. The number of returned addresses does not equal the number of physical edge machines: one entry-point address may have load balancing behind it, while multiple entry points may lead to the same service cluster.
Node maintenance, link failures, capacity adjustments, or traffic distribution policies can all change address pools. An IP change alone cannot identify which cause applies. Verify it against CDN configuration, change records, available incident information, and the distribution of errors during the relevant period.
A DNS change does not immediately terminate existing connections. Established TCP or QUIC connections may continue using the original entry point, and connection reuse may keep a browser accessing an old address after DNS has changed. “dig has changed, so why hasn't the browser?” does not necessarily indicate a browser resolution error.
IPv4 and IPv6 Are Separate Answer Sets
A and AAAA records form separate sets. They can use different entry points and network paths, and failures may affect them differently. Comparing an IPv6 address obtained on a mobile network with an IPv4 address obtained on an office network does not establish instability in a single traffic-steering policy.
Dual-stack clients may also choose IPv4 or IPv6 based on connection racing and network conditions. An AAAA record in a DNS response does not mean a particular HTTPS request will use IPv6. A successful A-record query does not establish that IPv6 access works either.
If failures are limited to one address family, test that family separately before replacing the entire CDN. This narrows the investigation from global traffic steering to specific entry points, network paths, and protocol configuration, rather than masking a local problem with a broad switch.
Why Anycast Breaks the Assumption That an IP Equals a Node
Anycast allows the same service address to be announced from multiple network locations, with routing directing client traffic to a reachable entry point. Users in two locations can therefore resolve the same IP address yet receive responses from different locations. Routing changes can also alter the actual point of entry without changing the IP address.
DNS-based traffic steering and Anycast are not mutually exclusive. A system can first use DNS to select an address pool, then use Anycast for addresses within that pool. Conversely, different IP addresses can serve traffic from the same location.
This directly affects the troubleshooting sequence. If resolved addresses remain unchanged during an incident but access fails only in one region or on one ISP, prioritize evidence from the connection, TLS, and request stages. Do not rule out edge or network issues simply because the IP has not changed. For more on the relationship between addresses and serving locations, see the limitations of interpreting Anycast IP locations.
Route probes, network affiliation data, and provider-supplied request identifiers can help, but no single piece of evidence proves the complete delivery path. In particular, an IP geolocation database label should not be presented as proof that a user reached a data center in that city.
Use a Minimal Set of Queries to Identify the Layer Where Results Differ
Step One: Fix the Domain, Record Type, and Query Time
The following commands work in an environment with dig installed. Replace the example domain with a domain you are authorized to investigate. Do not change local DNS, VPN, or browser settings at the same time:
date -u
dig www.example.com A +noall +answer +comments +stats
dig www.example.com AAAA +noall +answer +comments +stats
dig www.example.com CNAME +noall +answer +comments +stats
Retain the response status, records and TTLs in ANSWER, the SERVER field, and the query timestamp. SERVER identifies the resolver used by this dig query, which may be a local forwarder. It is not necessarily the egress point that ultimately queries authoritative DNS.
Query time in the output is the duration of this DNS query, not the page load time. If the answer comes from a local or recursive cache, it does not represent the duration of a complete recursive lookup either.
Use the results to guide the next step:
Same A-record set, different order: treat this initially as a multi-address response. Check whether the application uses only the first address and whether it can retry connections.
Different A records, same CNAME: focus on final address selection, recursive caching, and the query source.
Different CNAMEs as well: inspect DNS policies by network and region, multi-CDN settings, or traffic management configuration, and check change records.
Problems only with AAAA: move to IPv6 path validation. Do not let successful IPv4 access obscure the problem.
NXDOMAIN, SERVFAIL, or timeout: first address whether the name exists, whether the resolution chain is complete, and whether the resolver is reachable, rather than comparing address performance.
A CNAME query that returns no visible alias does not prove that a CDN is not in use. Record flattening, proxied DNS records, and direct address-based integration can all hide this clue.
Step Two: Compare the Default Resolver with a Specified Resolver
The following commands prompt for an available recursive DNS address that you are permitted to use. They do not change the system DNS configuration:
read -r -p 'Enter the recursive DNS server address for comparison: ' DNS_SERVER
dig @"$DNS_SERVER" www.example.com A +noall +answer +comments +stats
dig @"$DNS_SERVER" www.example.com AAAA +noall +answer +comments +stats
Run comparison queries close together in time and record the client's network. Make a small number of consecutive queries in each group to observe the address set, then continue observations across the relevant TTL to inspect refresh behavior. Do not generate unnecessary load with high-frequency queries or retain only the result that matches your expectations.
If the default and comparison resolvers return different answers, first assess whether the difference reflects geography or caching, then test whether both address sets can serve requests correctly. If only one resolver persistently returns old addresses that cannot serve traffic, with other conditions unchanged, investigate its cache and forwarding chain further.
Also note that specifying public DNS does not guarantee that the query reaches the intended service. The network may restrict external DNS or use an intermediate forwarder. Encrypted DNS may use different transport and egress paths. If a browser enables its own secure DNS, system dig queries and browser lookups may follow entirely different resolution paths.
Step Three: Inspect the Delegation Chain When Needed, Without Treating a Trace as the Definitive Answer
dig +trace www.example.com A
This command performs iterative queries from the network of the machine running it and can reveal delegation and alias information. A timeout at one step may mean the current network does not permit direct access to that DNS service. It does not immediately establish a global resolution failure.
More importantly, a trace follows a different path from the recursive DNS service users normally rely on, and authoritative traffic steering may see a different query source. The trace result therefore cannot automatically be treated as the single correct answer that every user should receive.
If you have identified the authoritative server for a record, you can query it directly to check whether the returned records match the intended configuration. With multiple CNAME levels, identify the zone responsible for each name separately. Checking only the application's authoritative zone does not mean you have checked the entire CDN traffic-steering chain.
How to Determine Whether Different DNS Answers Affect Actual Access
Fixed-Address Tests Must Preserve the Domain and TLS SNI
Accessing an HTTPS IP address directly may reach a default virtual host or trigger a certificate name mismatch. It cannot establish a problem with the application's domain. When testing a candidate entry point, preserve the original URL, Host, and TLS SNI.
The following command uses curl's --resolve to temporarily fix the connection address without modifying the system hosts file. The example IP is reserved for documentation and cannot be used directly for production testing. Replace it with a candidate address obtained from the earlier queries:
curl --noproxy '*' --resolve www.example.com:443:203.0.113.10 --connect-timeout 5 --max-time 20 -sS -o /dev/null -w 'ip=%{remote_ip} code=%{http_code} dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} first=%{time_starttransfer} total=%{time_total}\n' https://www.example.com/
The five-second connection timeout and twenty-second total timeout are example test limits, not CDN service metrics. --noproxy '*' excludes interference from environment-configured proxies. If your environment requires a proxy, use an authorized path and make clear which segment of the connection the result measures.
The command does not use -k, because certificate validation failure is itself an important signal. It also does not automatically follow redirects, allowing you to inspect the current domain first. If the response is 3xx, inspect Location separately before deciding whether to test the next domain. Do not attribute a downstream site's problem to the current entry point.
Most of these timing fields are cumulative from the start of the request. For the new HTTPS connection without redirects used here, connect - dns provides an approximate view of TCP connection setup, and tls - connect approximates the TLS stage. first - tls also includes request transmission, network round trips, and service processing waits; it cannot be equated directly with origin processing time. With a fixed address, DNS timing no longer represents normal live resolution overhead either.
Keep Test Conditions Consistent Before Interpreting Differences
When repeating requests against different candidate IP addresses, keep the URL, method, headers, request body, network egress, and timeout limits the same. Cache warmth, content state at different edges, and revalidation can all affect time to first byte. Do not compare one cache miss directly with a warm cache at another address and conclude that DNS traffic steering is wrong. An edge cache miss does not necessarily mean the request has reached the organization's origin server either.
To distinguish address families, use curl -4 and curl -6 separately through the normal resolution path, but ensure that the local machine actually supports the corresponding network connectivity. If an IPv6 request fails, first rule out the alternative explanation that the local network has no IPv6 egress.
Comparison Result | Supported Interpretation | Next Step |
|---|---|---|
Addresses differ, but certificates, status codes, and application content all match expectations | There is currently no evidence that the resolution difference constitutes a fault | Retain healthy samples and monitor by region and network |
One address consistently produces certificate errors or serves the wrong site | Entry-point domain binding, certificate deployment, or routing configuration needs checking | Retain error details and identify affected addresses and domains |
The connection stage is clearly abnormal on one ISP, while other networks work normally | The path from that network to the entry point may be involved | Retest through different egress points, separating connection setup, TLS, and response waiting |
IPv4 works, but IPv6 fails | The fault may be limited to the IPv6 entry point or path | Check local capability, AAAA records, and IPv6 service configuration |
HTTP 200 is returned, but content or application validation fails | Successful transport does not mean the application works correctly | Inspect the actual response body, critical APIs, and application errors |
CdnChart's website speed test can provide an external observation point for comparison with local samples. Results from the platform's probe locations do not represent every real user's experience and cannot replace evidence from the affected user's network. Group results by region, ISP, address family, and time window, counting failures and timeouts separately. Do not remove failed samples and then claim an overall speed improvement, or simply average the P95 values of individual groups to calculate an overall P95.
When to Change Configuration Instead of Continuing to Investigate IP Addresses
Do Not “Fix” Normal Address Changes by Pinning an IP
If the different answers all serve requests correctly and differ only by region, network, or query time, you should generally retain domain-based access. Permanently placing one resolved address in hosts, a single-address firewall allowlist, or application configuration may bypass future traffic steering and failover, creating new failures when that entry point is retired.
If fixed egress or allowlisting is genuinely required, check the provider's supported address ranges, update mechanisms, and dedicated access options. Do not treat one query result as a permanent node inventory. More IP addresses do not automatically mean broader coverage or better performance.
Consider Resolver Changes Only When the Recursive Path Is Misaligned with the User Network
If evidence shows that a remote corporate DNS egress persistently gives users entry points unsuitable for their local network, evaluate local recursive resolution, controlled forwarding, or provider-supported traffic-steering methods. Limit changes to test devices or test networks and compare actual application requests, not just the geographic labels of the addresses.
Record the current configuration and rollback path before making changes. Afterward, retest DNS, HTTPS certificates, critical pages, and APIs. If the organization relies on internal domains, split DNS, or access controls, do not move every endpoint directly to public DNS, as this may introduce new internal access failures.
Check Configuration Conflicts in Authoritative DNS and the CDN Control Plane
If only some network-specific DNS policies point to an old service, or one address group does not have the domain correctly bound, inspect the DNS console's default policy, regional overrides, duplicate settings, and traffic allocation ratios. Also check the domain's integration status and certificate configuration in the CDN. In a multi-CDN setup, verify that content, redirects, and security rules are consistent across paths.
Validate changes within the smallest practical scope and retain the original values and rollback method. If you plan to lower TTL for a migration, allow time in advance for the existing longer-lived caches to expire. Lowering TTL only after a failure cannot immediately invalidate old answers already cached. The old service should also retain the capacity needed for the transition; do not assume that completing a DNS change eliminates all old traffic.
If you suspect unauthorized DNS changes, inspect account activity records, domain delegation, and authoritative configuration, and gather evidence through multiple independent paths. An unfamiliar IP warrants investigation, but one address ownership label is not enough to establish hijacking. At the same time, do not ignore certificate or content anomalies simply because the domain still opens.
Turn “Different DNS Answers” into a Verifiable Access Path During Follow-Up
After troubleshooting, a useful conclusion should explain which users, in which region and on which ISP, using which network type and resolver, received which A or AAAA set at what time; which address they actually connected to; whether the problem occurred during resolution, connection setup, TLS, time to first byte, or application content processing; and whether the same conditions worked after the change.
Use the following sequence for verification:
On the originally affected network, confirm that answers, CNAME information, and cache changes match expectations, retaining a healthy network as a control.
Validate certificates, status codes, and application content for the candidate entry points actually returned, testing IPv4 and IPv6 separately.
Observe results across the relevant cache windows to confirm that success was not a one-off and that users still accessing old addresses have not been overlooked.
Check that temporary hosts entries, test resolver settings, and temporary configuration changes have been reverted, and retain the necessary rollback records.
The same CDN domain resolving to different IP addresses is only an observation. Only by connecting query conditions, cache state, and actual requests can you determine whether it reflects normal traffic steering, a localized network issue, or a configuration error that needs fixing. The goal is not to make everyone receive the same address forever, but to ensure that different users receive an available, correct service that meets the application's requirements.
- CDN domain resolution
- Same domain
- different IPs
- DNS traffic steering
- Recursive DNS caching
- CDN DNS troubleshooting
- IPv4 and IPv6
- Anycast
- dig queries