DMARC aspf tag: what it does and when to change it
The aspf tag controls how strictly DMARC checks SPF alignment. Most people leave it at the default and that's usually fine. Here's when you might want to change it.
Youâre looking at a DMARC record and see aspf=r or maybe aspf=s. What does that mean? Should you change it?
Short answer: aspf controls how strictly DMARC checks whether your SPF authentication matches your From address. The default is relaxed (r), and for most organizations, thatâs the right choice.
But letâs actually understand whatâs happening.
What aspf does
DMARC has a problem to solve. SPF and DKIM each authenticate different parts of an email. DMARC needs to connect those authentication results to the address your recipients actually see: the From header.
This connection is called alignment.
The aspf tag specifically controls SPF alignment. It has two settings:
Relaxed (aspf=r): The SPF-authenticated domain and the From domain must share the same organizational domain. So mail.example.com aligns with example.com.
Strict (aspf=s): The domains must match exactly. mail.example.com does not align with example.com.
If you donât include aspf in your DMARC record, relaxed mode applies by default. This is defined in RFC 7489, the DMARC specification.
Why this matters
SPF validates the Return-Path domain (also called the envelope sender or MAIL FROM). This is a technical address that recipients never see. Itâs used for bounce handling.
The From header is what appears in your recipientâs inbox. Itâs the address they reply to.
Hereâs the problem: these two addresses can be completely different domains.
When you send through a third-party service like SendGrid, Mailchimp, or your helpdesk software, the Return-Path often uses the providerâs domain. They need this to process bounces on your behalf.
So SPF might pass for bounces.sendgrid.net, but your From address says yourcompany.com. Without alignment, DMARC would see this as a failure.
This is why alignment exists. And itâs why DKIM alignment usually matters more than SPF alignment in practice. We explain the full picture in our guide on DMARC, SPF, and DKIM alignment.
Relaxed vs strict: when each makes sense
Relaxed alignment (default)
Use relaxed alignment when:
- You send from subdomains like
mail.example.comormarketing.example.com - Your SPF record covers the root domain but emails come from subdomains
- You use third-party services that customize the Return-Path with subdomains
- Youâre not sure (itâs the safe default)
With relaxed alignment, as long as the organizational domains match, SPF alignment passes. newsletter.example.com aligns with example.com. support.example.com aligns with example.com.
According to Amazonâs DMARC compliance documentation, relaxed alignment provides the flexibility most organizations need, especially when using third-party email services.
Strict alignment
Use strict alignment when:
- You have tight control over your email infrastructure
- All your email comes from a single domain with no subdomains
- Youâre in a high-security environment that requires exact domain matching
- Youâve thoroughly tested that all legitimate email will pass
Strict alignment means mail.example.com does not align with example.com. The domains must be identical.
This is rarely necessary and often causes problems. If you send from subdomains or use any third-party services, strict SPF alignment will likely break things.
How to check your current setting
Run your domain through our DMARC checker. The results show your current aspf value, or note that youâre using the default (relaxed).
You can also check manually with dig:
dig TXT _dmarc.yourdomain.com +short
Look for aspf=r (relaxed), aspf=s (strict), or no aspf tag (defaults to relaxed).
How to change it
Your DMARC record is a DNS TXT record at _dmarc.yourdomain.com. To change the alignment mode, edit the record and add or modify the aspf tag.
Example with relaxed alignment (explicit):
v=DMARC1; p=reject; aspf=r; rua=mailto:[email protected]
Example with strict alignment:
v=DMARC1; p=reject; aspf=s; rua=mailto:[email protected]
Use our DMARC generator to build a properly formatted record with your preferred settings.
The aspf and adkim relationship
DMARC has two alignment tags:
aspffor SPF alignmentadkimfor DKIM alignment
They work independently. You can have relaxed SPF alignment with strict DKIM alignment, or any other combination.
For DMARC to pass, you need either SPF or DKIM to pass with alignment. Not both. This is why most organizations focus on DKIM alignment: it survives email forwarding, and you control the signing domain directly.
Our RFC 7489 specification guide covers all DMARC tags in detail, including the formal syntax and validation rules.
Common mistakes with aspf
Setting strict mode without testing
Someone reads that strict is âmore secureâ and enables aspf=s. Then their marketing emails start failing because the Return-Path uses a subdomain that doesnât exactly match the From header.
Before changing to strict mode, monitor your DMARC reports for at least 2-4 weeks. Look at the SPF alignment column. If you see legitimate email that would fail under strict alignment, donât switch.
Thinking aspf is required
If you donât include aspf in your DMARC record, relaxed mode applies automatically. You donât need to specify it.
v=DMARC1; p=reject; rua=mailto:[email protected]
This record uses relaxed SPF alignment by default. Adding aspf=r would be redundant.
Confusing SPF passing with SPF alignment
SPF can pass while SPF alignment fails.
Imagine an email where:
- Return-Path:
[email protected] - From:
[email protected] - SPF record for
sendgrid.netauthorizes the sending IP
SPF passes because the IP is authorized for sendgrid.net. But SPF alignment fails because sendgrid.net doesnât match yourcompany.com.
This is exactly why DKIM alignment matters more in practice. When you configure custom DKIM with your third-party sender, they sign with your domain, and alignment passes.
Practical recommendations
For most setups:
- Leave aspf at relaxed (or donât include it at all)
- Focus on DKIM alignment for third-party senders
- Monitor your reports before making changes
If youâre considering strict mode, enable DMARC monitoring first. Review at least 4 weeks of aggregate reports. Make sure all legitimate SPF results would pass strict alignment before switching. And have a rollback plan ready.
Check your SPF alignment
Use our DMARC checker to see your current aspf setting and whether your emails are passing SPF alignment.
If youâre seeing SPF alignment failures in your reports, the fix usually isnât changing aspf to strict. Itâs configuring DKIM with your third-party senders so you have a reliable alignment path.
For ongoing visibility, sign up for DMARCTrust and add your domain. Youâll see exactly which senders pass or fail SPF alignment and can make informed decisions about your configuration.