Search code examples
amazon-web-servicesamazon-route53

Domain not working after domain migration


I used AWS CLIv2 to transfer domain from one AWS account to another account. The domain transfer was successful. After that, I deleted my hosted zone from my previous AWS account. In my second AWS account, I created hosted zone and provided my domain name. The AWS provided me with the parameters (NS and SOA) When I compare the NS of hosted zone to the Name Servers of registered domain they were different.

Also, the new hosted zone created using Route53 on the new AWS account is also unable to resolve DNS. When i run

dig +trace example.com

It shows the following output.

;; Received 1177 bytes from 192.58.128.30#53(j.root-servers.net) in 303 ms
example.com.    172800  IN  NS  ns-xx.awsdns-xx.com.
example.com.    172800  IN  NS  ns-xx.awsdns-xx.net.
example.com.    172800  IN  NS  ns-xxxx.awsdns-xx.org.
example.com.    172800  IN  NS  ns-xxxx.awsdns-xx.co.uk.

However, when i run

dig ns example.com

It shows the

; <<>> DiG 9.16.1-Ubuntu <<>> ns example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 15912
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;example.       IN  NS

;; Query time: 1787 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: शुक्र फरवरी 11 09:08:22 +0545 2022
;; MSG SIZE  rcvd: 46

on command line.

I am confused as i think the DNS NS record and Domain Name server record should be same. But in this case, as they are different, the DNS is unable to resolve the domain to the proper address. How can i resolve this issue?


Solution

  • Thanks to @kaustubh-khavnekar, That indeed helped me with the answer. Thank you.