25

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
  • 7,574
  • 39
  • 94
  • 156

2 Answers2

34

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
  • 813
  • 7
  • 9
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
  • 131