Suped

What SPF mechanism includes the A records of a domain?

When you're setting up email authentication, understanding the different parts of an SPF record is crucial. SPF, or Sender Policy Framework, is a type of DNS record that helps prevent email spoofing by specifying which mail servers are authorized to send email on behalf of your domain. As Kinsta puts it, an SPF record is a TXT record containing a list of authorized mail servers. These records are made up of different components called "mechanisms".

The specific mechanism that includes the A records of a domain is simply called the a mechanism. It's one of the most common and fundamental parts of an SPF record, especially for businesses that send email directly from their own web servers.

www.duocircle.com logo
DuoCircle says:
Visit website
The “a” mechanism: The sending IP address that matches the “A” record of the “from” domain will pass the SPF.

The a mechanism works by checking if the IP address sending the email matches one of the A records for a particular domain. An A record, or Address record, maps a domain name to its corresponding IP address. So, if your website is hosted at an IP address, the a mechanism in your SPF record tells receiving email servers, "If an email comes from this IP address, it's legitimate."

You can use this mechanism in two ways:

  • a: When used by itself, it checks against the A record of the domain the SPF record is published on. For an SPF record on example.com, this would check the sending IP against the A record for example.com.
  • a:domain.com: When you specify a domain, it checks the sending IP against the A record of that specific domain instead of the current one.
Suped DMARC monitor
Free forever, no credit card required
Get started for free
Trusted by teams securing millions of inboxes
Company logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logo

Other mechanisms involving A records

While the a mechanism is the most direct way to reference an A record, other SPF mechanisms also rely on A record lookups. It is important not to confuse them.

autospf.com logo
AutoSPF says:
Visit website
The Exists SPF record syntax does a DNS A record search for the domain provided. A successful match is achieved only if a valid A record is located and that's ...

The mx mechanism: This authorizes the mail servers listed in your domain's MX records. To verify this, the receiving server first looks up your MX records to get the hostnames of your mail servers, and then it performs an A record lookup on those hostnames to get their IP addresses. So, it indirectly uses A records.

The exists mechanism: This is a more complex mechanism. It checks if an A record simply exists for a given domain; it doesn't try to match the sending IP address. If any A record is found for the queried domain, the check passes. This is useful for more dynamic or complicated email setups.

The include mechanism: This one is often misunderstood. The include mechanism does not directly use A records. Instead, it delegates the check to another domain's SPF policy. The receiving server will go and check the SPF record of the included domain and evaluate its mechanisms. As explained by NsLookup.io, this mechanism is used when you need to authorize a third-party service to send email on your behalf.

Example in a full SPF record

In a real-world scenario, you will combine multiple mechanisms to create a complete SPF record. A simple but effective SPF record for a small business that sends email from its web server and its mail server might look like this:

v=spf1 a mx ~all

Here's a breakdown:

  • v=spf1: Declares the TXT record as an SPF record.
  • a: Authorizes the server found at the domain's A record.
  • mx: Authorizes the servers listed in the domain's MX records.
  • ~all: This is a qualifier that suggests that any email from sources not listed should be treated with suspicion (a SoftFail).

In conclusion, the a mechanism is your go-to tool for authorizing emails sent from your domain's primary IP address. It directly links your email sending authority to your domain's A record, providing a clear and straightforward signal to receiving mail servers. Properly configuring it alongside other necessary mechanisms is a key step towards securing your domain's email and improving deliverability.

Start improving your email deliverability today

Get started