Suped

Can a DKIM record have multiple 'k' tags?

Matthew Whittaker profile picture
Matthew Whittaker
Co-founder & CTO, Suped
Published 15 Dec 2024
Updated 10 Oct 2025
5 min read
An illustration of DKIM records and the 'k' tag in email authentication.
Email authentication protocols like DKIM (DomainKeys Identified Mail) are crucial for verifying sender identity and preventing spoofing. A properly configured DKIM record plays a significant role in determining whether your emails land in the inbox or are flagged as spam.
One of the key components of a DKIM record is the 'k' tag, which specifies the key type used for signing. It's common to wonder about the flexibility of these records, especially when managing complex email infrastructures. The question of whether a single DKIM record can have multiple 'k' tags often arises.
Understanding the structure and purpose of each tag within your DKIM record is vital for maintaining email deliverability and protecting your domain's reputation. Let's delve into the specifics of the 'k' tag and how it should be used within DKIM records.

Understanding DKIM record syntax

A DKIM record is published as a TXT record in your domain's DNS. This record contains various tags, each serving a specific function in the authentication process. The most common tags include 'v' for the version, 'p' for the public key data, and 's' for the selector, among others.
Example DKIM TXT recordDNS
selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDn...
Each tag in a DKIM record is a key-value pair, separated by semicolons. The DNS standard dictates that while a domain can have multiple DKIM records through the use of different selectors, a single DKIM TXT record string should not contain duplicate tags. This means you should only have one instance of the 'k' tag per record.
The overall structure of a DKIM record is critical for its proper interpretation by receiving mail servers. Errors in syntax, such as duplicate tags or incorrect delimiters, can lead to authentication failures, impacting your email deliverability.

The specific role of the 'k' tag

The 'k' tag (key type) is a fundamental part of a DKIM record. It specifies the cryptographic algorithm used to generate the public and private key pair. Currently, the widely accepted and almost universally used key type is RSA, indicated by k=rsa.
While the DKIM specification allows for other key types to be defined in the future, RSA remains the standard. Therefore, you will almost always see k=rsa as the value for the 'k' tag in any valid DKIM record. This consistency ensures interoperability across mail systems globally.

Best practice for the 'k' tag

Always ensure your DKIM record specifies k=rsa. Deviating from this without explicit support from your email service provider can lead to authentication failures. The tag is mandatory and should only appear once per record.
The 'k' tag is part of the public key record, which essentially tells receiving servers what type of cryptographic key to expect when attempting to verify the sender's signature.

Why multiple 'k' tags in one record are problematic

No, a DKIM record cannot have multiple 'k' tags within a single TXT record string. Each tag-value pair serves a distinct purpose, and the specification allows for only one instance of each required tag to avoid ambiguity. Including more than one 'k' tag would result in a malformed DKIM record, leading to authentication failures.
Imagine trying to define a single object with two different, conflicting attributes in the same field. It simply doesn't make sense for a single public key to simultaneously be of two different key types. Receiving mail servers would not know which 'k' tag to use for verification, causing them to reject the DKIM signature.

Invalid: Multiple 'k' tags in one record

  1. Syntax error: Violates DKIM record format, causing parsing issues.
  2. Authentication failure: Receiving servers cannot validate the signature, leading to rejection.
  3. Increased spam scoring: Unauthenticated emails are more likely to be marked as spam.
Incorrect DKIM record exampleDNS
selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; k=dsa; p=MIGfMA0G...

Valid: Single 'k' tag per record via selectors

  1. Correct syntax: Adheres to DKIM standards for clear interpretation.
  2. Successful authentication: Enables reliable verification of email origin.
  3. Enhanced deliverability: Boosts sender reputation and inbox placement.
Correct DKIM record exampleDNS
selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0G...
While Broadcom notes that adding other optional tags is possible without affecting delivery, this refers to adding *different* tags (like 'n=' for notes or 'h=' for signed headers), not multiple instances of the *same* tag like 'k='. The purpose of each tag is singular within a given record.

Leveraging DKIM selectors for multiple keys

If you need to use different key types or manage multiple cryptographic keys for various sending services, the solution is not to include multiple 'k' tags in a single record. Instead, you should leverage DKIM selectors. A selector, specified by the 's' tag in a DKIM record, allows you to have multiple DKIM public keys for a single domain.
An illustration of multiple DKIM selectors for a single domain.
Each selector points to a unique DKIM record, which then contains its own single 'k' tag (usually k=rsa) and 'p' tag (public key). This is the standard and correct way to manage different DKIM keys for your domain. For example, your email marketing platform might use selector1, while your transactional email provider uses selector2.
This approach allows you to implement key rotation practices and segment your email sending without encountering authentication issues. Always ensure that each selector points to a valid DKIM record with a singular, correctly defined 'k' tag. Tools like Suped can help you monitor your DMARC reports to verify that all your DKIM signatures are passing authentication.

Final thoughts on DKIM key types

While a DKIM record cannot have multiple 'k' tags within a single TXT string, the robust design of DKIM allows for flexibility through the use of selectors. Each selector enables you to define a separate DKIM record, each with its own public key and a singular 'k' tag (almost always k=rsa). This ensures proper email authentication, enhances deliverability, and protects your brand from malicious activity.

Frequently asked questions

DMARC monitoring

Start monitoring your DMARC reports today

Suped DMARC platform dashboard

What you'll get with Suped

Real-time DMARC report monitoring and analysis
Automated alerts for authentication failures
Clear recommendations to improve email deliverability
Protection against phishing and domain spoofing