Why does one hostname resolve to multiple IP addresses?
Why one hostname returns multiple IP addresses: understand A and AAAA records, DNS round robin, CDNs, and diagnose unexpected answers with dig.
This is often normal
A hostname can resolve to multiple IP addresses because DNS allows more than one A record (IPv4) or AAAA record (IPv6) for the same name. Hosting providers use this for distributed services, traffic distribution, and migrations. It is usually normal, but every returned address should serve the intended service.
An A lookup and an AAAA lookup are separate queries. A client may combine their results when deciding how to connect. If the name is a CNAME alias, the addresses belong to the target hostname rather than to extra A records on the alias itself.
Tools For This Topic
Why this happens in practice
Multiple IP addresses are typically used to improve reliability, performance, and scalability.
- Traffic distribution: DNS may return several addresses or rotate their order, but clients decide which address to use.
- Redundancy: multiple endpoints can help, but plain round-robin DNS does not check server health or guarantee failover.
- Geographic routing: a CDN or DNS provider may return different addresses depending on the resolver location or other routing signals.
- Migrations: old and new addresses may coexist deliberately while traffic moves between providers.
The addresses below are documentation examples, not live servers. The two A records form one IPv4 record set; the AAAA record is a separate IPv6 record set.
example.com. 300 IN A 203.0.113.10
example.com. 300 IN A 203.0.113.11
example.com. 300 IN AAAA 2001:db8::1A vs AAAA records
A hostname may return both IPv4 (A) and IPv6 (AAAA) records simultaneously.
Clients may prefer IPv6 or race IPv6 and IPv4 connections using a strategy such as Happy Eyeballs. The chosen address depends on the client and network. A broken IPv6 endpoint can cause different symptoms from a broken IPv4 endpoint.
Seeing both record types is normal and expected in modern environments.
Why one tool may show fewer IPs than another
Different DNS tools can return different views of the same hostname.
- Some tools only display a subset of responses
- Different resolvers may return different answer orders
- Provider-side load balancing may rotate IP responses
- Caching and TTL differences can affect results
This is why one tool may show a single IP while another shows multiple.
What to check
- The IP ranges belong to the expected provider
- Both IPv4 and IPv6 responses are understood
- The behaviour aligns with the service design
- There are no unexpected or rogue IP addresses
When multiple IPs may be suspicious
Multiple IP addresses are not inherently suspicious, but context is critical.
- IP addresses do not belong to the expected provider
- Unexpected changes occur during a migration
- Mixed infrastructure appears without explanation
- Security concerns such as DNS hijacking are suspected
In these cases, further investigation is warranted rather than assuming the behaviour is normal.
How to check multiple IP addresses with dig
Replace www.example.com with the exact hostname you are investigating. Start with full answers so you can see the record type, CNAME chain, and remaining TTL. Avoid an ANY query: it is not a reliable way to retrieve every record type.
dig www.example.com A +noall +answer
dig www.example.com AAAA +noall +answer
dig www.example.com CNAME +noall +answerCompare the same record type through two recursive resolvers. These queries use public resolvers rather than your usual system resolver; differences can reflect caching, geographic routing, or split DNS rather than an error.
dig @1.1.1.1 www.example.com A +noall +answer
dig @8.8.8.8 www.example.com A +noall +answerFor a zone you manage, identify its authoritative nameservers and query each directly. Substitute the actual zone and nameserver. If a CNAME points outside that zone, inspect the target in its own authoritative zone too.
dig example.com NS +short
dig @ns1.example.com www.example.com A +norecurse
dig @ns1.example.com www.example.com AAAA +norecurseCheck for the aa flag in an authoritative answer. A referral or a response without aa does not establish the current authoritative address set. Compare all authoritative servers before blaming a recursive resolver cache.
How to interpret different DNS answers
- Same addresses, different order: usually answer rotation, not a DNS change. Compare the address set rather than the first line.
- Old address at one resolver after a change: check the previous TTL and authoritative answers. Lowering the TTL after an update does not shorten a record already cached under its old TTL.
- Different authoritative answers: check provider routing policies and zone consistency. Deliberate geographic responses can differ; unexplained differences deserve investigation.
- Only office or VPN users see a different address: check split-horizon DNS, local hosts entries, and the resolver selected by the VPN.
- One address consistently fails: verify that endpoint and its TLS certificate. Multiple DNS records do not guarantee that every server is healthy.
Test each web endpoint without changing DNS
For a hostname you manage, curl can connect to a specific IPv4 address while preserving the hostname for HTTP and TLS. Replace the example hostname and documentation addresses with your real values. Do not disable certificate validation to make a failing endpoint look healthy.
curl --resolve www.example.com:443:203.0.113.10 --connect-timeout 10 -I https://www.example.com/
curl --resolve www.example.com:443:203.0.113.11 --connect-timeout 10 -I https://www.example.com/A certificate error, timeout, or different response on just one IP can explain intermittent failures. A successful HEAD response is only a basic reachability check, not a complete application health test. With a CDN, test the addresses it advertises, not an assumed origin IP.
Can I use multiple A records for automatic failover?
You can publish multiple A records for the same hostname, but ordinary DNS round robin does not remove failed servers. Some clients try another address; others may fail or keep using a cached endpoint. Use health-checked DNS routing or a load balancer when reliable failover is required, and account for DNS caching even then.
Do not remove extra addresses merely because there is more than one. Confirm the provider configuration and test the affected endpoints first. IP ownership alone does not prove that an answer is correct or malicious.
Use These DNS Pro Tools
If you want to validate this topic in practice, these DNS Pro tools are the fastest next step.
Standards And Official References
Use these primary standards and provider resources to verify the protocol details and implementation guidance covered in this article.
Related Tools
Related Articles
How to Check DNS Propagation
Check DNS propagation with dig: compare authoritative servers and public resolvers, interpret TTLs and negative caching, and diagnose unexpected answers.
Why does a domain have multiple MX records?
Learn why multiple MX records are normal, how priority works, and what to check when a domain publishes more than one receiving mail host.
Common PTR Record Problems: Reverse DNS Issues Explained
A practical guide to PTR record problems, including missing reverse DNS, forward-confirmed reverse DNS, hostname issues, and how PTR impacts email deliverability.
