On import, it appended my domain name to all the CNAME records #39

treeder opened this Issue Sep 10, 2012 · 7 comments


None yet

4 participants

treeder commented Sep 10, 2012

If this was in the zone file:

gdocs   3600    IN  CNAME   ghs.google.com

It ended up like this in Route 53:

amix commented Sep 11, 2012

I can confirm this bug as well :-/


I can confirm this is a bug.. in your zone files! ;)
Records must be terminated with a period, otherwise they are relative records.
"Domain names in the zone files can be one of two types, either
absolute or relative. An absolute name is the fully qualified domain
name and is terminated with a period. A relative name does not
terminate with a period, and the current default domain is appended
to it. The default domain is usually the name of the domain that was
specified in the boot file that loads each zone."

@barnybug barnybug closed this Sep 11, 2012
treeder commented Sep 11, 2012

hmmm, ok, well that's direct export from GoDaddy. Perhaps you could at least supply a flag that would not append the domain like import --no-append or something.


Suggest either manually fix file or running perl over the GoDaddy export to fix, this should do the trick:
perl -pe 's/(CNAME .+)(?!.)$/$1./i' broken.txt > fixed.txt

I'll add a note to the README.

jdunck commented Dec 27, 2012

FWIW, I had this same issue exporting from one account's route53 and importing to another. I checked my source zonefile (not the export from cli53 export, but the route53 api response) and confirmed it was missing the period. It turns out to be my fault: I have cnames without the trailing period -- which have worked, apparently, all this time, despite being wrong.

I'd suggest changing the readme (which I read, but skipped the relevant section due to GoDaddy mention) to instead note that it's useful to check whether exported cnames are defined correctly (that is, with either a trailing period or intentionally relative).

jdunck commented Dec 27, 2012

Also, the regex is not quite right - it didn't allow for hostnames with hyphens:
perl -pe 's/(CNAME\s+[-a-zA-Z0-9.-]+)(?!.)$/$1./i'
rather than
perl -pe 's/(CNAME\s+[a-zA-Z0-9.-


Please sent patch to docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment