Essay · 9 min read
Host email and website separately by registrar.
Point your web records at your website and your mail records at your email host. The exact split DNS steps for Cloudflare, Namecheap, Porkbun, and GoDaddy.
One of the most persistent misconceptions in internet infrastructure is the belief that your email and your website must live with the same hosting provider. Web hosting companies encourage this confusion because bundling basic cPanel mailboxes with website hosting allows them to lock customers into expensive monthly packages. But in the Domain Name System, web traffic and mail delivery are completely decoupled protocols.
You can host your primary marketing website on Vercel, your e-commerce storefront on Shopify, your documentation on GitHub Pages, and your business correspondence on an independent email platform like Folio. Each service communicates with separate DNS resource records on the exact same domain name. This comprehensive guide covers the technical architecture of split DNS and provides exact, tested record-by-record instructions across the four most popular domain registrars.
The protocol separation: How DNS decouples web and email.
To understand why split hosting works seamlessly, consider what happens when a client interacts with your domain. When a prospective customer opens a web browser and navigates to example.com, the browser's resolver asks your domain's authoritative nameservers for an A (IPv4) or AAAA (IPv6) address record. The nameserver responds with the numerical IP address of your web server (for example, Vercel's edge IP 76.76.21.21). The browser connects directly over port 80 or 443. The web server never sees or handles email.
In contrast, when an email is dispatched to hello@example.com, the sending mail transfer agent ignores all A and CNAME web records. Instead, it queries DNS specifically for Mail Exchanger (MX) records per RFC 5321 (SMTP). Your DNS returns the hostnames of your email servers along with integer priority values. The sending MTA connects directly to your mail host on port 25. Because web traffic and email traffic never query the same DNS records, you can redesign, migrate, or take down your website without causing a single bounced email.
| Registrar / DNS Host | Root Hostname Syntax | Subdomain Hostname Syntax | TTL Recommendation | Critical Configuration Quirks |
|---|---|---|---|---|
| Cloudflare DNS | example.com or @ | subdomain (omit root domain) | Auto (proxied) or 1 min | MX and mail CNAMEs must be grey-clouded (DNS only); proxying bounces email |
| Namecheap | @ (explicitly required) | subdomain only | Automatic (30 min) | Must choose 'Custom MX' under Mail Settings; default forwards block external hosts |
| Porkbun | Leave host field blank | subdomain only | 300 seconds (5 min) | Automatically appends root domain; entering full FQDN results in doubled names |
| GoDaddy | @ for root | subdomain only | 1 Hour or 1/2 Hour | Must delete existing GoDaddy Microsoft 365 or workspace MX records before saving |
Scroll to see every column →
Split DNS setup on Cloudflare.
Cloudflare is one of the most widely used DNS providers due to its global anycast performance and DDoS mitigation. However, its signature 'Orange Cloud' proxying feature is the single most common cause of email routing failures among founders.
Cloudflare's proxy network is designed exclusively for HTTP and HTTPS protocols. When you enable the orange cloud proxy on an A record pointing to your website (e.g., pointing example.com to Shopify or Vercel), Cloudflare intercepts web traffic, terminates TLS at its edge, and forwards requests to your origin server. This is safe and beneficial for websites.
However, if you create an MX record pointing to a mail host or if you create a hostname like mail.example.com that carries an orange cloud proxy, Cloudflare attempts to proxy SMTP traffic over port 25. Cloudflare will reject the SMTP connection, and all incoming email will bounce immediately. To configure split hosting on Cloudflare correctly:
- ·Web Records (Orange Cloud): Add your web host's records (e.g. A record for
@to your web host's IP, and CNAME forwww). Toggle the proxy status to Proxied (Orange Cloud). - ·MX Records (Grey Cloud): Add your email host's MX records pointing to the mail server hostnames provided by your mail host (e.g.,
mail.folioinbox.comwith priority 10). Cloudflare automatically enforces DNS-only mode on MX records. - ·Authentication TXT Records: Add your SPF TXT record at root (
@) with contentv=spf1 include:_spf.folioinbox.com ~all. Add your DMARC record at_dmarc. - ·DKIM CNAME Records: Add your host's designated DKIM keys (e.g.
folio1._domainkey). Ensure the proxy toggle is strictly set to DNS only (Grey Cloud).
Split DNS setup on Namecheap.
Namecheap provides an 'Advanced DNS' dashboard that requires specific attention to its 'Mail Settings' sub-panel. By default, Namecheap often activates its proprietary 'Namecheap BasicDNS' or 'Email Forwarding' preset, which injects hidden internal MX records that conflict with external email hosting.
- 01Log in to Namecheap, navigate to Domain List, and click Manage next to your domain.
- 02Scroll down to the Mail Settings section. Change the dropdown selection from 'Email Forwarding' or 'Private Email' to Custom MX.
- 03Navigate to the Advanced DNS tab. In the Host Records table, add your web records: an
A Recordfor Host@pointing to your web host's IP, and aCNAME Recordfor Hostwwwpointing to your web host's domain target. - 04In the Mail Settings table, enter the MX hostnames and priorities given by your mail host. Namecheap strictly requires entering
@in the Host field for the root domain. - 05Add your SPF TXT record with Host
@, and add your DKIM records with the designated Host selector (e.g.,selector._domainkey).
Split DNS setup on Porkbun and GoDaddy.
Porkbun and GoDaddy represent two ends of the registrar spectrum: Porkbun is developer-friendly with minimal upsells, while GoDaddy often aggressively attempts to sell bundled Microsoft 365 email licenses.
On Porkbun, the most frequent configuration error is hostname doubling. Porkbun automatically appends your domain name to whatever you type in the Host field. When entering an MX record or SPF record for the root domain, leave the Host field completely blank. When entering a DKIM selector like folio1._domainkey.example.com, enter only folio1._domainkey in the Host field. Entering the full domain name results in folio1._domainkey.example.com.example.com, causing DKIM validation to fail completely.
On GoDaddy, if you previously purchased or trialed an email service, GoDaddy locks the MX records to its proprietary Microsoft 365 gateway (mail.protection.outlook.com). Before your new email host's MX records will function, you must manually delete all pre-existing MX records and any TXT records referencing spf.protection.outlook.com. In GoDaddy's DNS Manager, root records take @ in the Name field.
Verification: How to confirm your split DNS works.
After publishing your split DNS records, do not rely on browsing your website or sending a single test email from your phone to declare success. Run a thorough end-to-end technical audit:
- 01Query public DNS resolvers: Use Folio's free email domain health checker to query global recursive resolvers for your MX, SPF, DKIM, and DMARC records. Confirm that all four records return green passing verdicts.
- 02Verify web routing: Open a private browser window and verify that both
https://example.comandhttps://www.example.comresolve to your web application without TLS certificate warnings. - 03Send an inbound test: Send an email from an external personal account to your custom domain address. Confirm that the message appears in your inbox within 30 seconds.
- 04Send an outbound test and inspect headers: Reply to the test email. In the receiving account (such as Gmail), select 'Show Original' and inspect the raw authentication results. Verify that
spf=pass,dkim=pass, anddmarc=passall reflect your custom domain.
TTL management: Preventing stale DNS routing during cutovers.
A critical yet frequently overlooked element of split DNS architecture is Time To Live (TTL) management. Every DNS resource record carries a TTL value specifying how many seconds recursive resolvers around the world are allowed to cache the answer before asking your authoritative nameservers for a fresh copy.
When you register a domain or use default registrar templates, TTL values are typically set to 14,400 seconds (4 hours) or 86,400 seconds (24 hours). If you modify an MX or A record with an active 24-hour TTL, external mail servers and web browsers will continue routing traffic to your old servers for up to a full day. To execute a split hosting migration smoothly without service disruption:
- ·Step 1 (48 hours before cutover): Lower the TTL on all existing A, CNAME, and MX records to 300 seconds (5 minutes). This ensures that upstream DNS caches purge old records rapidly.
- ·Step 2 (During cutover): Publish your new mail host's MX records and web host's A records. Because the TTL is 300 seconds, the new routing propagates globally in under 10 minutes.
- ·Step 3 (48 hours after cutover): Once you have verified that incoming mail and web traffic are resolving cleanly on the new infrastructure, raise your TTL values back to 3,600 seconds (1 hour) or 14,400 seconds (4 hours) to reduce authoritative DNS lookup volume.
Subdomain routing patterns for specialized web applications.
In many growing business architectures, web operations expand across multiple platforms simultaneously. A solo operator might run a marketing landing page on Webflow (apex domain example.com), an application portal on AWS or Vercel (app.example.com), and a support documentation site on GitBook (docs.example.com).
Split DNS accommodates this complexity effortlessly. Subdomain A or CNAME records route web requests to their respective servers without touching root-level MX records. Even if you maintain four different web hosting providers across four subdomains, all business email sent to anything@example.com delivers exclusively to your unified email host.
If you are setting up email for a domain that has no active website and will remain a parked domain, review our step-by-step walkthrough on custom domain email without a website and our tactical guide on how to host email and website separately. For multi-domain founders who want to manage up to 3 or 10 separate business domains from a single unified screen, explore Folio's flat-rate plans or compare long-term hosting economics on the multi-domain email price index.
Questions readers ask
Can I host my email on a different server than my website?
Yes. In the Domain Name System, website traffic is routed by A and CNAME records, while email is routed by MX records. You can host your website on Vercel or Shopify and your email on a dedicated host like Folio without any conflict.
What is the Cloudflare orange-cloud proxy mistake with email records?
Cloudflare's proxy network only proxies HTTP and HTTPS web traffic. If you set an MX record or a mail subdomain to proxied (orange cloud), Cloudflare masks the IP address with a web proxy, causing sending mail servers to bounce all incoming messages.
Does Namecheap require the @ symbol for root MX records?
Yes. In Namecheap's Advanced DNS dashboard, the root domain must be entered explicitly as @ in the Host field when adding MX or TXT records.
Will migrating my website break my existing email?
Not if your nameservers stay at your registrar. As long as you only edit A or CNAME records when moving web hosts, your published MX, SPF, and DKIM records remain untouched and your email delivery continues uninterrupted.
Sources & further reading
§ Google Search
Make Folio a preferred source.
If you read Folio often, add it as a preferred source. Google can then mark our writing as preferred in Top Stories, AI Overviews, and AI Mode for you.
Change or remove it any time in Google’s source preferences.