skip to Main Content

I have updated the TXT (SPF) records in my domain hosted DNS without the space.

I have tried to check the updated the TXT record in the linux terminal using the dig and host commands, but I’m seeing extra white space in the updated record.

For example:

The updated record in the DNS:

"v=spf1 spf.protection.outlook.com 1.2.3.4 -all"

But the output getting in the terminal using the command "dig txt domain.com +short"

"v=spf1 spf.protection. outlook. com 1.2" "3.4 -all"

checked with all type of OS platform terminals (Linux-CentOS, Ubuntu,Windows-CMD, Mac OS terminal).

Note: I have tried to eliminate the space using the sed command and it has worked.

I just want to confirm where the issue is, whether it is from the DNS provider or elsewhere.

2

Answers


  1. DNS has a limit in the amount of text it will allow in a single string, however, you can work around this by breaking it up into multiple double-quoted, space-separated strings according to the standard defined by RFC4408 section 3.1.3:

    For example:

     IN TXT "v=spf1 .... first" "second string..."
    

    MUST be treated as equivalent to

     IN TXT "v=spf1 .... firstsecond string..."
    

    It’s common to see this in large records, especially DKIM keys and long SPF records. It looks like your provider is possibly doing this automatically, and is nothing to worry about, so long as you’re not creating records that are nearing the 512-byte limit.

    Login or Signup to reply.
  2. you can use one of online SPF record lookup tools to troubleshoot various issues with SPF record, e.g. this one -> https://easydmarc.com/tools/spf-lookup

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search