What Is DNS Failover, and How Is It Different from Anycast?
DNS failover changes the answers your domain gives when a server fails, while anycast spreads name servers across many locations. Here is how they differ and how they fit together.
10 min readUpdated Nov 19, 2026By XPASS Editorial Team

When people talk about keeping a website online, two terms from the DNS world appear again and again: failover and anycast. They sound like alternatives, and some plan pages list them side by side as if choosing one removes the need for the other. In reality they work at different points in the chain between a visitor and your site, and they protect against different kinds of failure.
This guide explains each idea in plain language, shows where they differ, and describes how they can work together. You will also find a comparison table, a simple method for deciding what your domain needs, a short example, and a list of limits. Nothing here depends on a single vendor, so you can use the same questions when you read any provider's description.
Quick recap of how a DNS lookup works
When a visitor types your domain into a browser, a recursive resolver, usually run by an internet provider or a public service, looks for the answer. If it does not already have the answer cached, it follows the delegation chain down to the authoritative name servers for your domain. These servers hold your zone, the set of records such as A, AAAA, MX, TXT and CNAME that describe your domain. The concepts are defined in RFC 1034, and the message and record formats in RFC 1035. A plain-language introduction is available from Cloudflare Learning.
Two things can go wrong in this chain. First, the authoritative name servers might be unreachable, so nobody can learn where your site lives. Second, the name servers might answer perfectly well, but the address they give points to a web server that is down. Anycast is mostly about the first problem. Failover is about the second. Keeping that split in mind makes the rest of the topic much easier.

What DNS failover means
DNS failover is a method of changing the DNS answer automatically when a monitored server stops working. The setup normally has three parts:
- Two or more destinations. For example a primary server and a standby server, each with its own IP address.
- Health checks. The provider probes each destination at regular intervals, for example by opening a connection or requesting a web page, and records whether it responds as expected.
- A rule for the answer. While the primary is healthy, the A record returns the primary address. If the checks fail several times in a row, the provider starts returning the standby address instead. When the primary recovers, the answer may switch back automatically or after you confirm it.
The important detail is that failover edits what the name servers say. It does not move traffic that is already flowing, and it cannot act until a resolver asks again. That is why the time to live (TTL) of the record matters so much. If the TTL is 3,600 seconds, a resolver that has just cached the old answer may keep sending visitors to the failed server for up to an hour. A short TTL, such as a minute or two, reduces the delay but increases the number of queries your name servers receive.
Failover can be active-passive, where the standby only receives traffic when the primary fails, or active-active, where several servers share traffic and unhealthy ones are removed from the answer. Both approaches use the same idea of health-based answers.
What anycast means
Anycast is a network routing technique. Normally an IP address belongs to one machine in one place, which is called unicast. With anycast, the same IP address is announced from many locations at once. The internet's routing system then delivers each query to a location that is topologically close, according to routing policy.
For DNS, a provider can run name servers in many cities and announce the same addresses from all of them. A resolver in one region reaches a nearby site, and a resolver in another region reaches a different one, yet both use the same name server address that you configured at your registrar. If one location fails or is withdrawn from routing, queries are normally carried to another location instead.
The benefits are usually described in three ways:
- Lower lookup latency for visitors far from any single data center.
- Resilience against the loss of a site, since other sites keep answering.
- Capacity to absorb a surge of queries by spreading them over several locations.
Anycast does not read your records differently. It simply gives the same answers from more places. Your own web server is not part of the picture at all.
The core difference
A short way to remember it is this. Anycast keeps the phone book available everywhere. Failover updates the entry in the phone book when the person has moved.
| Question | DNS failover | Anycast |
|---|---|---|
| What does it protect? | The destination of your traffic, such as your web server | The availability and speed of the DNS service itself |
| What changes? | The IP address in the answer | The route a query takes to reach a name server |
| What triggers it? | Failed health checks | Routing and network conditions |
| Who configures it? | You, in the DNS panel, with a provider that supports it | The DNS provider, as part of its network design |
| Do you need a second server? | Yes, there must be somewhere to fail over to | No |
| Main limit | Cached answers delay the switch | Does not detect a failed web server |
Because the two answer different questions, comparing them as rivals is misleading. A site can have excellent anycast DNS and still go dark when its only server crashes. A site can have careful failover rules and still become hard to reach if its single name server location is knocked offline.
How the two can work together
A well-designed setup usually layers the techniques:
- The domain uses a DNS provider whose name servers are reachable from many locations, often through anycast, so the zone can be read even if one location is unavailable.
- Inside that zone, health-checked records point to more than one origin, so a failed server is removed from the answer.
- A moderate TTL balances switch time against query volume.
- The origins themselves are in separate failure domains, for example different hosts or different regions, so one local problem does not affect both. The article on multi-region DNS redundancy considerations looks at that design in more detail.
DNS-level failover is also not the only way to switch traffic. Load balancers, content delivery networks and application-level routing can redirect visitors without waiting for DNS caches. Many teams use DNS failover as a coarse safety net behind those faster layers.
How to decide what your domain needs
Work through these steps before paying for any feature.
- Write down the single points of failure. Is there one web server, one database, one hosting company, one DNS provider? The weakest link usually decides your availability.
- Estimate what an outage costs. An hour of downtime for a hobby blog is a minor inconvenience. For a shop that depends on a launch, it can be expensive.
- Decide whether a standby exists. Failover only helps if there is a second server, ideally in a different location, that is kept in sync. If you do not have one, build that first.
- Check how health checks work. Find out what is probed, how often, how many failures count as down, and what happens on recovery. A check that only tests that a port is open may not notice a broken application.
- Pick a sensible TTL. For records you intend to fail over, choose a short TTL well before you need it. Lowering it only after the outage starts is too late, because old answers are already cached.
- Review the DNS provider's network. Look at how the provider describes its name server locations and whether it uses anycast. The guide to choosing a DNS provider for a high-traffic site lists more questions worth asking.
- Weigh the value over a full year. Features that look small per month add up, so the walkthrough on evaluating premium DNS value on an annual basis can help you judge whether an upgrade is justified.
A plain example
Consider an online course seller with its main website on one hosting account and a copy of the site on a second account in another region. The domain currently uses a DNS service with name servers in only one data center.
Scenario one: the single DNS data center has a network problem. The web servers are fine, but no resolver can reach the name servers, so the site cannot be found by anyone whose cached answer has expired. Failover rules would not help here, because nothing is available to apply them. A provider whose name servers are announced from many places would have kept answering.
Scenario two: the DNS is fine, but the primary web server runs out of disk space and stops serving pages. Anycast does not notice this. A health check against the site detects repeated failures and begins to answer with the address of the second hosting account. After caches expire, most visitors reach the copy instead.
The seller decides on a provider with widely distributed name servers and sets up health-checked records with a short TTL for the main site. Mail and verification records stay on ordinary settings, because they do not need to change during an outage.
Limits and what to watch for
- Cached answers delay every DNS-based switch. Some resolvers and devices hold records longer than the TTL says. Plan for a transition period rather than an instant cutover.
- Failover needs a working second destination. If the standby is out of date, misconfigured or running the same faulty software, switching to it only moves the problem.
- False alarms are possible. A health check from a few probe locations can mark a healthy server as down because of a network issue on the path. Look for options such as multiple probe locations and a failure threshold.
- Apply failover only to the records that need it. Mail records, verification records and records for other services usually should not flip automatically.
- Anycast is a provider feature, not a setting you control. You choose a provider whose design includes it, and then verify the claim on the plan page rather than assuming it.
- Do not confuse DNS resilience with a full recovery plan. Backups, monitoring, a documented runbook and tested restores matter just as much.
- Test regularly. A failover rule that has never been exercised may fail when you need it. Schedule a controlled test and watch how long the change takes to reach real users.
Summary
DNS failover and anycast are complementary, not competing. Failover changes the address your domain returns when a health check shows that a server is down, so it protects the destination of your traffic, and its speed is limited by TTL and caching. Anycast announces the same name server addresses from many locations so queries are answered nearby and the DNS service survives the loss of a site, but it does not know whether your website is healthy. Decide by listing your single points of failure, confirming that you have a real standby, and valuing outage time honestly. Then test the setup before you rely on it.
If you are also planning where to register and manage your domain, the domains page shows what is available alongside your DNS options.
Frequently asked questions
Is DNS failover the same thing as anycast?
No. DNS failover changes which IP address your domain returns when a health check shows that a server is down. Anycast is a routing technique that lets the same name server address be announced from many locations so a query reaches a nearby one. One protects the destination of your traffic, the other protects the DNS service itself.
Does DNS failover switch traffic instantly?
Not instantly. After the provider changes the answer, resolvers and devices may keep the old answer until the TTL expires, and some caches hold on a little longer. A short TTL shortens the delay but cannot remove it.
Do I need both failover and anycast?
They solve different problems, so some sites use both. A small site with one server and a modest audience may need neither. Decide by the cost of an outage and by whether you actually have a second server or location to fail over to.
Can anycast keep my website online if my web server crashes?
No. Anycast keeps the DNS answers available, but it does not know whether your web server is healthy. If the server is down, you still need a failover method, a load balancer or a second origin to send visitors elsewhere.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Ready to register your domain?
Search a name, compare extensions and pay once for the years you choose.
.com registration from $18.81 for the first year
Search domainsKeep reading

Domain & DNS Guides
What to Consider When Setting Up Multi-Region DNS Redundancy
Spreading DNS across regions can remove single points of failure, but it adds work. This guide covers what to decide, how to set it up and where it falls short.
10 min read

Domain & DNS Guides
How to Choose a DNS Provider for a High-Traffic Website
When traffic grows, DNS becomes part of your uptime story. This guide lists the criteria worth checking, a simple selection process and the limits of any DNS service.
10 min read

Domain & DNS Guides
How to Judge the Yearly Value of Premium DNS
Premium DNS is an insurance-style purchase, so its value is hard to see. This guide shows how to estimate downtime impact, compare features and review the result each year.
10 min read