23

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?

2 Answers 2

33

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"
2
  • 2
    If 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.) Oct 30, 2013 at 20:49
  • 1
    While 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
    Mar 28, 2017 at 16:55
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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .