unable to create txt record using amazon route 53

21

I can't add the following TXT record to my Route 53 DNS config:

v=msv1 t=whatever

Doing so produces the following error:

The record set could not be saved because: - The Value field contains invalid characters or is in an invalid format.

If I do just v=msv1 I get the same thing. Doesn't even seem to work without the v=.

Maybe the t is supposed to go in the Name field and the v is supposed to go in the Value field?

neubert

Posted 2013-03-27T16:27:43.597

Reputation: 3 991

Answers

30

From the Route 53 admin page when adding a TXT record set:

A text record. Enter multiple values 
    on separate lines. Enclose text in 
    quotation marks.
Example: 
    "Sample Text Entries" 
    "Enclose entries in quotation marks"

Johnny

Posted 2013-03-27T16:27:43.597

Reputation: 763

1While you enter it into Route 53 as a "single" TXT record, it is served as multiple TXT answers in a DNS query, as you would expect. Wish AWS made that more clear in their documentation. – WaldenL – 2017-03-28T16:55:49.770

2If you're creating a TXT record for DKIM on Google Apps for Domains like I was, it worked for me to wrap the entire block in a set of quotes (not separate quotes for each portion of the record.) – richardkmiller – 2013-10-30T20:49:49.723

2

If you use the API or Ansible Route53 module, and you need to set the value on separated lines (e.g. SPF + domain verification). For instance:

"v=spf1 include:mail.zendesk.com ?all"
"google-site-verification=
rXOxyZounnZasA8Z7oaD3c14JdjS9aKSWvsR1EbUSIQ"

Then the value should look like:

For API:

'"v=spf1 include:mail.zendesk.com ?all" "google-site-verification= rXOxyZounnZasA8Z7oaD3c14JdjS9aKSWvsR1EbUSIQ"'

From AWS Route53 doc:

A TXT record contains a space-separated list of double-quoted strings

For Ansible:

'"v=spf1 include:mail.zendesk.com ?all", "google-site-verification= rXOxyZounnZasA8Z7oaD3c14JdjS9aKSWvsR1EbUSIQ"'

Multiple comma-spaced values are allowed for non-alias records.

BTW: you can verify the validity of your SPF record using a tool like mxtoolbox.

Cheers, Mickael

Mickael

Posted 2013-03-27T16:27:43.597

Reputation: 131