Skip Navigation

Scott Spence

Adding multiple SPF records with Vercel

2 min read
Hey! Thanks for stopping by! Looks like this post was updated about 1 year ago. Just bear in mind it was originally posted over 1 year ago. If there's anything in here which doesn't make sense, please get in touch.

So, I just found that the SPF record on my Fastmail account for was throwing a verification error. I didn’t really know what the SPF record was for until this point and I had to research why it was failing on Fastmail.

So, I did a post the other week on Adding DKIM records to Vercel this is what I used to validate my domain for sending the newsletter. I just followed the directions and didn’t know that adding an additional SPF record would invalidate the previous one for Fastmail.

There’s a good explanation on the UK Government site for Email Security Standards with guidance on it. There was also a Stackoverflow post I found on it!

So, looking at the DNS entries on Vercel (with the Vercel CLI command vc dns, there’s two TXT records:

v=spf1 mx ~all
v=spf1 ?all

The Sendinblue one is first in the list so that one wins!

I had to remove both the records (with the Vercel CLI command vc rm rec_fromTheVercelCLIOutput) and replace them with a combined one:

vc dns add @ TXT 'v=spf1 mx ~all'

That’s it! I hope this helps someone else out there!

UPDATE: I had a spam email spoofing my domain and I had to adjust the SPF record again. I found a SPF record checker via a linked post on the SO question I mentioned above.

The SPF checker found errors with the modifiers in the record. I had ?all modifier after the first record, I removed that and re-checked on the SPF checker and it was all good.

I chose the most restrictive qualifier for the “all” mechanism. In my case, I used ~all (soft fail) instead of ?all (neutral).

You can find the post on DMARCLY for Can I have multiple SPF records on my domain.

There's a reactions leaderboard you can check out too.

Copyright © 2017 - 2024 - All rights reserved Scott Spence