AWS – How to Fix ‘InvalidInput 400: Record Name Not Valid for Hosted Zone’

amazon-web-servicesdomain-name-system

I'm migrating a site currently hosted on github pages to AWS.

The site in question is on an aws instance, with an elastic ip of http://13.40.0.39/. The elastic IP does correctly show the site.

I want the domain www.whitewaterwriters.com to show the site. I created a hosted zone in root 53.

enter image description here

I changed the nameservers at my domain provider (qiq) and confirmed it later with whois: they have correctly changed. As per the screenshot I created a record to go to the correct IP address.

However, when I access the site I get "Hmm, We're having trouble finding that site' and using the Dig command I get server fail.

I tried 'test record' in AWS and got:

enter image description here

Error occurred
Bad request.
(InvalidInput 400: Record name 'https://www.whitewaterwriters.com/' is not valid for hosted zone: https\072\057\057www.whitewaterwriters.com\057.)

My question is: what causes this particualar error in AWS (which seems not to currently return any SE results)? and more generally, what would be the next step for debugging dns issues in AWS.

Best Answer

It turns out that's the error you get if you put the full 'https://www.serverfault.com/' into the hosted zone name rather than 'serverfault.com'. Now fixed.