Free Managed IT Consultation, Virtual & On-Site. Get Started Now!
Dominick Fair

Dominick Fair

Chief Technology Officer

Route 53 failover configuration

40043522 xxl scaled

Amazon Route 53 lets you configure DNS failover in active-active, active-passive, and mixed configurations to improve the availability of your application. When you have more than one resource performing the same function—for example, more than one HTTP server or mail server—you can configure Amazon Route 53 to check the health of your resources and respond to DNS queries using only the healthy resources. For example, suppose your website,, is hosted on 10 servers, two each in five data centers around the world. You can configure Amazon Route 53 to check the health of those servers and to respond to DNS queries for using only the servers that are currently healthy.

You can set up a variety of failover configurations using Amazon Route 53 alias, weighted, latency, geolocation routing, and failover resource record sets:

  • Active-Active Failover: Use this failover configuration when you want all of your resources to be available the majority of the time. When a resource becomes unavailable, Amazon Route 53 can detect that it’s unhealthy and stop including it when responding to queries.
  • Active-Passive Failover: Use this failover configuration when you want a primary group of resources to be available the majority of the time and you want a secondary group of resources to be on standby in case all of the primary resources become unavailable. When responding to queries, Amazon Route 53 includes only the healthy primary resources. If all of the primary resources are unhealthy, Amazon Route 53 begins to include only the healthy secondary resources in response to DNS queries.
  • Active-Active-Passive and Other Mixed Configurations: You can combine alias and non-alias resource record sets to produce a variety of Amazon Route 53 behaviors.

NOTE: When you first acquire a domain name from a Registrar like or you must host the DNS Zone file with Route 53 in order to use Amazon’s DNS failover. You can now purchase domains directly from Amazon. Once you create a Hosted Zone, you will receive the Name Servers your domain name must point to. You can change your domain’s name servers under the registrar’s management console. For this tutorial I will be using as my primary domain name and will be configuring failover for

Today we will be using a Active-Passive Configuration. This is a great way to ensure access to your AWS hosted application. You typical want to host your applications in 2 different locations.  You can host your amazon resources in multiple locations world-wide. These locations are composed of regions and availability zones. Each region is a separate geographic area. Each region has multiple, isolated locations known as availability zones. These availability zones are different data centers that are located under a certain region.

You will first begin by logging into your AWS Account and accessing the main AWS Console Page. We will be using Amazon’s Route 53 Service for DNS Failover.

Once you Select Route 53, You will need to go into DNS management, Here you will create a Hosted Zone.

Next you will select “Create Hosted Zone” and configure your  “Domain Name” and “Comment”. The comment section can be used as a note.

Remember to choose “Public Hosted Zone” when choosing the zone type. Public Zone and Private Zone are the two types of zone available when choosing the type.

Public Zone: A Public hosted zone is a container that holds information about how you want to route traffic on the Internet for a domain, such as, and its subdomains (,

Private Zone: A Private hosted zone is a container that holds information about how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds

After you create a Hosted Zone for your domain, a “Delegation Set” of name servers will appear. These are the name servers your domain will point to under your registrar’s management console. Once your domain name servers are configured with your registrar there might be a replication period or wait for this to take effect.

Once your Hosted Zone File is created you will then create 2 separate A records under your hosted zone. You can create DNS records by selecting “Create Record Set” under your hosted zone. For this Example I will be creating two separate A records, and www will be my primary website using IP, www2 will be my secondary website or failover website using an IP of I’m using internal IP addresses for this demonstration but typically you would use a public IP address or elastic IP address. Even though we are creating www and www2 the end-user will never see www2 in their address bar. www2 is created so that Route 53 knows which is the primary IP address and the secondary IP address. When creating these records ensure the routing policy is simple for both records and the TTL is lowered to 60 seconds.

Primary Website ( A Record

Secondary Website ( A Record

Now that you have created both A Records you Zone file should look like this.

Now we will create the website health checks. The Health Checks page is under “Hosted Zones” on the left toolbar. Here we will create our first health check.

Route 53 Health Checks can monitor various protocols including HTTP, HTTPS, and TCP. You can also monitor a domain name or even an IP address. you also get other options like “Enable String Matching” where the monitor will search for a specific string on the domain. These are all different variables that you can configure on your Route 53 health check. For this instance we will be using HTTP as our main protocol, and will be monitoring an IP address instead of a domain name. We will also change the request interval to fast instead of standard. All other options are left as default including the failure threshold. Again, I’m using internal IP addresses for this demonstration, typically you would be using a public IP address.

Note: If you try to continue with the IP address You will receive an error stating this is forbidden. You should be using public IP Addresses. 

You can also configure an alarm where CloudWatch sends you an Amazon SNS notification whenever Route 53 health checkers consider the endpoint unhealthy for one minute.

Once the Health Check is created we will go back to the Hosted Zone Next we need to edit and create a new record set. First we will edit the primary A Record for Change this record’s routing policy from simple to failover, once this is done you should notice the Set ID says www-Primary. Lastly, we will need to associate this alias with the health check that we created earlier. Use the following image below for a guideline.

Once the primary record is finally configured, we will  need to configure the secondary Record. First you will create a new record and name it Make sure this record is configured as an alias, so don’t forget to select alias under the record type. Secondly, you will choose the Routing Policy as failover, then you will notice the SET ID will change to www-Secondary. These are all the settings that are needed in order to configure Route 53 failover.

When done your DNS Hosted Zone records should look like this below.


Primary Website:                                       Secondary Website:

Northern Virginia Region                               Northern California Region
IIS8 – Medium Instance                                 IIS8 – Medium Instance
IP:                                                   IP:

I currently have IIS8 running on an EC2 instance in the Northern Virginia region, I have another EC2 instance running a second copy of our website in the Northern California region. Both Servers have configured bindings to respond to, The only configuration difference between both servers is that one server has a binding IP address of and the other server has a binding IP address of When users go to, Route 53 will see that I have the routing policy on configured as failover. As long as my primary website is up and running users will get the SET-ID www-Primary record, since that is the primary record for So if my primary website is operational users will get DNS for as If there was an outage and the primary server in Northern Virginia region is no longer available, the health checks will notice the server is no longer operational and Route 53 will start issuing the SET-ID www-Secondary record to users instead of the www-Primary record. This means that once the Health checks are aware of the outage, Route 53 will start issuing the www-Secondary SET-ID IP address. So now users will be getting with an IP address of instead of the primary address of This change tends to happen fairly quickly, this is why we set the TTL or Time to Live for the record to 60 seconds so users have to update frequently.

DNS will not fail back automatically once the primary server is back. The previously known secondary server is now known as the primary server since that is where users are being directed. The easiest way to fail back to the primary server is to take down the secondary website or reboot the server. Basically, you have to cause the secondary server to go down so that the same process will happen over but in reverse. Now you will be going from your secondary server to your primary server. Once you get the secondary website to go down and the the health check notices that the primary website is up and running, Route 53 will change DNS to use the www-Primary SET-ID and start giving users the primary IP address.

I hope this was helpful with your DNS failover configuration. If you have any questions please feel free to email Thank You.

Dominick Fair

Chief Technology Officer

Having IT issues?

Try our FREE AI-powered 
help desk. No login required.


Need a quick fix?

No Credit Card Needed

Try our FREE AI-powered tech support

Describe the problem you are facing. Be friendly, descriptive.
Remember that AI can make mistakes.
If you’re having an IT emergency, please contact us.

SADOS AI can make mistakes. Consider contacting us for critical IT issues.

You may also like...


What Does a Content Delivery Network Do?

If you’re interested in optimizing your company’s website to improve page load speed, boost security, or lower your bandwidth cost, using a content delivery network will help.

computer security 1

6 Steps to Surviving an IT Emergency

When you operate your own business, your IT system is your lifeline. That’s why it’s important to be prepared for an IT emergency.

News to your inbox

Keep tabs on what’s happening in the world of technology. We’ll send you new posts to your inbox

We’re committed to your privacy. SADOS uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy.
IT Support by SADOSSecure, Fast Hosting for WordPress