DNS Guide: Namecheap
Step-by-step instructions for adding AgentMail DNS records in Namecheap.
Steps
- Log in to your Namecheap account
- Go to Domain List → click Manage next to your domain
- Select the Advanced DNS tab
- Click Add New Record for each record AgentMail requires
Make sure your domain is using Namecheap BasicDNS or Namecheap PremiumDNS as its nameserver. If you’ve pointed your nameservers to another provider (e.g., Cloudflare), you’ll need to add records there instead.
Records to add
AgentMail returns the exact records for your domain in the AgentMail Console and in the records array of the Create Domain response. Always copy the values shown for your domain. For a US-region domain named example.com, the full set looks like this:
- SPF lives on
mail.example.com, not your root domain. AgentMail sends with a custom MAIL FROM subdomain, and SPF is checked against that hostname. Do not add anything to an existing SPF record on your root domain (for example one for Google Workspace or Microsoft 365). - The
mailMX must be the only MX record atmail.example.com. If another MX record exists at that host, verification reportsduplicate_records. This record carries bounces and complaints; it does not receive inbox mail. - DMARC needs a reporting address. If
_dmarc.example.comalready has a DMARC record, keep that single record instead of adding a second one, and make sure it includes arua=mailto:tag. - DKIM needs exactly one TXT record at the selector host. Remove any older record at the same selector.
- Send-only domains: create the domain with
inbound_enabledset tofalseand the receiving MX is left out, so your existing provider keeps receiving mail. - Region: EU-region domains use
eu-central-1in the MX values in place ofus-east-1. - Subdomains: names are relative to your DNS zone. For
agents.example.com, the hosts becomeagents,mail.agents,_dmarc.agents, and<selector>._domainkey.agents. - Optional records: a
linkCNAME is added whentracking_enabledis on, and a wildcard*MX whensubdomains_enabledis on. - Older domains may show three DKIM
CNAMErecords (<token>._domainkeypointing to<token>.dkim.amazonses.com) instead of one DKIM TXT record. Keep them if they already verify.
Adding the TXT records (SPF, DKIM, DMARC)
Add one TXT record for each row below:
Set Type to TXT Record and TTL to Automatic for each one.
Namecheap automatically appends your domain to the Host field. Enter only the host portion. For example, enter selector._domainkey, not selector._domainkey.yourdomain.com.
Do not add anything to an existing SPF record on your root domain (@). AgentMail’s SPF record goes on the mail host, so your existing SPF for Google Workspace or another service stays exactly as it is.
Legacy orgs should keep existing working DNS records in place. For new domain setup, add the TXT selector records shown in AgentMail.
Adding the MX records (receiving and bounces)
Add one MX record for each row below:
Namecheap lists MX records in the Mail Settings section of the Advanced DNS tab. Set it to Custom MX to add them.
Set TTL to Automatic. Skip the receiving MX if you created the domain as send-only (inbound_enabled: false). The mail MX must be the only MX record on the mail host.
If you registered a subdomain such as agents.yourdomain.com to avoid conflicts with your existing email provider, add the subdomain to every host: agents, mail.agents, _dmarc.agents, and selector._domainkey.agents.
Verification
After adding all records, go back to the AgentMail Console and click Verify Domain.
Namecheap DNS typically propagates within 15 to 30 minutes, but in some cases it can take up to a few hours. If verification doesn’t succeed immediately, wait and try again.
Common Namecheap Issues
-
Host field auto-appends domain: Namecheap adds your domain automatically. If your DKIM selector is
selector._domainkey, enter just that, not the fullselector._domainkey.yourdomain.com. If you enter the full value, the actual record will end up asselector._domainkey.yourdomain.com.yourdomain.com. -
Existing SPF record on your root domain: Leave it unchanged. Do not add
include:agentmail.toor any other AgentMail value to it. If an earlier guide told you to addinclude:agentmail.to, remove that mechanism:agentmail.topublishes no SPF record, so the include causes an SPF permanent error. -
Switching Mail Settings to Custom MX: If Mail Settings is currently Gmail, Private Email, or Email Forwarding, switching to Custom MX replaces the MX records Namecheap was managing for that option. Re-add any MX records your existing email provider needs before saving, or your current email stops arriving.
-
Wrong nameserver: If your domain uses Custom DNS nameservers (e.g., pointing to Cloudflare or Route 53), records added in the Namecheap Advanced DNS panel will have no effect. Add your records at the provider that controls your nameservers instead.
-
Propagation delays: Unlike some providers, Namecheap propagation can take 15 to 30 minutes. If verification fails, wait and retry before troubleshooting further.
