Search code examples
amazon-web-servicesdnsamazon-route53

AWS route53 and dns setup


I registered domain with AWS and set Hosted Zone. inside the hostedzone i have NS with 4 records and SOA as a record type I added A record type and point it to EC2 public IP.

in browser i can not get response when type domain name.i got "This site can’t be reached"

search here and some people advice to check NS with dig command. dig command answered when i run in on Ec2 Ubuntu command but didn't get response when run it on my laptop. I have other sites on roure53 but new one doesn't work. any thought?


Solution

  • How did you registered the domain? Did you purchase it from a website and paid for it?

    From what you said, it seems the FIRST thing you did was creating a Hosted Zone in Route53. Let me explain.

    Usually when we purchase a domain from another website, after paying for it and everything we will need to tell the Domain Registrar to use the Name Servers and input a value like ns1.abcdomain.com and ns2.abcdomain.com . The purchase of a domain name usually comes with a free DNS service, so it will already have a valid name servers defined.

    If my guess is correct, you created a hosted zone in AWS Route 53 without actually paying and registering a domain with a registrar (AWS is also a registrar). Therefore the domain only exist in AWS world because you created a Hosted Zone.

    This explains why running dig on your EC2 provided the expected IP, because somewhere along the line the EC2 reaches AWS internal Route53 DNS service before reaching the public internet for DNS result.

    If you indeed paid AWS something like $12 to purchase a domain, you might have misunderstood their interface (which can be confusing sometimes) and missed appointing Route 53 to be the domain's Name Servers.