Amazon Route 53 is a feature-rich and scalable DNS service offered by AWS. It helps you integrate your existing domain with your application/website servers that are hosted on AWS. How? By migrating your DNS service to Route 53, so that your domain points to Amazon’s name servers. It offers a wide range of benefits by connecting user requests to the system which includes Amazon EC2 instances, Elastic Load Balancing load balancers, or Amazon S3 buckets.
How to Host/Point Domain With AWS (Route 53)
The process of hosting your domain with AWS Route 53 is simple. Take a look at the step-by-step process to make Amazon Route 53 the DNS server for your domain:
Step 1: Create a Hosted Zone
You first need to create a hosted zone with the same name as your domain to let Amazon Route 53 know how you want to route traffic for your domain. The DNS records will be created in the hosted zone further.
Here are the steps to create a hosted zone:
- Log in to the AWS Management Console and go to the Route 53 console at https://console.aws.amazon.com/route53/
- Go to the Hosted zones section in the navigation pane and then select Create hosted zones.
- Enter the domain name in the Create Hosted Zone pane. Discover more about the settings by going to the help panel on the right side. See the DNS domain name format to get information about how to specify characters other than a-z, 0-9, hyphen (-), and internationalized domain names.
- Go with the default value of Public Hosted Zone for type.
- Complete the process by clicking on “Create Hosted Zoneâ€.
Route 53 will automatically create a name server (NS) record and a start of authority (SOA) record for the hosted zone. Make sure you don’t create additional name server (NS) or start of authority (SOA) records or delete the existing NS and SOA records.
Step 2: Create records
Now, you create records in the hosted zone that indicate how you want to route traffic for a specified domain name or subdomain name. Basically, you specify where you want the traffic to be routed to, through these records. Say you want to route traffic for example.com. and www.example.com. to a web server on an Amazon EC2 instance. In that case, you will have to create two records named example.com. and www.example.com. In both the records, you will specify the IP address for your EC2 instance.
There are different ways of creating records:
Creating records by importing a zone file
The simplest way for creating records on Amazon Route 53 is by obtaining a zone file from your current DNS provider and importing it to Route 53. This especially aids the process if you have a complex DNS configuration currently. When you import the root file, Route 53 will automatically reproduce the current DNS configuration by creating the corresponding records in your hosted zone.
In addition, Amazon Route 53 can’t predict when to create alias records or to use special routing types. Therefore, it creates standard DNS records using the simple routing policy when you import a zone file. Note that you can import a zone file and later edit your configuration. This helps you to take advantage of alias records and complex routing policies.
Creating records individually in the console
Route 53 enables you to create records manually in the console if your DNS provider doesn’t provide you with the zone file. Follow the steps to create records from the Route 53 console:
- Go to the “hosted zone details†screen by clicking on the name of the newly created hosted zone.
- Click on Create a Resource Record. A form will appear on the screen.
- Leave the Name field empty if you’re not configuring a subdomain.
- Fill in the type of DNS record in the Type field. Take a look at the most popular types of DNS records:
- A (Address) records: Used to associate a domain name or subdomain name with the IPv4 address of the corresponding resource.
- AAAA (Address) records: Used to associate a domain name or subdomain name with the IPv6 address of the corresponding resource.
- Mail server (MX) records: Used to route traffic to mail servers.
- CNAME records: Used for rerouting traffic from one domain name to another (example.net to example.com.)
- In the Alias field, pick Yes if you want to create a Route 53 alias record.
- Enter the IP address or some other Alias entry in the Value field if you have selected Yes in the Alias field.
- The routing policy will be “Simple†by default. Refer to the AWS documentation to know more about different routing policies and pick one based on your requirements.
Creating records programmatically
The DNS records can also be created by using one of the AWS SDKs, the AWS CLI, or AWS Tools for Windows PowerShell. See the AWS Documentation for more details.
Step 3: Lower TTL Value for the NS record
TTL or Time-to-Live setting for a DNS record specifies the time for which you want DNS resolvers to cache the record and use the cached information. After TTL expires, a DNS resolver sends another query to the service provider and gets the latest information. Typically, the TTL setting for the NS record is 172800 seconds or two days. The NS record identifies the name servers that the DNS can use to get information about how to route traffic for your domain.
Lowering the TTL value is essential as it reduces downtime for your domain if you discover an issue while migrating DNS service to Route 53. Thus, you need to lower the TTL for the NS record both with your current DNS service provider and with Amazon Route 53.
Lowering the TTL setting on the NS record with the current DNS service provider
- Get in touch with the customer support of your current DNS service provider to know how you can change the TTL for the NS record in the hosted zone for your domain.
- Use the method provided by the current DNS service provider and change the TTL to a lower value.
Lowering the TTL setting on the NS record with Amazon 53
- Log in to the AWS Management Console and go to the Route 53 console at https://console.aws.amazon.com/route53/
- Go to Hosted Zones in the navigation pane.
- Select the name of the hosted zone.
- Select the NS record, and click on the Edit option.
- Change the value of TTL (time in seconds). It is recommended to specify a value between 60 seconds (1 minute) and 900 seconds (15 minutes).
- Save your changes
Step 4: Remove the DS record from the parent zone
If you have configured DNSSEC for your domain, you need to remove the Delegation Signer (DS) record from the parent zone. This needs to be done before you migrate the DNS service for your domain to Route 53. Otherwise, you will have DNSSEC signing enabled across two providers, which is not possible. Removing the DS record from the current registrar signals DNS resolvers to disable DNSSEC validation temporarily. You can re-enable DNSSEC validation after you have migrated to Route 53.
Step 5: Wait for the old TTL to expire
After lowering the TTL setting for the NS record, you also need to wait for the old TTL to expire. This is because the DNS resolvers have cached the names of the name servers that were provided by your current DNS service provider until your domain is in use. The cached information will be saved by the DNS resolver for two days. Consequently, you need to wait for that information to expire after you lower the TTL.
After the old TTL expires and DNS resolvers request for the name servers for your domain, they will get the current name servers and will also get the new TTL.
Step 6: Update the Name Server records to use Route 53 name servers
To start using Amazon Route 53 as the DNS service for your domain, update the current name servers in the NS record with Route 53 name servers.
To update the NS record at the registrar, or the parent zone, to use Route 53 name servers
- In the Route 53 console, get the name servers for your hosted zone:
- Log in to the AWS Management Console and go to the Route 53 console at https://console.aws.amazon.com/route53/
- Go to Hosted Zones in the navigation pane.
- Select the name of the applicable hosted zone.
- Note the names of the four Name servers listed in the “Hosted zone details†section.
- Get in touch with your current DNS provider to know the method to update the NS record for the hosted zone. Use this method to update the name servers and change them to the ones listed in the “Hosted zone details†section. Follow the below-mentioned steps to update the name servers:
- Note the names of the current name servers listed in the NS record for the hosted zone. You will need to specify them if you need to revert to the current DNS configuration.
- Remove the current name servers from the NS record.
- Update the NS record the names of Route 53 name servers that you noted from the “Hosted zone details†of the Route 53 console.
- There are some DNS service providers that don’t allow you to delete name servers from the NS record. In that case, follow these steps:
- Choose the option to use custom name servers.
- Add all the four Route 53 name servers that you noted from the “Hosted zone details†of the Route 53 console.
Step 7: Monitor traffic across all channels for the domain
This step is critical to ensure that the process of shifting the name servers hasn’t affected the traffic. Thus, you need to monitor traffic for the domain, including website or application traffic, and email.
If the traffic slows significantly or stops, change the name servers back to the previous name servers through the method provided by the previous DNS service. You’ll see your traffic getting back on track after this. Then, find out what went wrong and fix it.
If the traffic is unaffected after the previous step, move forward with the next step.
Step 8: Set the TTL for the NS record Back to a higher value
Once you are able to use Route 53 servers successfully, change the TTL for the NS record back to the typical value. For instance, 172800 seconds or two days is a good value for TTL for the NS record. It ensures that your users don’t have to wait for DNS resolvers to send a query for the name servers for your domain. Put simply, it improves latency for your users.
Follow the steps mentioned below to change the TTL for the NS record in the Route 53 hosted zone:
- Log in to the AWS Management Console and go to the Route 53 console at https://console.aws.amazon.com/route53/
- Go to the Hosted Zones section in the navigation pane.
- Select the name of the hosted zone.
- Select the NS record from the list of records for the hosted zone.
- Choose the Edit option.
- Set the TTL (Seconds) to the time in which you want DNS resolvers to cache the names of the name servers for your domain periodically. As discussed before, a value of 172800 seconds is good.
- Save your changes.
After completing these steps, you will have successfully migrated the DNS service for your domain to Amazon Route 53. In addition, you can also transfer registration for the domain to Route 53, if desired. You can also re-enable DNSSEC signing in simple steps with Route 53.
- If you want to get the best cloud hosting, click here and get the suitable one.