Setup & how-to

Setting up an SPF record

You set up an SPF record with a single TXT record in your domain's DNS management. With it you specify which servers may send email on behalf of your domain. Receiving servers use that as a guest list: if the sender is on it, the mail is trusted; if it isn't, your message ends up in the spam folder faster. Setting it up takes a few minutes, and you don't need a technical background for it.

By the Mailflux team Published on

What you need

  • A Mailflux mailbox on your own domain.
  • Access to the DNS management at your domain registrar or hosting provider.
  • The exact SPF value for your domain. It's ready in your Mailflux account. The value is domain-specific, so copy it literally and don't make anything up yourself.
Email on your own domain

Setting up an SPF record: step by step

  1. Log in to your domain registrar and open the DNS management.
  2. First check whether an SPF record already exists: a TXT record whose value begins with v=spf1. You may only have one per domain.
  3. None yet? Then click Add record and choose TXT as the type.
  4. For Name (or Host), enter the character @, or leave the field empty if your registrar expects that.
  5. For Value, enter the SPF text you copy from your Mailflux account. The form is v=spf1 include:... -all, but you take the exact content from your account.
  6. Save the record.
  7. Was there already an SPF record for another service? Then don't create a second one. Add the Mailflux reference to that one record, so both senders are in it.

The ending of your SPF record counts. -all means: only the servers on the list may send, the rest is refused. If you're unsure about the details, what is SPF calmly explains how it works. How SPF relates to the other records, you'll read in email DNS records explained.

Why you may only have one SPF record

This is the pitfall most people run into, so pay attention: your domain may only have one SPF record. If, besides Mailflux, you also send mail via another service (a newsletter tool or a webshop, say), then you put all those senders together in that one record. In practice that means: you take the existing value, add the Mailflux include to it, and keep just one v=spf1 at the start and one -all at the end. Two separate SPF records make the record invalid, and then the protection works for neither.

Another point of note: SPF has a limit of ten lookups. If you have many different senders, you can hit that limit. If you notice that your SPF no longer validates while everything is correct, that's often the cause. In that case, feel free to get in touch and we'll take a look with you.

Checking whether it worked

Once the change has propagated, you can use an online SPF check to see which record the rest of the world sees for your domain. If it shows exactly the value you entered, with one v=spf1 and one ending, you're good. Then send a test email to an address at another provider and check that it arrives neatly in the inbox.

Not working?

  • Your mail ends up in the spam folder. The SPF change may not have propagated yet. Give it up to 24 hours.
  • There are two SPF records. That makes SPF invalid. Merge everything into one TXT record that begins with v=spf1.
  • The include is wrong. Compare the value character by character with what's in your Mailflux account; a missing space or dot is enough to break it.
  • You use ~all instead of -all. Both work, but -all is stricter and protects better. Follow what Mailflux indicates.

Almost done

Once your SPF record is active, your mail is seen as more trustworthy and more often lands straight in the inbox. If you haven't done the MX records yet, do those first via setting up MX records. Going to use your mailbox in a program too? Then the details are ready at the IMAP server settings. Can't figure out your DNS? Let us know, we're happy to help further or set it up for you.

Want to do it yourself?

Follow our step-by-step guide, or let us help you get set up personally.

Read the guide