SPF (Sender Policy Framework) is a simple technique that helps other mail servers - in other words, everyone you send email to - to check that the email they receive from your email addresses has infact come from a legitimate, trusted source.
This helps to prevent spammers and other internet bad guys from pretending to send emails from your domain, when they're in fact sending from somewhere else altogether.
Generic Instructions / External DNS hosting
Please refer to this table for the SPF records you'll need to create. If you're not sure how to do this, or don't have access to make these changes, contact the administrator who hosts your DNS nameservers.
|Hostname, TTL and Type||Value / Record|
|Blank or @, 86400, TXT||v=spf1 include:_spf.google.com ~all|
It is strongly recommended to have only one SPF record. Multiple SPF records may cause mail delivery problems. If you want to add additional information, it is best to concatenate all of the information into a single, custom record.
Some Notes about SPF
- It's easiest to copy and paste the record above - feel free to do so!
- Some DNS nameservers may provide SPF as its own record type, separate to TXT. Such records are deprecated and are no longer standards compliant. When setting up SPF, you should always and only use TXT records.
- Note the use of the tilde (~, or the "squiggly line") for the "all" mechanism at the end of the record. Using a hyphen (eg: -all) is valid also, but may cause SPF to be more "strict".
- Some DNS providers may require you to place the SPF/TXT data in quotes, eg "v=spf1 ... ~all". Others may do this automatically for you.
- This record is not gospel. Some people may need to make customisations to their SPF record for various reasons, and this is perfectly OK. However: A malformed SPF record can cause problems. Customising your SPF record should be considered an advanced topic and be performed by someone with a solid understanding of SPF.
Crucial Hosting with cPanel
If you're hosting with Crucial, you can update your SPF record via cPanel.
First, go to your cPanel. It may differ, but you can likely access it by going to www.your.domain/cpanel
After logging in, select Advanced Zone Editor under the Domains heading.
Inside the Advanced Zone Editor, you may either add the new SPF (TXT) record, or edit the existing one if present. Look through the list first, as it's likely that you already have one.
When complete, it should look something like this: