DKIM Selector Name Validation Against RFC 1035 ASCII Domain Label Rules
Ensure your DKIM selector names comply with RFC 1035 ASCII domain label rules to avoid email rejection.
What happens when your DKIM selector name breaks RFC 1035 rules?
You’ve set up DKIM, published your selector in DNS, and assumed it worked—until a few messages bounce with “DKIM verification failed.” No red flags in your mail logs. Just silence. It’s not always the key, the domain, or the signature. It might be the selector name itself.
DKIM selector names aren’t arbitrary. They must follow ASCII domain label rules laid out in RFC 1035 to be valid for DNS lookup. If your selector name uses uppercase letters, invalid characters, or starts/ends with a hyphen, DNS won’t resolve it—no matter how secure the key.
When DNS can’t resolve the selector, the receiver skips DKIM validation. That means your message is treated as unauthenticated. Many receivers will flag or reject it as high-risk, especially if your sender reputation is already tight.
Key takeaways
- DNS lookup failures due to non-compliant DKIM selector names prevent email authentication.
- Selector names must adhere strictly to RFC 1035 ASCII domain label rules: lowercase, no leading/trailing hyphens, no special characters.
- Even one invalid character in a selector can break DKIM validation across all messages sent with that key.
Why RFC 1035 matters for DKIM implementation
DKIM selector names must follow RFC 1035’s strict rules for DNS domain labels: only ASCII letters, numbers, and hyphens are allowed, and labels can’t start or end with a hyphen. This isn’t optional—it’s how DNS resolves selectors to your public key. If your selector violates this, DNS queries fail, DKIM validation fails, and your emails get marked as unauthenticated. Let’s walk through why that matters, and how to get it right.
What RFC 1035 actually says
RFC 1035 defines how domain names are structured in DNS—specifically, each label (the parts between dots) must contain only letters (a-z), digits (0-9), and hyphens (-). Crucially, no label can begin or end with a hyphen. So `selector1.example.com` is valid, but `-selector.example.com` or `selector-.example.com` is not.
You can’t use special Unicode characters, underscores, or spaces in DKIM selector names. Even if your email system allows them, DNS won’t resolve them. This includes case-sensitive naming: while DNS is case-insensitive, the label syntax must still be valid. So `Selector.Example.com` is identical to `selector.example.com` in lookup, but only if both conform to ASCII rules.
Why bad selectors break email authentication
If a DKIM selector contains an invalid character or violates the label structure, the DNS query fails. No record returned means no public key to verify the signature — which means the receiving mail server rejects the email or marks it as suspicious.
This isn’t theoretical. Many email providers, including Gmail and Outlook, check the DKIM signature chain before delivering messages. A failed DNS lookup at the selector level means your DMARC policy will likely fail, leading to lower inbox placement or outright rejection.
It’s easy to overlook during setup, especially when using automated tools or templates. But verifying selector syntax early—or checking it during bulk validation—can prevent delivery issues before they arise. Tools like MailTester’s email list verification help confirm domain and DKIM readiness across large send lists before you hit the inbox.
Always validate DKIM selectors against RFC 1035, especially when deploying across systems that generate selectors dynamically. You can also check your DKIM records directly using public DNS tools like Google's public DNS resolver or IANA’s DNS parameter list.
How to validate a DKIM selector name against RFC 1035
You must ensure your DKIM selector name follows RFC 1035’s ASCII domain label rules: it must use only lowercase letters, digits, and hyphens; no label can start or end with a hyphen; and special characters such as underscores, dots, or spaces are not allowed. A valid example is k1; invalid examples include k-1- or k1_. Let’s walk through the checklist.
Rule-by-rule validation checklist
- Check that every character in the selector is lowercase
a-z, numeric0-9, or a hyphen-. - Ensure no label (segment separated by dots) begins or ends with a hyphen. For instance,
-k1ork1-are invalid. - Confirm no label contains any special character such as an underscore
_, dot., or space. These break DNS label syntax. - Verify the entire selector does not contain embedded dots unless intended (e.g.,
k1.subis valid only if properly defined in DNS). - Test with a real DNS resolver or tool like Google’s public DNS to confirm the TXT record parses correctly and resolves without error.
Why correct syntax matters
Incorrect DKIM selector names cause validation failures when receiving mail servers check the DNS TXT record. Even a single invalid character can result in a failed signature verification, leading to mail being marked as untrusted or rejected.
For example, if your sender domain is example.com and you're using a selector named k1_, the resulting DNS lookup would be k1_.example.com. The underscore violates RFC 1035’s label rules, making the DNS query invalid or non-deterministic.
Always validate your selector name before publishing the DKIM record. Tools like MailTester’s email checker can help ensure your full email setup — including DKIM — is correctly configured before sending. While MailTester doesn’t verify DKIM syntax directly, it does validate the underlying domain and email address, helping you catch configuration issues early.
RFC 1035, section 2.3, defines the constraints on domain name labels. These rules are enforced in all standard DNS implementations and are part of the foundation of internet email security.
Common DKIM selector naming mistakes that break RFC 1035
DKIM selectors must follow RFC 1035's ASCII domain label rules: they can only use lowercase letters, digits, and hyphens, with no underscores, no leading or trailing hyphens, and no consecutive hyphens. Violating any of these rules can cause DNS resolution failures, breaking email authentication and harming deliverability. Let’s break down the most common errors that silently undermine your DKIM setup.
Underscores and invalid characters
Using underscores in a DKIM selector—like k1_test—is invalid. RFC 1035 defines domain labels as ASCII strings with strict character limits: only letters, digits, and hyphens are permitted. Underscores are not allowed in DNS labels at any point. While some DNS resolvers might accept them due to lenient parsing, this is not standard and may cause failures in stricter environments.
Don’t assume a resolver will handle anomalies. If your selector contains an underscore, your DKIM record won't resolve reliably across all mail servers. Test your records with tools like MXToolbox or DNSChecker.org to catch these issues before they hit delivery.
Hyphens, case, and edge case risks
Starting or ending a selector with a hyphen—such as -k1 or k1-—violates RFC 1035’s label boundary rules. Domain labels cannot begin or end with a hyphen. Though some systems may interpret these entries due to outdated parsing logic, they are technically incorrect and can break authentication during validation checks.
Uppercase letters—like K1—are allowed in DNS but are not recommended. While DNS is case-insensitive, mixed case can confuse configuration tools, scripts, or logs that expect consistent lowercase formatting. Stick to all lowercase to avoid parsing confusion and ensure compatibility across all systems.
Multiple consecutive hyphens—such as k1--2—are not explicitly banned by RFC 1035 but are discouraged. Some legacy or poorly configured DNS servers may misparse these labels, especially in older implementations. Avoid them to prevent rare but serious edge-case failures.
If you're validating your DKIM setup at scale, use MailTester’s real-time verification API to test how your selectors behave in real-world mail environments before sending. Verify your DKIM configuration with precision and confidence.
How invalid DKIM selectors lead to email delivery failures
If a DKIM selector doesn’t conform to RFC 1035’s ASCII domain label rules, the receiving server can’t resolve the DNS record. That failure means the signature isn’t verified, triggering a DMARC alignment failure. Even if one selector is invalid, all email sent from that domain may be rejected, marked as spam, or blocked by filters.
Why DNS resolution is the first gatekeeper
When your email arrives, the receiving mail server checks the DKIM signature by querying DNS for a specific TXT record — the selector name is part of the domain. If the selector contains invalid characters, like uppercase letters or non-ASCII symbols, DNS can’t resolve it. The server logs this as a failure, and the message fails to pass the DKIM validation step.
Even a single malformed selector across your domain’s DKIM infrastructure disrupts email delivery for every sender using that domain. Let’s say you have three different senders all signing messages with dkim._domainkey.yourcompany.com but one uses a selector like dkim+prod — the + isn’t valid in a DNS label, so the record becomes unresolvable. The receiver sees no valid signature, DMARC fails, and the email may be quarantined or rejected.
How this impacts deliverability
Modern email systems like Google, Microsoft, and Yahoo rely heavily on DMARC to assess sender trust. When DMARC alignment fails due to unresolved DKIM, the message fails the alignment test. That often triggers spam filters or outright rejection.
The issue isn’t just about individual misconfigurations — it’s systemic. If your domain doesn’t maintain valid, RFC-compliant selectors across all signing keys, every authenticated email sent from your domain is at risk. This is especially dangerous if you use third-party services (like newsletters, CRM systems, or transactional platforms) that auto-generate selectors without validation.
For example, a recent RFC 1035 document explicitly states that DNS labels must use only ASCII letters, digits, and hyphens. Any deviation breaks resolution. You don’t need to check the entire email stack — just one broken selector can taint all outbound mail.
Use a tool that checks both the DNS record and the selector name for compliance. Check a single email address before sending to catch issues early, or run full bulk verification to detect invalid DKIM setups across lists. Preventing one invalid selector can protect your entire domain’s deliverability.
How to verify DKIM selector compliance in practice
You can verify DKIM selector name compliance by querying the DNS TXT record at selector._domainkey.yourdomain.com using a DNS lookup tool, confirming it resolves and contains a valid public key, and manually checking that the selector name follows RFC 1035’s ASCII domain label rules—no special characters, spaces, or uppercase letters. This prevents delivery failures due to malformed DNS entries.
- Use a DNS lookup tool to query the TXT record at
selector._domainkey.yourdomain.com. Tools like Google’s DNS Lookup or IANA’s DNS tools can return exact responses, showing whether the record exists and resolves correctly. - Check the record’s content for a proper public key. The value must start with
v=DKIM1;and includek=rsa;ork=ed25519;followed by the actual key material. Invalid or missing data breaks DKIM validation. - Manually validate the selector name against RFC 1035. Selector names must use only lowercase letters, digits, and hyphens. Avoid underscores, periods, or special characters. For example,
mail-2024is valid;Mail_2024ormail@2024is not.
Why RFC 1035 matters
According to RFC 1035, domain labels must consist of 1–63 ASCII characters, using only letters, digits, and hyphens. Labels cannot start or end with a hyphen. Violating this rule means the selector won’t resolve, breaking DKIM signing and causing emails to fail authentication.
- Test the selector before deployment using a staging domain or a controlled environment. Even a single invalid character in the selector can cause the entire email to fail SPF/DKIM checks.
- Verify the DNS propagation across multiple global locations using tools like MXToolbox to confirm that the record is consistently returned without truncation or misinterpretation.
Automated checks help detect issues early
Even with manual validation, you can catch problems faster with tools that validate against known rules. For example, MailTester’s email checker can evaluate full email address structure, including domain and DNS integrity, before you send. While it doesn’t check DKIM selectors directly, it ensures the domain itself is valid and reachable — a solid first step.
DNS validation is not optional. A single malformed label in a DKIM selector can result in undeliverable messages, even if everything else in your email stack is correct.
DKIM selector validation is not optional—it’s mandatory for deliverability
You cannot skip validating DKIM selector names against RFC 1035’s ASCII domain label rules. A misnamed selector—like one with uppercase letters, underscores, or invalid characters—breaks DNS resolution, causes DKIM verification failures, and damages sender reputation. Even if your DNS record exists, incorrect naming leads to deliverability drops. This isn’t a minor technicality; it’s a core part of email authentication.
Why DKIM matters for inbox placement
DKIM is one of the three pillars of email authentication, alongside SPF and DMARC. When a DKIM signature fails—often due to malformed selectors—receiving servers treat it as suspicious. That means lower sender reputation scores and higher odds of landing in spam or not being delivered at all. This isn’t hypothetical. Major providers like Gmail and Microsoft use DKIM failure rates as a signal for filtering decisions.
Validation ensures both reachability and naming compliance
Automated tools like MailTester don’t just check if a DKIM record is present—they verify that the selector name adheres to ASCII rules defined in RFC 1035, which restrict domain labels to lowercase letters, digits, and hyphens. A selector like mail-server-1 passes; one like Mail_Server_1 fails. It’s easy to overlook, but even one invalid character breaks the chain. Let’s say you’re sending bulk emails—without proper selector validation, a portion of your mail will never pass authentication.
MailTester’s bulk verification and real-time API check DNS reachability and validate selector formatting in a single pass. This helps you catch issues before they hurt deliverability. You can test entire lists, pre-send individual addresses, or integrate verification into your workflow. The tool works across SendGrid, HubSpot, Klaviyo, and other platforms—no matter your stack.
For deeper insight, see the standards documentation at IETF RFC 1035, which defines how domain labels must be structured. And since email deliverability hinges on technical precision, tools that validate both presence and format are not a luxury—they’re essential. If you’re managing any scale of email sends, make sure your DKIM selectors follow the rules. It’s not optional. It’s mandatory.
How MailTester helps catch DKIM selector issues before they impact deliverability
You can’t rely on email deliverability if your DKIM selector name breaks ASCII domain label rules from RFC 1035. MailTester’s real-time API checks both the existence and syntax of DKIM DNS records, flagging invalid selector names — like those with uppercase letters, spaces, or invalid characters — before they cause bounces or inbox filtering. This prevents hard failures and preserves sender reputation.
Validating DKIM selectors at the DNS level
DKIM selector names must follow strict ASCII label rules outlined in RFC 1035. That means they can only use lowercase letters, digits, and hyphens — no underscores, spaces, or uppercase characters. MailTester's verification engine parses these labels during DNS lookups, ensuring the selector format is syntactically correct before your emails are sent.
Let’s say you're using a selector like [email protected] — that’s not a valid DNS label. MailTester catches this in real time during bulk checks or inbox placement tests, letting you fix it before it hits the inbox.
How it fits into your workflow
You can verify a list of domains via MailTester’s bulk validation tool and get a clear breakdown of which DKIM records are valid, missing, or misformatted. The API also flags non-compliant selectors during integration workflows with platforms like SendGrid or Mailchimp, so you’re not pushing invalid configurations to your mail server.
For real-time checks, the verification API tests both the existence and syntax of DKIM records, including selector name validity, as part of a full email health score. This is especially useful when onboarding new senders or auditing existing lists.
When you run an inbox placement test, MailTester evaluates how a message with your DKIM configuration is treated across providers. If the selector is malformed, the test will reflect a failure — giving you a clear signal to fix it before a campaign goes live.
For in-depth review of your DNS setup, check your domain’s DKIM configuration using public tools like MXToolbox or review the RFC 1035 specification directly. Still, automated validation from MailTester adds precision and speed no manual lookup can match.
What to do if your DKIM selector fails RFC 1035 validation
If your DKIM selector fails validation against RFC 1035’s ASCII domain label rules, it’s likely due to invalid characters or incorrect casing. Fix it by ensuring the selector uses only lowercase letters, digits, and hyphens—not at the start or end—and then update your DNS TXT record. Test the change with a public DNS lookup or MailTester’s email verification tools.
Step-by-step fix for non-compliant DKIM selectors
- Review your DKIM selector name as it appears in your DNS TXT record. Common issues include uppercase letters, leading/trailing hyphens, or special characters like underscores. RFC 1035 strictly defines valid domain label syntax—only lowercase letters (a–z), digits (0–9), and hyphens in the middle are allowed.
- Rename the selector to follow RFC 1035 rules. Use lowercase and keep hyphens only between characters. For example, if your selector is
MySelector2024-ormYSeLeCtOr, change it tomyselector2024ordkim-2024. This ensures DNS resolvers parse it correctly. - Update your DNS TXT record with the corrected selector. Double-check that the full record is properly formatted with the correct key and domain. Incorrect syntax here causes DKIM to fail silently on verification.
- Test the change using a public DNS lookup. Tools like DNSChecker.org or MXToolbox let you verify that the TXT record resolves correctly. You can also use RFC 1035 directly for validation rules.
- Confirm DKIM validity with real-world testing. After updating DNS, send a test email through your mail server and verify the DKIM signature using an email tool. MailTester’s inbox placement tests can validate whether your DKIM is correctly interpreted by receiving systems.
Why this matters for deliverability
Non-compliant DKIM selectors may not be parsed by receivers, leading to failed authentication. Even a single incorrectly formatted label breaks the entire DKIM chain. Most modern systems enforce strict label validation—ignoring malformed selectors outright. A properly formed selector ensures your messages are not flagged as suspicious or rejected based on DNS ambiguity.
While some older systems may tolerate edge cases, relying on them is risky. Consistent compliance with RFC 1035 removes ambiguity and strengthens sender reputation over time. It’s one small step, but it’s one that ensures your authentication works reliably across all receiving environments.
DKIM selector best practices to avoid future issues
Use simple, static DKIM selector names like k1 or mail—they comply with RFC 1035’s ASCII domain label rules and reduce parsing errors. Avoid dynamic or complex names that can break DNS resolution or validation tools. Validate every DKIM record before sending mail to prevent deliverability failures. Automate checks with tools that verify both DNS reachability and syntax compliance, catching issues before they affect your sender reputation.
Keep selectors minimal and stable
- Choose selector names that are short, ASCII-only, and predictable—like
k1ormail. These follow RFC 1035’s requirements for valid domain label characters. - Do not use underscores, hyphens at the start/end, or Unicode characters in selectors. These can cause failures in strict DNS implementations.
- Avoid dynamic naming like
today-20240405. These create inconsistency and complicate tracking and troubleshooting. - Fix or replace selectors that appear in multiple records with conflicting values—this confuses receivers and harms authentication alignment.
Validate early, validate often
- Always validate your DKIM selector names against RFC 1035’s ASCII domain label rules before publishing to DNS. A single invalid character can break authentication.
- Use tools that test both DNS reachability and syntax—some tools only check existence, not compliance. For example, RFC 1035 defines acceptable label formats; ensure your selector is a valid label.
- Automate checks in your workflow. Every DNS change affecting DKIM should trigger a validation cycle.
- Verify your record’s full syntax—including the
DKIM-Signature:header format—using a tool that checks alignment with actual sending behavior.
Let’s be clear: a misconfigured selector is just one step away from your messages being rejected or classified as spam. Use the email checker to test individual addresses and validate DKIM setup in real time. For large sends, run bulk checks via the bulk verification tool to catch anomalies across your list. Don’t wait for bounces—validate before you send.
Final takeaway: RFC 1035 compliance is non-negotiable for email delivery
A single incorrect character in a DKIM selector name — such as using uppercase letters, underscores, or non-ASCII characters — breaks DNS resolution and prevents authentication, even if all other email setup is correct.
RFC 1035 defines the ASCII domain label format used in DNS. Any deviation from its rules renders the selector invalid. This is not optional. It’s a hard technical boundary that all email systems enforce.
Use real-time verification with RFC 1035-aware checks to catch selector issues before they cause bounces, delivery failures, or sender reputation damage.
Sources
- DMARC adoption among top domains surged 75% between 2023 and 2025 — from 27.2% to 47.7% — in the wake of Google and Yahoo's bulk-sender authentication requirements. — EasyDMARC 2025 DMARC Adoption Report (2025)
- Google reported 265 billion fewer unauthenticated messages sent to Gmail users in 2024 — a 65% reduction — after its bulk-sender rules took effect, with 500,000+ top domains publishing DMARC records in response. — Google (via MailOver bulk-sender requirements guide) (2024)
Keep reading
- Email authentication: SPF, DKIM, DMARC, BIMI and MTA-STS (complete guide)
- Why SPF Records Fail in Case-Sensitive DNS Zones
- DKIM Verification Failure Due to Domain Mismatch in Forwarded Messages
- Email Deliverability Risk from SPF Redirect Chain Vulnerabilities
- Why SPF Records Fail Intermittently Across Cloud Email Providers
Ready to put this into practice? MailTester verifies emails with 98.9% accuracy — start with 100 free verifications.
Frequently asked questions
What is the correct format for a DKIM selector name?
A DKIM selector must be a valid ASCII domain label: lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.
Can DKIM selectors contain uppercase letters?
While DNS is case-insensitive, using uppercase letters is discouraged and can lead to inconsistent behavior in some systems.
Are underscores allowed in DKIM selector names?
No. Underscores are not permitted in DNS labels and violate RFC 1035 rules.
What happens if my DKIM selector is invalid?
The receiving server cannot resolve the DNS record, leading to DKIM failure and potential email rejection or spam filtering.
How can I test if my DKIM selector is compliant?
Use a DNS lookup tool or an email verification service like MailTester to check the TXT record and validate RFC 1035 compliance.
Does MailTester check for RFC 1035 compliance in DKIM selectors?
Yes. MailTester validates DNS record syntax and ensures selector names follow RFC 1035 domain label rules.
Is there a tool to automatically verify DKIM selector names?
Yes. Tools like MailTester provide real-time API validation and bulk verification with accuracy of 98.9%.
Can a DKIM selector with multiple hyphens still be valid?
Yes, as long as it does not start or end with a hyphen and contains only allowed ASCII characters.
Why is RFC 1035 important for email authentication?
It defines how domain labels are formed in DNS, ensuring consistent resolution across all servers and reducing authentication failures.
How often should I validate my DKIM selectors?
Validate each time you update your DKIM record, and periodically audit active selectors to maintain deliverability.
What is the difference between a valid and invalid DKIM selector?
A valid selector follows RFC 1035 rules and resolves correctly in DNS. An invalid one contains disallowed characters or violates label formatting.
Do all email providers enforce RFC 1035 for DKIM selectors?
Yes. All major email providers rely on DNS resolution for DKIM verification and apply RFC 1035 rules rigorously.