Technology

Configuring SPF, DKIM and DMARC Step by Step for a Business Domain

Illustration: Configuring SPF, DKIM and DMARC Step by Step for a Business Domain
Photo: TerriC / Pixabay (Pixabay Content License)

In the previous article in the series, we talked about new Gmail and Yahoo requirements for bulk email senders. This article gets into the work: configuring SPF, DKIM and DMARC for your business domain in a sensible order, so that real email reaches the inbox while spoofed email is blocked.

You don't need to be a network engineer. What you need is permission to edit the domain's DNS records and a list of services that send email on behalf of the business.

Step 1: Inventory Every Place That Sends Email

Before editing DNS, list all systems that send mail using your domain. If you miss one, its mail may be marked as spam after you tighten the policy. Common sources:

  • Company mailboxes (Google Workspace, Microsoft 365 or your domain provider's email service).
  • Email marketing and newsletter software.
  • The WordPress website sending order, contact and password-reset emails.
  • Accounting software, CRM, ticketing or booking systems.

If you don't have a dedicated domain for email yet, you can see why you should use email on your own domain and naming rules and company email signatures before configuring.

Step 2: SPF, the List of Servers Allowed to Send

SPF is a TXT-type DNS record that declares which servers or services may send mail on behalf of the domain. Principles to remember:

  • Each domain should have only one SPF record. If you need to add a service, merge it into the same record instead of creating a second one.
  • Each mail-sending service usually provides an "include" snippet to paste into the SPF record. Get it from that service's guidance page.
  • SPF has a limit on the number of DNS lookups. Combining too many services will exceed the limit, so keep only the services you actually use.
  • End the record with a mechanism for handling everything else. When starting out, many organizations choose the lenient level to avoid blocking by mistake.

Step 3: DKIM, a Digital Signature on Each Email

DKIM attaches a digital signature to email. The mail-sending service generates a public key and asks you to register it in DNS, usually as a TXT or CNAME record. How to do it:

  1. Go to the mail-sending service's admin page and find the domain authentication or DKIM section.
  2. Copy the record provided and add it to the domain's DNS.
  3. Return to the service, click verify and turn on signing.
  4. Repeat for each mail-sending service in your inventory.

A longer key is harder to forge, so if the service lets you choose, prefer the key length the provider recommends.

Step 4: DMARC, Policy and Reports

DMARC builds on SPF and DKIM. It requires the domain in the "From" address to match the authenticated domain, lets you decide what the receiving server should do with mail that fails, and sends reports back to you. There are three main policy levels:

Amount Meaning When to use
none Monitor only, does not affect mail delivery Early stage, reading reports
quarantine Mail that fails is sent to spam Once you are sure all sending sources are legitimate
reject Mail that fails is rejected Final stage, strongest protection

Start with the none level and an address to receive aggregate reports. After a few weeks of reading reports and fixing any remaining sending sources, raise the level of protection gradually. Details are in the article on starting DMARC in monitoring mode.

Step 5: Monitor Reports and Check with Tools

After adding records, DNS may need from a few minutes to a few hours to propagate. You should:

  • Use a free DNS record lookup tool to see whether SPF, DKIM and DMARC are displayed correctly.
  • Send a test email to a personal Gmail inbox, open "Show original" and see whether the three results, SPF, DKIM and DMARC, pass.
  • Read DMARC reports regularly. XML reports are hard to read, so many people use aggregation tools to convert them into tables.
  • Record changes: date, person, reason. When you change email provider or mail-sending software, update the records again.

Common Mistakes

  • Creating two SPF records for the same domain.
  • Forgetting a mail-sending service (usually the website or accounting software).
  • Pasting the record into the wrong subdomain or the wrong record type.
  • Raising DMARC to the blocking level too early before reading reports.

If you need help with domain names and DNS configuration, you can contact HVSC's Technology team.

2026 update: The email authentication requirements of the big mailbox providers still apply and may change in detail over time, so check Google's official guidance page when configuring. DMARC.org says that the standards related to DMARC were updated by the IETF in 2026, so you should check the latest documents. The article secure email for businesses: a 2026 check compiles the items to review, and the article .vn or .com domain helps you consider domain extensions.

FAQ

Should I configure SPF, DKIM or DMARC first?

It is usually done in the order SPF, DKIM and then DMARC, because DMARC relies on the results of the other two records. Set DMARC to monitoring level before tightening.

How long after adding a record does it take effect?

DNS needs time to propagate, from a few minutes to a few hours depending on the setup. Wait before checking again with a lookup tool.

If I send few emails, do I still need to do this?

You should, because the three layers of authentication help keep your email out of spam and make it harder for bad actors to spoof your domain.

Reference sources

Need advice on websites, software or security?

Describe the problem, and HVSC engineers will discuss the scope and options suited to your business.

FAQ

Should I configure SPF, DKIM or DMARC first?

It is usually done in the order SPF, DKIM and then DMARC, because DMARC relies on the results of the other two records. Set DMARC to monitoring level before tightening.

How long after adding a record does it take effect?

DNS needs time to propagate, from a few minutes to a few hours depending on the setup. Wait before checking again with a lookup tool.

If I send few emails, do I still need to do this?

You should, because the three layers of authentication help keep your email out of spam and make it harder for bad actors to spoof your domain.

· Ban biên tập HVSCTổng hợp từ 2 nguồn chính thống, có dẫn nguồnHVSC - Thanh Tuấn thuộc Ban biên tập HVSC, phụ trách mảng web, hosting, tên miền và công nghệ cho doanh nghiệp. Nội dung do HVSC chịu trách nhiệm.Bài khác của HVSC - Thanh Tuấn:Xem tất cả bài của HVSC - Thanh Tuấn →
Was this article helpful to you?Tap a star. Your feedback helps the editorial team write articles that better fit your needs.

📚 Related articles

See more in Technology