Route Subdomain Email with Custom MX Records in Namecheap

by Fahim

You set up a staging app, a ticketing tool, or an inbound webhook service, and you need @mail.domain.com or @app.domain.com to handle its own mail without touching your primary Google Workspace or Microsoft 365 inbox. Touch the wrong dropdown in Namecheap, though, and you’ll easily kill email routing for your entire root domain.

Here is how to add custom MX records to a subdomain using Namecheap’s Advanced DNS, wire up the SPF and DKIM authentication records you need so messages don’t drop, and dodge the trailing-dot bug that trips up almost everyone in Namecheap’s dashboard.

Terminal screen showing dig command verifying custom subdomain MX records
Terminal screen showing dig command verifying custom subdomain MX records

The Catch with Namecheap Mail Settings and Subdomains

Namecheap handles DNS differently than standard BIND zone files or Route 53. In their dashboard, you’ll see two separate areas dealing with email: the Host Records table and the Mail Settings section further down the page.

When most people set up MX records, they instinctively scroll down to Mail Settings, flip the picker to Custom MX, and enter hostnames and priorities. Don’t do that here. The Mail Settings section applies only to your root domain (@). There is zero UI support there for targeting a subdomain.

If you need to route mail for helpdesk.example.com or notify.example.com, completely ignore that bottom section. Subdomain MX records belong right inside the primary Host Records table as standalone entries where the host field points strictly to your subdomain prefix. If you’re managing complex routing across external hosts, take a look at how to point Namecheap DNS to Hostinger without breaking email.

What We Are Building: Architecture and Use Cases

Splitting mail traffic across subdomains is standard practice in production. I almost always set this up for three reasons:

  • Protecting your main sender reputation: High-volume password resets or bulk notifications won’t burn your primary company domain if something gets marked as spam.
  • Routing inbound webhooks cleanly: Services like Postmark, SendGrid, or AWS SES listen on dedicated subdomains (like inbound.example.com) to parse incoming emails directly into JSON payloads for your webhooks.
  • Multi-tenant or staging environments: Letting a sandbox server receive mail without buying another domain.

Here is what the zone layout looks like when set up correctly:

# Root domain remains untouched (handled by your main provider)
example.com. MX 1 aspmx.l.google.com. # Subdomain routes independently to your custom mail server or transactional engine
notify.example.com. MX 10 inbound.postmarkapp.com.
notify.example.com. TXT "v=spf1 include:spf.mtasv.net ~all"

Both your root and subdomain live inside the same zone file in Namecheap, operating completely independently without stepping on each other.

Step 1: Locate Advanced DNS in Namecheap

Log in to Namecheap, head to your Domain List, and hit Manage next to the domain.

Click over to the Advanced DNS tab. Before touching any records, check the Nameservers field back on the main Domain tab. It must be set to Namecheap BasicDNS or Namecheap PremiumDNS. If it points to Cloudflare, DigitalOcean, or your web host, changes made here won’t do anything because outside nameservers are handling resolution. If that’s your setup, check our guide on how to set up Namecheap Private Email MX records on an external domain.

Once you’ve confirmed you’re using Namecheap’s DNS, jump back to Advanced DNS and scroll to the Host Records table.

Step 2: Add the Subdomain MX Record

Click Add New Record at the bottom of the Host Records table.

  1. Set Type to MX Record.
  2. Set Host to just your subdomain prefix. For hello@notify.example.com, enter notify. Do not type notify.example.com.
  3. Set Value (or Mail Server) to your mail provider’s endpoint (for example, inbound.postmarkapp.com or mx1.privateemail.com).
  4. Set Priority to whatever your provider asks for (usually 10).
  5. Set TTL to Automatic (or 1 min while testing so changes take effect fast).
  6. Click the green checkmark to save.

If your provider has backup servers, add another MX row with the exact same Host string, the backup mail server in the Value field, and a higher priority number (like 20).

Conceptually, here is what the zone configuration looks like once saved:

Type Host Value Priority TTL
MX Record notify inbound.postmarkapp.com 10 1 min
MX Record notify inbound2.postmarkapp.com 20 1 min

Keep the Host field clean. Namecheap silently appends your root domain behind the scenes.

Step 3: Configure Subdomain SPF, DKIM, and DMARC

An MX record routes incoming mail to your server. But if that subdomain also sends out transactional receipts or automated alerts, major providers like Gmail and Yahoo will bin them unless you set up explicit authentication records for that exact subdomain.

A root domain SPF record does not cover your subdomains under RFC 7208. You must add a separate TXT record for the subdomain itself. For a broader look at baseline DNS security, check our guide to configure SPF, DKIM, and DMARC records in Namecheap Advanced DNS.

Click Add New Record under Host Records and add your subdomain SPF:

Type Host Value
TXT Record notify v=spf1 include:spf.mtasv.net ~all

Next, add your DKIM record. Your mail provider usually gives you a selector such as 202405._domainkey. In Namecheap, attach your subdomain prefix to that selector:

Type Host Value
TXT Record pm._domainkey.notify k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ...

Finally, you can define an explicit DMARC policy for the subdomain, or rely on your root record’s sp= tag per RFC 7489.

The Gotchas That Break Subdomain MX in Namecheap

The first time I set this up on Namecheap for a client, incoming mail silently vanished for nearly an afternoon. These three mistakes cause almost every subdomain MX issue on this platform:

1. The Fully Qualified Domain Name (FQDN) Double-Append

If you enter notify.example.com in the Host field, Namecheap does not correct it. It automatically appends your root domain anyway. Your record ends up looking like this:

# What Namecheap actually published:
notify.example.com.example.com. IN MX 10 inbound.postmarkapp.com.

Resolvers looking for notify.example.com get an NXDOMAIN and bail out. Enter only the prefix (like notify).

2. The Trailing Dot Issue

In standard BIND syntax, mail hosts end with a trailing period. In Namecheap’s web UI, adding that trailing period (like mail.example.com.) will often fail validation or cause the entry to break completely. Leave off the trailing dot when typing the mail server address.

3. Conflicting CNAME Records

Under RFC 1034, a DNS label cannot have both a CNAME record and any other record type. If you already have a CNAME pointing notify to Heroku, Vercel, or a CDN, your MX record will behave erratically or be completely ignored.

If you’re serving web traffic from that same subdomain, use an A Record with an IP address instead of a CNAME. For more on running web and mail side-by-side, see how to point a Namecheap subdomain to Hostinger without touching the main site.

Step 4: Verify Your MX Routing with the Command Line

Skip web-based lookup tools right after saving. They frequently cache failed queries. Use dig or host from your terminal to hit public resolvers directly.

Run these to check Google and Cloudflare nameservers:

# Query Cloudflare resolver directly for subdomain MX
dig MX notify.example.com @1.1.1.1 +short

If the record is live, you’ll see your priority and mail target back right away:

10 inbound.postmarkapp.com.

If the response comes back blank, query Namecheap’s authoritative nameservers directly to see if the record actually saved to their zone:

# Find authoritative nameservers for the domain
dig NS example.com +short # Query Namecheap authoritative nameserver directly
dig MX notify.example.com @dns1.registrar-servers.com

Check the ANSWER SECTION. If the record shows up there, Namecheap did its job and you’re just waiting for local resolver caches to expire.

Testing Inbound Routing with an SMTP Handshake

Once DNS returns the right MX host, confirm that the receiving mail server is actually accepting connections for your subdomain before you start pushing real production traffic.

Run a quick handshake check using nc (netcat) or swaks over port 25:

# Connect to the MX host on SMTP port 25
nc -zv inbound.postmarkapp.com 25

You should see a clean SMTP banner response:

Connection to inbound.postmarkapp.com 25 port [tcp/smtp] succeeded!

After that passes, send a real test email from your personal inbox to an address like test@notify.example.com, then check your server logs or webhook dashboard to confirm delivery.

Frequently Asked Questions

Can I use Namecheap Free Email Forwarding on a subdomain?

No. Namecheap’s built-in email forwarding only works on the root domain. Selecting “Email Forwarding” in the Mail Settings dropdown only impacts @example.com. If you need free forwarding on a subdomain, point your subdomain’s MX records to an external service like Cloudflare Email Routing or ImprovMX.

Does adding a subdomain MX record affect my root domain emails?

No. In DNS, notify.example.com and example.com are separate tree nodes. Modifying or adding MX records for the subdomain won’t disrupt your existing Google Workspace, Microsoft 365, or Private Email setup on the root domain.

What should the priority number be if I only have one MX record?

Any integer between 0 and 65535 works. 10 is the standard convention. Priority values only matter to sending MTAs when there are multiple records to choose between.

Why does dig return MX records for my root domain when I query my subdomain?

If you query a subdomain that doesn’t have its own MX records, some resolvers fall back to the root, but most return nothing. However, if your subdomain has a CNAME pointing to the root domain, resolvers will follow that alias and return the root domain’s MX records. Delete the CNAME on that subdomain to fix it.

Where to Go Next

Once your subdomain is properly receiving mail without interfering with your root inbox, make sure your outbound messages actually land in inboxes. Take a look at our step-by-step guide to configure SPF, DKIM, and DMARC records in Namecheap Advanced DNS so your transactional emails don’t get swallowed by spam filters.

all_in_one_marketing_tool