If you are using AWS Route 53 to manage your domains and DNS records, you may encounter a situation where the NS records of your registered domains and hosted zones are not consistent. This can cause problems with your domain’s DNS resolution and affect your website’s availability and performance. In this blog post, I will explain what are the NS records of registered domains and hosted zones, how they differ, and how to fix them if they are not aligned.
contact email: tcpfast@gmail.com
What are the NS records of registered domains and hosted zones?
NS stands for name server, which is a server that translates domain names into IP addresses. NS records are DNS records that specify which name servers are responsible for resolving a domain name.
There are two types of NS records that you need to be aware of when using Route 53: the NS records of registered domains and the NS records of hosted zones.
The NS records of registered domains are the ones that determine which DNS service provider should handle your domain name’s DNS requests, such as Route 53. They are stored in the top-level domain (TLD) servers, such as .com, .net, .org, etc.
The NS records of hosted zones are the ones that are generated by Route 53 and reflect the name servers that Route 53 assigns to your hosted zone. They are stored in the authoritative name servers, which are the name servers that provide the DNS resolution results for your domain name.
In simple terms, the NS records of registered domains are the entry point of your domain name’s DNS resolution, while the NS records of hosted zones are the exit point of your domain name’s DNS resolution.
How do the NS records of registered domains and hosted zones work together?
When a browser requests a domain name, such as tcpbuilder.com, how does it use the NS records of registered domains and hosted zones? The process is as follows:
The browser first checks the local cache or the hosts file to see if there is an IP address corresponding to tcpbuilder.com. If there is, it directly accesses that IP address. If there is not, it needs to perform a DNS resolution.
The browser sends a query request to the local DNS server (usually provided by the ISP), asking for the IP address of tcpbuilder.com.
The DNS server looks up the TLD of tcpbuilder.com (.com) and finds the corresponding root name server, and sends a query request to it.
The root name server returns the address of the top-level domain name server that is responsible for the .com domain, and the DNS server sends a query request to it.
The top-level domain name server returns the address of the authoritative name server that is responsible for the tcpbuilder.com domain, and the DNS server sends a query request to it.
The authoritative name server returns the IP address of the tcpbuilder.com domain, and the DNS server caches it and returns it to the browser.
The browser uses the obtained IP address to establish a TCP connection with the web server of the tcpbuilder.com domain, and sends an HTTP request.
In this process, the NS records of registered domains and hosted zones play different roles:
The NS records of registered domains are the ones that are recorded in the top-level domain name servers, and are used to specify the address of the authoritative name server for the tcpbuilder.com domain.
The NS records of hosted zones are the ones that are recorded in the authoritative name servers, and are used to specify the DNS records of the tcpbuilder.com domain, including IP address, alias, mail server, etc.
What if the NS records of registered domains and hosted zones are not consistent?
If the NS records of registered domains and hosted zones are not consistent, it means that your domain name’s DNS requests are not being sent to the correct DNS service provider, which may be Route 53 or your previous DNS service provider. This can cause problems such as:
Your domain name may not resolve to the IP address that you have configured in your hosted zone, which may result in your website being inaccessible or redirected to the wrong destination.
Your domain name may not support the features that you have enabled in your hosted zone, such as alias records, health checks, traffic policies, etc.
Your domain name may not be secure, as your previous DNS service provider may not support DNSSEC, which is a protocol that protects your domain name from DNS spoofing and other attacks.
Your domain name may not be compliant, as your previous DNS service provider may not follow the best practices and standards for DNS management, such as RFC 1918, RFC 2181, etc.
Therefore, it is important to make sure that the NS records of registered domains and hosted zones are consistent, and that they point to the name servers that Route 53 assigns to your hosted zone.
How to fix the NS records of registered domains and hosted zones?
To fix the NS records of registered domains and hosted zones, you need to update the NS records of registered domains to match the NS records of hosted zones. This way, your domain name’s DNS requests will be correctly sent to Route 53, instead of your previous DNS service provider.
The steps to update the NS records of registered domains are as follows:
Log in to the AWS Management Console, and navigate to the Route 53 service.
In the left navigation pane, choose Registered domains.
Select your domain, and then in the Details panel, click Add or edit name servers.
In the pop-up dialog box, enter the four name server values that are displayed in the NS record of your hosted zone, and then click Update.
Wait for the DNS changes to propagate on the Internet. This may take some time, depending on the TTL setting of your domain.
Use the Route 53 console or other tools to test your domain name’s DNS resolution and make sure it is correct.
You should not modify the NS records of hosted zones, as they are generated by Route 53 and reflect the name servers that Route 53 assigns to your hosted zone. If you modify the NS records of hosted zones, you may cause problems with your domain name’s DNS resolution.
You should only modify the NS records of registered domains to match the NS records of hosted zones. This way, your domain name’s DNS requests will be correctly sent to Route 53, instead of your previous DNS service provider.
Conclusion
In this blog post, I have explained what are the NS records of registered domains and hosted zones, how they differ, and how to fix them if they are not aligned. I hope this helps you understand and troubleshoot your domain name’s DNS resolution issues when using Route 53. If you have any questions or feedback, please feel free to leave a comment below. Thank you for reading.
Comments
Post a Comment