I have a nextjs static site I am hosting on S3 and serving with cloudfront. I have already validated that the website works fine with the cloudfront url. The problem arises when trying to connect it to my domain I have registered in route53. If it makes a difference, I originally created the domain with bluehost and then transfered over to aws.
dig NS <my-domain>
returns SERVFAIL instead of the nameserversI tried following this article pretty closely but seems I'm still missing something: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html
www.<my-domain>.com
and <my-domain>.com
www.<my-domain>.com
-> cloudfront distwww.<my-domain>.com
-> cloudfront dist<my-domain>.com
-> cloudfront dist<my-domain>.com
-> cloudfront dist<my-domain>.com
and *.<my-domain>.com
Is there anything I am missing that is causing the dns to not resolve? Let me know if I need to provide more info.
dig NS <my-domain>.com
or www.<my-domain>.com
returns SERVFAIL instead of the nameserversThe missing piece that prevented DNS resolution was that the NS records, hosted zone details name servers, and glue records in the domain registration page were not identical when they should be. They got out of sync after I tried re-creating my hosted zone and editing the NS records while troubleshooting.