Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm finally fixing up my dns zone files in Gandi, which has a handy feature that lets me use the same zone file for several domains. So I can keep 1 zone file for a single domain and all its tld's.

But normally, when you set up the SPF record for eg domain.com, you don't actually add "mx:domain.com", because it's implied.

Will this thrown an error if you do?

Here's an example SPF record for domain.com.

The "correct" one:

v=spf1 mx mx:domain.info mx:domain.net mx:domain.org ~all

And here's the one I would like:

v=spf1 mx mx:domain.info mx:domain.net mx:domain.org mx:domain.com ~all

Is that allowed, or not?

share|improve this question
You should consider switching "~all" to "-all". That tilde lets everyone know you don't really know what you're configuring and some servers (like the ones I run) will hold it against you when raking your e-mail for spam. –  Chris S Aug 10 '12 at 2:10
Ah thanks, I'll look into it! –  skerit Aug 10 '12 at 18:27

1 Answer 1

up vote 6 down vote accepted

It's not implied. There's nothing implicitly assumed about what systems you want to authorize.

You're explicitly setting mx:domain.com by setting mx at the start of the record - they're functionally identical when the SPF entry is on domain.com.

That said, you should not run into any validation errors simply because you specify the same thing twice.

share|improve this answer
+1 But note that only 255 characters can be in a single SPF record... So if you own example.com for every TLD you'll run into problems. But that's somewhat unusual. –  Chris S Aug 10 '12 at 2:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.