SPF (Sender Policy Framework) is a DNS TXT record where you can specify which servers can send emails for your domain. This is an important DNS record as it protects your domain from spoofing. Before we show you how to add this DNS record to your DNS zone, let's look at what an SPF record needs.
Every SPF record consists of 4 main parts, and they are:
- SPF version,
- IP addresses that can send emails for your domain,
- Additions domains that can send emails for your domain and
- Policy tag that specifies what the recipient should do with an email that was sent from a server that isn't authorized:
- -all -- (fail) non-authorized emails will be rejected (recommended),
- ~all -- (softfail) non-authorized emails will be accepted but marked as SPAM,
- +all -- This tag allows any server to send email from your domain (now recommended).
v=spf1 ip4:123.123.123.123 include:additional-domain.com -all
Note:You can also write mx to limit the authorized sender to the server specified in the MX record.
Now, let's look at how you can add your SPF record to your DNS zone. First, you're going to need to log in to your mCloud portal and navigate to My Services and select mDNS:
Click on AnyCast, and there you can see your domains and a button to add a new domain:
Click on the domain you wish to edit the DNS zone for. On the right, you'll see an option for adding new records:
In the dropdown menu, select TXT as a new record type and then click Add, and a new window will open where you can enter the record:
The text area Name should remain empty, but enter your SPF record in the text area Content. Click on the Submit button, and the record will be saved.