Subdomain email routing gives a subdomain such as app.example.com its own MX and SPF records, so your app’s receipts and password resets are handled, and judged by spam filters, separately from the mail on example.com. On Namecheap DNS you do it by adding records whose Host field holds only the subdomain prefix. When you finish, the subdomain has working MX, SPF, DKIM and DMARC records, and your root domain mail is untouched.
Quick answer: In Namecheap Advanced DNS, add the subdomain’s MX rows under Mail Settings > Custom MX and its SPF, DKIM and DMARC TXT records under Host Records. Type only the prefix (for example app) in the Host field, never the full name.
- Save your root domain’s current MX and SPF records.
- Switch Mail Settings to Custom MX and re-enter the root MX rows on host @ if a preset managed them.
- Add an MX row with Host app and your provider’s mail server.
- Add a TXT record on host app with your provider’s SPF include.
- Add the provider’s DKIM record (for example pm._domainkey.app) and a DMARC record on _dmarc.app.
- Check with
dig app.example.com MX +short.
In this guide
- Before You Start
- Why You Should Route Subdomain Email Separately
- The Namecheap Host Field Gotcha
- The Records a Mail Subdomain Needs
- Step 1: Add Custom Subdomain MX Records
- Step 2: Craft an Isolated SPF TXT Record
- Step 3: Configure DKIM for the Subdomain
- Step 4: Align DMARC Policies
- Step 5: Test the Records With dig or nslookup
- A Common Gotcha: SPF 10-DNS-Lookup Limit on Subdomains
- If It Still Doesn’t Work
- Frequently Asked Questions
- Next Steps
A typical case is an app that sends hundreds of automated alerts a day. When those notifications share the root domain with regular mailbox traffic, a spam complaint against the app’s mail counts against everyone. Putting the app on its own subdomain keeps the two streams apart.

Before You Start
- Access: your Namecheap login. The domain must use Namecheap BasicDNS or PremiumDNS.
- Your provider’s DNS values: the MX host, SPF include and DKIM record from your sending or receiving service’s dashboard (Postmark, SendGrid, Amazon SES, and so on).
- A copy of your root mail records: run
dig MX example.com +shortanddig TXT example.com +shortand save the output. If a preset such as Private Email or Email Forwarding manages your root mail, switching to Custom MX removes those records, and root mail stops until you re-enter them. - Time: about 15 to 20 minutes. New records usually resolve within 30 minutes.
Why You Should Route Subdomain Email Separately
When you send emails from notifications.example.com instead of example.com, receiving mail transfer agents (MTAs) like Gmail and Outlook track sender reputation for that subdomain largely separately. If an automated script sends a bad batch of messages that bounce, most of the damage stays on the subdomain instead of your main office mail on example.com.
DNS treats every hostname separately. Many developers assume that subdomains inherit records automatically. They don’t. An MX record on example.com does nothing for an inbound message addressed to user@billing.example.com. The receiving server looks up MX records specifically for billing.example.com. If none exist, the sending server falls back to the subdomain’s A or AAAA record, and if there is none (or that host does not accept mail) the message bounces with an NDR (Non-Delivery Report).
If you already configured your apex records by following how to set up Namecheap Private Email MX, SPF, and DKIM records, you already know the basics of DNS records. Applying those same concepts to a subdomain requires one major adjustment: understanding how Namecheap handles the Host field.
The Namecheap Host Field Gotcha
The single most common mistake on Namecheap DNS is entering the fully qualified domain name (FQDN) into the Host input box. On standard BIND zone files, you might write out mail.example.com. with a trailing dot. Namecheap does not work that way.
In Namecheap Advanced DNS, the system automatically appends your root domain to whatever string you place in the Host field. If your root domain is example.com and you type mail.example.com into the Host field, Namecheap creates a record for:
mail.example.com.example.comWith that double-domain mistake, lookups for mail.example.com fail with an NXDOMAIN (name does not exist) error. To target mail.example.com, enter only the prefix mail in the Host column. Namecheap appends the rest for you.
If the subdomain also needs a website on another server, our guide on how to route subdomains to different servers in Namecheap DNS covers the A and CNAME side.
The Records a Mail Subdomain Needs
Here is the full set for app.example.com, using Postmark as the example provider. Swap in the values your own provider gives you.
| Type | Host in Namecheap | Full name | Example value | Where in Namecheap |
|---|---|---|---|---|
| MX | app |
app.example.com |
inbound.postmarkapp.com, priority 10 |
Mail Settings > Custom MX |
| TXT (SPF) | app |
app.example.com |
v=spf1 include:spf.mtasv.net ~all |
Host Records |
| TXT or CNAME (DKIM) | pm._domainkey.app |
pm._domainkey.app.example.com |
The key or target from your provider | Host Records |
| TXT (DMARC) | _dmarc.app |
_dmarc.app.example.com |
v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com |
Host Records |
The steps below explain each row.
Step 1: Add Custom Subdomain MX Records
Log in to your Namecheap dashboard, click Domain List, find your domain, and click Manage. Navigate to the Advanced DNS tab. Scroll down to the Mail Settings section.
In Namecheap, MX records live in Mail Settings, not in the Host Records table, and you can only enter your own MX rows when the dropdown is set to Custom MX. If your apex domain currently uses a preset such as Private Email or Email Forwarding, switching to Custom MX removes the records that preset manages. Note your apex MX and SPF values first (dig MX example.com +short and dig TXT example.com +short) and re-enter them by hand in the same sitting, the MX rows with Host @, or mail to your root domain will stop.
With Custom MX selected, add a row for the subdomain:
- Type: MX Record
- Host: Enter your subdomain prefix (for example,
notifyorapp). - Value: The mail exchange server provided by your email host (for example,
inbound.postmarkapp.comorsmtp.google.com). Do not put an IP address here; MX records require a hostname. - Priority: Set according to your provider instructions (typically
10). - TTL: Set to
Automaticor5 minwhile testing.
If your provider requires multiple MX hosts for redundancy, add each one as a separate record with identical Host values but different Priorities and Values:
Type: MX Record | Host: app | Value: mx1.example.net | Priority: 10
Type: MX Record | Host: app | Value: mx2.example.net | Priority: 20Save your changes when all rows are in. Then check that your root MX rows on @ are still listed in Mail Settings; if they are missing, re-enter them from the output you saved.
Step 2: Craft an Isolated SPF TXT Record
The Sender Policy Framework (SPF) tells recipient mail servers which IP addresses and mail platforms are permitted to send email on behalf of your domain. According to RFC 7208, SPF is checked against the exact domain in the envelope sender (the Return-Path) and never falls back to the apex domain. If a message’s Return-Path is bounces@app.example.com, the recipient server evaluates the TXT record on app.example.com. If that record does not exist, the check returns None, rendering SPF validation useless. Many sending services use their own Return-Path domain by default or give you a CNAME for a custom one; in that case follow their DNS instructions rather than writing the SPF record yourself.
To authorize your sending service, add a new TXT record specifically tied to your subdomain host. In the Namecheap Host Records section, click Add New Record.
- Type: TXT Record
- Host:
app(use the exact prefix chosen for your MX record) - Value:
v=spf1 include:sendgrid.net ~all(adjust the include mechanism based on your transactional mail provider) - TTL:
Automatic
Here is the raw TXT value you would enter for Postmark’s sending servers instead:
v=spf1 include:spf.mtasv.net ~allUse ~all (SoftFail) during your test period. If a legitimate server sends an email that fails the test, receiving servers still accept the message while flagging the header. Once you verify your pipeline in production, you can switch to -all (HardFail) if your organization requires strict enforcement.
Step 3: Configure DKIM for the Subdomain
SPF handles source validation, but modern anti-spoofing checks require DKIM (DomainKeys Identified Mail). DKIM uses public-key cryptography to verify that the message body wasn’t modified in transit. You can read the full DKIM specification on the IETF RFC 6376 documentation.
Your mail provider will supply a DKIM selector and a public key, usually formatted as a CNAME or a TXT record. Here is where the Namecheap Host field catches people off guard again.
If your provider asks you to add a DKIM selector named pm._domainkey for your subdomain app.example.com, the target name is pm._domainkey.app.example.com. On Namecheap, strip the apex domain. Enter this in the Host field:
pm._domainkey.appIf your provider uses CNAME-based DKIM (like AWS SES or SendGrid), configure it like this in Namecheap:
- Type: CNAME Record
- Host:
s1._domainkey.app - Value:
s1.domainkey.u1234567.wl.sendgrid.net. - TTL:
Automatic
If they provide a raw 2048-bit RSA public key, choose TXT Record, enter s1._domainkey.app into the Host box, and paste the public key string into the Value field:
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0b...Step 4: Align DMARC Policies
DMARC ties SPF and DKIM together. Unlike SPF, DMARC does support inheritance. If you already have a DMARC record on your apex domain (_dmarc.example.com), the receiving MTA will apply that policy to subdomains unless the subdomain defines its own policy, or unless the root policy contains the sp (subdomain policy) tag.
If your apex DMARC policy is set to strict reject:
v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.comThat p=reject applies to app.example.com automatically. If your subdomain email fails SPF or DKIM alignment, receivers will discard the email. If you want a relaxed policy for testing on your subdomain without modifying your root domain’s security, add an explicit DMARC record for the subdomain:
- Type: TXT Record
- Host:
_dmarc.app - Value:
v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com - TTL:
Automatic
Setting p=none allows you to receive aggregate reports and identify missing authentication headers without risking dropped transactional emails.
Step 5: Test the Records With dig or nslookup
After clicking save in Namecheap, wait a few minutes. Then open a terminal on your computer and test the records directly against public resolvers like Google (8.8.8.8) or Cloudflare (1.1.1.1). On Windows, nslookup -type=mx app.example.com 1.1.1.1 gives the same MX answer as the first dig command below.
To inspect your subdomain’s new MX records, run:
dig @1.1.1.1 app.example.com MX +noall +answerYou should see an answer section returned in the terminal looking like this:
app.example.com. 300 IN MX 10 inbound.postmarkapp.com.Next, query your subdomain’s SPF TXT record:
dig @1.1.1.1 app.example.com TXT +shortThe output should display your SPF string wrapped in quotes:
"v=spf1 include:spf.mtasv.net ~all"Finally, check that your DKIM record resolves properly by pointing dig at your specific selector:
dig @1.1.1.1 pm._domainkey.app.example.com TXT +shortIt should print the DKIM key as a quoted string starting with v=DKIM1. For CNAME-based DKIM, query the CNAME instead (for example dig @1.1.1.1 s1._domainkey.app.example.com CNAME +short), which should print your provider’s target. To check the subdomain’s DMARC policy, run dig @1.1.1.1 _dmarc.app.example.com TXT +short.
If any of these commands return an empty line, query Namecheap’s authoritative nameserver directly, for example dig @dns1.registrar-servers.com app.example.com MX +short, to see whether Namecheap has saved the record. If the authoritative server returns nothing, check your Host field for typing mistakes.
A Common Gotcha: SPF 10-DNS-Lookup Limit on Subdomains
A frequent mistake is copying the root domain’s SPF record straight onto the subdomain. If that root record includes Google Workspace, Zendesk, Salesforce, and Mailchimp, the nested lookups behind those includes can exceed SPF’s limit of 10 DNS lookups per check. The result is a PermError, and receivers such as Gmail then reject the mail as unauthenticated (550 5.7.26).
To avoid this, keep your subdomain SPF record lean. Authorize only the single service that sends mail from that specific subdomain. If app.example.com only sends messages through Postmark, your SPF record needs only Postmark:
v=spf1 include:spf.mtasv.net ~allDo not include Google Workspace or other office tools unless people actually send mail from that exact subdomain address. A short record keeps you well under the lookup limit.
If It Still Doesn’t Work
digreturns nothing for the subdomain: the Host field probably holds the full name (app.example.com), which createsapp.example.com.example.com. Edit the row so the Host is justapp.- No MX record appears for the subdomain: Mail Settings is still on a preset (Private Email or Email Forwarding), which only manages
@. Switch to Custom MX and add the row there. - Root domain mail stopped: switching to Custom MX removed the preset’s root MX rows. Re-enter them on host
@from the output you saved in Before You Start. - SPF shows
PermError: the subdomain has two TXT records starting withv=spf1, or the record needs more than 10 DNS lookups. Merge them into one short record. - Subdomain mail is rejected while you test: the root DMARC policy (
p=reject) applies to the subdomain. Add the_dmarc.apprecord withp=nonefrom Step 4 until SPF or DKIM passes.
Frequently Asked Questions
Can I use Namecheap’s built-in Mail Settings menu for a subdomain?
Yes, but only with Custom MX. The presets (Private Email, Email Forwarding) configure the root domain (@) only. For a subdomain, choose Custom MX and add an MX row with the subdomain prefix as the Host. The subdomain’s TXT records (SPF, DKIM, DMARC) go in the Host Records table above the Mail Settings panel.
Do I need an A record for my subdomain if it only handles email?
No. Mail delivery uses the MX record, so a mail-only subdomain doesn’t need an A or CNAME record pointing to a web server. Some receiving servers reject mail from a sender domain that has neither an MX nor an A record, but the MX record you added already passes that check.
Will changing subdomain MX records disrupt my main business email?
Not at all. Because DNS treats the subdomain as an independent hostname, your apex MX records (pointing to Google Workspace, Microsoft 365, or Namecheap Private Email) will operate without interruption. Only mail addressed specifically to @subdomain.example.com uses the new route.
What happens if I don’t set an MX record for the subdomain?
Mail sent to the subdomain bounces, unless its A record happens to point at a server that accepts mail. Mail sent from it can suffer too: replies and bounce notices have nowhere to go, and some receivers reject mail whose sender domain has neither an MX nor an A record. If your provider gives you an MX or Return-Path record, add it.
Next Steps
Send a test message from your app to a Gmail address, open it, and choose Show original. DKIM and DMARC should show PASS. SPF may be checked against your provider’s own Return-Path domain rather than app.example.com, which is fine as long as DKIM passes for your subdomain. Then watch your sender reputation in Google Postmaster Tools, and make sure the root domain has its own records in order with our guide on how to configure SPF, DKIM, and DMARC in Namecheap DNS.

