Looking for Senior AWS Serverless Architects & Engineers?
Let's TalkIn this article, we are going to cover ERR_NAME_NOT_RESOLVED on AWS Route 53. If you have any additional questions, please don’t hesitate to comment below.
Did you delete the hosted zone for your AWS Route 53 domain, create a new one, and then run into “ERR_NAME_NOT_RESOLVED” and “server IP address could not be found” on your browser?
Debugging (or skip to the solution)
I had signed up for the domain name example.com a while back using AWS Route 53. I asked myself, “What happens when you enter a URL in your browser?”.
First, the browser asks domain name servers, “hey, what’s the IP address for this domain?” That’s how far my browser got, because it said, “server IP address could not be found.”
So I wondered, “Why not? Which domain name servers did you look in?” Back in the Route 53 console, in the registered domains tab, I noted the four domain name servers for example.com. Then, in the hosted zones tab, in the record set of type NS for example.com, I looked at those four name servers.
The two lists didn’t match.
The AWS docs explain how this happened:
“When you create a hosted zone, Route 53 assigns a set of four name servers to the hosted zone. If you delete a hosted zone and then create a new one, Route 53 assigns another set of four name servers. Typically, none of the name servers for the new hosted zone match any of the name servers for the previous hosted zone. If you don’t update the domain configuration to use the name servers for the new hosted zone, the domain will remain unavailable on the internet.”
I had stopped using example.com, so I had deleted the hosted zone for a while.
Savings tip: Hosted zones cost $0.50 per hosted zone per month. — Source: Amazon Route 53 pricing
But when I tried to use example.com again by creating a new hosted zone for it, AWS had generated a new and different list of name servers.
The Solution
Copy the name servers list from the hosted zones tab’s NS record set into a note. Then go to the name servers list for example.com under the Registered domains tab of Route 53 and select Add or edit name servers. Copy the four names from your note one-by-one into that form and then save.
After saving, a banner says, “Your request for update name server was successfully submitted. You will receive an email when it is done.”
After a half-hour or so, my domain example.com worked again!