Can DKIM be set up on a subdomain, and which domain should be used for signing?

Summary

The majority of sources agree that DKIM can be set up on subdomains and that each domain/subdomain requires its own DKIM key. The most common recommendation is that the signing domain should match the domain used in the 'From' address to improve email authentication, deliverability, and sender reputation. Using SPF, DKIM, and DMARC together is advised for optimal protection. One source recommends signing with the 'envelope from' domain, requiring further investigation. Setting up DKIM on a subdomain helps protect the primary domain's reputation in case of email server issues.

Key findings

  • DKIM on Subdomains: DKIM can be configured on subdomains.
  • Individual Keys: Each domain and subdomain needs its own DKIM key.
  • From Address Alignment: The DKIM signing domain should generally match the domain in the 'From' address for optimal deliverability and authentication.
  • Holistic Approach: Using SPF, DKIM, and DMARC together provides the best email authentication.
  • Reputation Isolation: Using a subdomain for email helps isolate reputation problems and protect the main domain.

Key considerations

  • Signing Choice: Determine whether to sign with the 'From' address domain or 'envelope from' domain. Majority point to 'From' address domain.
  • Key Length: Consider using a key length of 2048 bits for improved security, as recommended by Google.
  • Comprehensive Setup: Implement SPF, DKIM, and DMARC together for robust email authentication.
  • Validation: Verify that DKIM is implemented correctly by checking email headers after implementation.

What email marketers say
9Marketer opinions

The consensus is that DKIM can indeed be set up on subdomains. The recommended practice is to sign with the domain matching the 'From' address of the email. This means if you're sending from a subdomain (e.g., sales.example.com), you should configure DKIM for that specific subdomain. This approach improves email authentication, deliverability, and sender reputation. A few answers recommend signing with the 'envelope from' domain instead, so this warrants further investigation.

Key opinions

  • Subdomain DKIM: DKIM can be set up on subdomains.
  • Signing Domain: The domain used for DKIM signing should ideally match the 'From' address domain or subdomain.
  • Improved Deliverability: Proper DKIM configuration enhances email deliverability and sender reputation.
  • Individual Records: Each subdomain should have its own SPF/DKIM records.

Key considerations

  • Domain Alignment: Ensure proper alignment between the 'From' address domain and the DKIM signing domain.
  • Security: Using subdomains for email can help isolate reputation issues and protect the main domain.
  • Comprehensive Authentication: Consider using SPF, DKIM, and DMARC together for the best email authentication.
  • Alternative Viewpoints: A minority of answers recommend signing with the 'envelope from' domain instead, this warrants further investigation.
Marketer view

Marketer from Email Geeks clarifies that you only need to sign with the header from domain for DKIM.

August 2024 - Email Geeks
Marketer view

Email marketer from SparkPost explains that using subdomains for sending email is a common practice, and DKIM should be configured for each subdomain used. They recommend generating separate DKIM keys for each subdomain to maintain proper authentication.

February 2025 - SparkPost
Marketer view

Email marketer from webhostingtalk forum discusses that they use a subdomain for all email because if their email server gets blacklisted, their main domain stays safe. They have SPF, DKIM and rDNS set up on their mail subdomain to ensure deliverability.

March 2024 - webhostingtalk.com
Marketer view

Email marketer from SendGrid explains that DKIM adds a digital signature to your email headers, proving the email wasn't altered in transit. Using DKIM helps improve your email deliverability and sender reputation, by verifying that you own the domain you're sending from.

October 2024 - SendGrid
Marketer view

Email marketer from StackExchange states that each subdomain requires their own SPF/DKIM records for proper email authentication.

September 2022 - StackExchange
Marketer view

Marketer from Email Geeks explains that if email.example.com is the SMTP Mail From and example.com is the envelope from, only sign with example.com for alignment.

October 2023 - Email Geeks
Marketer view

Email marketer from EasyDMARC explains that DKIM can be configured on subdomains. When sending from a subdomain, signing with that specific subdomain is the best practice. This ensures proper alignment and improves deliverability.

January 2022 - EasyDMARC
Marketer view

Email marketer from Mailjet explains that the domain used for DKIM signing should match the domain in the 'From' address of your email. If you're sending from a subdomain (e.g., sales.example.com), you should ideally configure DKIM for that specific subdomain to improve deliverability and sender reputation.

October 2024 - Mailjet
Marketer view

Email marketer from Reddit explains that, in general, you *can* set up DKIM on a subdomain. They recommend it's best to sign with the actual sending address for best results. So if your from address is `hello@newsletter.yourdomain.com` set up the DKIM record for `newsletter.yourdomain.com`.

October 2021 - Reddit

What the experts say
2Expert opinions

Both sources agree that DKIM can be set up for subdomains. Each domain needs its own DKIM key. The signing domain should match the domain used in the 'From' address of the email. Therefore, if sending from a subdomain like newsletter.example.com, the DKIM signature should also be for newsletter.example.com, not the root domain.

Key opinions

  • DKIM on Subdomains: DKIM can be configured on subdomains.
  • Separate Keys: Each domain and subdomain requires its own unique DKIM key.
  • From Address Matching: The DKIM signing domain should align with the domain used in the 'From' address of the email.

Key considerations

  • Correct Configuration: Ensure that the DKIM signature is created using the key associated with the sending domain or subdomain.
  • Alignment: Maintain alignment between the 'From' address domain and the DKIM signing domain for better deliverability.
Expert view

Expert from wordtothewise.com answers that DKIM signing happens on a domain. The signing domain should be the domain used in the 'From' address. If a message is sent from a subdomain like `newsletter.example.com`, then the DKIM signature should be for `newsletter.example.com` not the root domain `example.com`.

December 2023 - wordtothewise.com
Expert view

Expert from Email Geeks explains that you need to DKIM sign all domains separately with their own keys.

November 2021 - Email Geeks

What the documentation says
5Technical articles

The documentation consistently confirms that DKIM can be set up for subdomains. Each domain or subdomain should have its own DKIM key. It's recommended to sign emails with the domain or subdomain that matches the 'From' address, which helps improve email authentication and reduce the chances of emails being marked as spam. Using SPF, DKIM, and DMARC together provides the best possible protection. While the DKIM standard doesn't explicitly forbid signing with a parent domain, it implies that signing with the domain that matches the 'From' address is preferred.

Key findings

  • DKIM on Subdomains: DKIM can be configured on subdomains.
  • Individual Keys: Each domain/subdomain needs its own DKIM key.
  • Match 'From' Address: Signing with the domain/subdomain matching the 'From' address is recommended.
  • Enhanced Security: Using SPF, DKIM, and DMARC together improves protection.

Key considerations

  • Key Length: Consider using a 2048-bit key length for improved security (as recommended by Google).
  • Proper Alignment: Ensure alignment between the 'From' address and DKIM signing domain for optimal authentication.
  • Comprehensive Approach: Implement SPF, DKIM, and DMARC for robust email authentication.
Technical article

Documentation from RFC 6376, the DKIM standard, explains the technical details of DKIM signing. While it doesn't explicitly forbid signing with a parent domain, it implies that signing with the domain that matches the 'From' address is the intended use case for optimal authentication.

March 2024 - ietf.org
Technical article

Documentation from Cloudflare explains DKIM authentication and how to add DKIM records to your DNS, but doesn't provide specific information about the use of subdomains.

September 2024 - Cloudflare
Technical article

Documentation from Microsoft details that DKIM is used to ensure that destination email systems trust messages sent outbound from your organization. They recommend using SPF, DKIM, and DMARC together for the best possible protection.

July 2023 - Microsoft
Technical article

Documentation from AuthSMTP explains that DKIM can be used with subdomains, and it is recommended to sign emails with the domain or subdomain that matches the 'From' address. This helps improve email authentication and reduce the chances of your emails being marked as spam.

April 2024 - AuthSMTP
Technical article

Documentation from Google explains that you can set up DKIM for subdomains. Each domain or subdomain needs its own DKIM key. They recommend a key length of 2048 bits for improved security.

June 2022 - Google