Last updated: October 2026
Email was designed without a way to verify who the sender really is. Because of this, anyone can send a message that looks like it comes from management@yourcompany.com without having access to your account. This is called email spoofing, and it's the basis of many scams: fake payment requests, fraudulent vendor bank-account changes, and phishing links sent "on behalf of" your brand.
Three DNS records you publish on your domain let receiving servers check whether an email is legitimate: SPF, DKIM, and DMARC. This guide explains what each one does, how to check your current status, and how to fix it without interrupting your email.
1. What happens if your domain isn't protected
- Third parties can send emails that appear to come from your company and reach customers, vendors, and employees.
- Your own legitimate emails may end up in the spam folder, because providers distrust domains without authentication.
- Since 2024, Google and Yahoo require SPF, DKIM, and DMARC from anyone sending large volumes of email (more than 5,000 messages a day) to their users. Even if your company sends fewer, it is now the expected baseline practice.
2. SPF: who can send email on behalf of your domain
SPF (Sender Policy Framework) is a TXT-type DNS record that lists the servers authorized to send email on behalf of your domain. It is published at the domain root and looks like this:
v=spf1 include:_spf.google.com ip4:203.0.113.10 ~all
How to read it:
v=spf1indicates this is an SPF record.include:authorizes an external provider, such as Google Workspace or Microsoft 365.ip4:authorizes a specific IP address, for example your own server's.~all(softfail) marks everything else as suspicious. With-all(hardfail) it is rejected. Never use+all, because it authorizes everyone.
Rules worth remembering:
- A domain must have a single SPF record. If you publish two, both stop working.
- SPF allows a maximum of 10 DNS lookups (each
include,a, andmxcounts). If it exceeds that, the record fails. This is a common mistake in companies that use many services. - SPF checks the sending server, not the sender the recipient sees. That's why you also need DKIM and DMARC.
3. DKIM: the signature that proves the message wasn't altered
DKIM (DomainKeys Identified Mail) adds a digital signature to every outgoing email. The receiving server verifies it with a public key you publish in DNS, confirming the message really comes from your domain and wasn't modified in transit.
- The public key is published at
selector._domainkey.yourdomain.com. The "selector" is a name assigned by your provider (for example,googlein Google Workspace). - A 2048-bit key is recommended.
- With Google Workspace or Microsoft 365, the signature is enabled from the provider's admin console, which tells you which record to publish.
- Each service that sends email on your behalf (billing, marketing, CRM) should have its own DKIM signature.
4. DMARC: what to do when an email fails verification
DMARC ties SPF and DKIM together and tells the receiving server what to do with emails that fail. It also sends you reports so you can see who is sending email using your domain. It is published as a TXT record at _dmarc.yourdomain.com:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
p=none: only observes and reports. It blocks nothing.p=quarantine: sends emails that fail to the spam folder.p=reject: the receiving server rejects emails that fail. This is the level that actually prevents spoofing.rua=: the address where you'll receive aggregate reports.
An email passes DMARC only if SPF or DKIM is valid and, in addition, the authenticated domain matches the domain visible in the "From" field. That match is called alignment.
A common mistake is leaving p=none indefinitely. It's useful to get started, but it doesn't protect you: forged emails are still delivered.
5. How to check your domain's status
The fastest way is Kryptasec's free scan, which checks these records from public information and gives you a clear result. If you'd rather check it by hand, type the following in a Windows, macOS, or Linux terminal, replacing yourdomain.com with your domain:
nslookup -type=TXT yourdomain.com
nslookup -type=TXT _dmarc.yourdomain.com
nslookup -type=TXT google._domainkey.yourdomain.com
How to read the result:
- If the first one doesn't show a record starting with
v=spf1, you don't have SPF. - If the second one returns nothing, you don't have DMARC.
- If the third one returns nothing, your DKIM selector may have a different name. Ask your email provider which one it uses.
- If you find
+all, more than one SPF record, orp=nonewith no plan to change it, it needs fixing.
6. A four-step plan to fix it
- Take inventory. List every service that sends email using your domain: your email provider, billing, marketing, web forms, and CRM.
- Publish SPF and enable DKIM for each of those services.
- Publish DMARC at
p=nonewith a reporting address. For two to four weeks, review who is sending email on your behalf and fix any legitimate sender that fails. - Tighten the policy gradually: first
p=quarantine, thenp=reject, once the reports show your legitimate sends are passing.
DNS changes can take anywhere from a few minutes to a few hours to apply, and in some cases up to 48 hours depending on the record's TTL.
7. Common mistakes
- Publishing two SPF records instead of combining them into one.
- Exceeding SPF's 10 DNS lookups by adding too many
includes. - Forgetting a legitimate service, such as billing, and moving to
p=reject: your own emails will stop arriving. - Leaving DMARC at
p=noneand never reviewing the reports. - Protecting only the main domain and forgetting secondary domains. A domain that doesn't send email should publish
v=spf1 -alland ap=rejectDMARC policy.
8. How Kryptasec Shield helps
Kryptasec Shield checks SPF, DKIM, and DMARC alongside certificates, DNS, reputation, and lookalike domains, and gives you a risk index from 0 to 100 with the exact step to fix each finding. All from public information, with nothing to install. You can start with the free scan.
Frequently asked questions
Do I need SPF, DKIM, and DMARC, or is one enough?
It's best to have all three. SPF and DKIM verify the message through different paths, and DMARC decides what to do when they fail. Without DMARC, receiving servers don't know how to treat forged emails from your domain.
Does DMARC protect with p=none?
It blocks nothing; it only generates reports. To prevent spoofing, it needs to reach p=quarantine or p=reject.
Can I have more than one SPF record?
No. A domain must have a single SPF record. If you need to authorize several services, combine them into one record with multiple includes.
How long does a DNS change take to apply?
Usually between a few minutes and a few hours. In some cases it can take up to 48 hours, depending on the record's TTL.
Does anything change if I use Google Workspace or Microsoft 365?
It makes it easier. Both tell you in their admin console which records to publish for SPF and DKIM. You publish DMARC yourself in your domain's DNS.