What are SPF records and how to set an SPF record

May 3, 2024 / How-to Guide

What are SPF records?

SPF (Sender Policy Framework) records are a type of DNS record that allows prevent email spoofing and phishing attacks by authenticating that the sending mail server is approved to send emails for a particular domain. SPF records identify which IP addresses or domains are permitted to send emails on behalf of a specific domain.

To set up an SPF record, you need to access your domain’s DNS settings via your domain registrar or DNS hosting provider.

How to set an SPF record?

Follow the general guidelines to set up an SPF record-

  1. Comprehend your Domain’s Email Infrastructure –
    Before setting an SPF record, ensure you understand the email services you use and the servers that send emails on behalf of your domain. This might contain your own mail servers, third-party email facilities, marketing automation platforms, etc.
  2. Create Your SPF Record –
    SPF records are TXT records in DNS. The syntax for an SPF record contains specifying which IP addresses or domains are allowed to send emails for your domain. You may use mechanisms like ‘a’ (for the domain’s A record), ‘mx’ (for the domain’s MX record), ‘include’ (to include SPF records from other domains), ‘ip4’ (for specifying IPv4 addresses), and ip6 (for specifying IPv6 addresses).Here is an example SPF record –

    v=spf1 include:_spf.example.com 
    include:thirdparty.example.net ip4:192.0.2.0/24 –all

    In the above example-

    1.  ‘ v=spf1 ’ identifies the SPF version.
    2.  ‘include:_spf.example.com’ includes SPF records from a different domain (e.g., your email service provider).
    3.  ‘include:thirdparty.example.net’ includes SPF records from a different domain (e.g., a marketing automation platform).
    4.  ‘ip4:192.0.2.0/24’ lets the specified IPv4 address range to send emails for your domain.
    5.  ‘-all’ specifies a strict policy to reject emails from sources not openly listed.
  3. Publish Your SPF Record –
    Once you have created your SPF record, you need to publish it in your domain’s DNS settings. This typically includes logging in to your domain registrar or DNS hosting provider’s website and adding a new TXT record with your SPF information.
  4. Testing –
    After publishing your SPF record, it is a worthy idea to test it to confirm it is working as expected. Many online SPF checking tools accessible can help you verify your SPF record’s syntax and effectiveness.
  5. Monitoring and Maintenance –
    Occasionally review and update your SPF record as your email infrastructure changes. Keep an eye on SPF-related email delivery matters and adjust your record accordingly.

By setting up and maintaining an SPF record, you can help protect your domain and recipients from email spoofing and phishing attacks while improving email deliverability. Should you encounter any issues, feel free to contact our support staff.

Dominos Search