Operations

Move Your Website to a New Host Without Interrupting Email

Keep your existing email provider and change only the website DNS records when the current nameservers and mail-related hostnames can stay in place. If the authoritative nameservers must change, build and check the complete DNS zone at the destination before you switch. Confirm who owns the mailboxes and test real message delivery before you close the old host.

Your website and company email can share a domain while running on different services. The homepage may load fine on the new server while contact forms, same-domain messages or existing mailboxes break.

Start with the accounts behind the domain, then pick the smallest migration route your site needs.

Before you migrate, find out who owns your domain, DNS, website, and email

hosting service ownership

Registrar access and mailbox administration can belong to separate accounts. Map the providers and administrators before you change anything live.

  • Registrar: Who controls registration and the delegated nameservers.
  • Authoritative DNS: The provider publishing the domain’s live zone, and who can edit it.
  • Website hosting: Where the site runs now, and who controls the new hosting account.
  • Mailboxes: The service that receives and stores business messages, plus its administrator and subscription.
  • Website sender: The SMTP account, sending API, plugin or local server mailer behind contact forms and notifications.
  • Billing dependencies: Which old product or account pays for mail, forwarding or another hidden service.

For each service, keep one entry in this format: service | provider/account | administrator | destination | billing dependency | confirmed or unknown. Leave an unknown administrator or subscription marked unresolved until you find the account that holds the mailbox entitlement.

mailbox account dependencies

An OVH incident shows how this plays out. A developer had taken over domain and DNS control for a client while email kept running. The email administration was invisible to them, and an old hosting product blocked the new website. Before changing MX records, DKIM signatures or mailbox ownership, review the business email hosting and DNS authentication requirements.

Additionally: – The domain transferred is currently attached to a free 100MB OVH hosting plan. – I need to remove this hosting to attach the domain to a new hosting (new website). – Can I safely delete this hosting without impacting emails, assuming DNS/MX records remain unchanged? Or is it possible that the email service is somehow tied to this hosting Because until this hosting server is up and the domain I need is linked to it, I cannot add it on the multisite of the right hosting. And I get the “Website in construction” page (even tho the DNS are pointing to the right server) Of course, I have opened a ticket with the support, but this matter is urgent and worrying, so I am trying to get any information I can. ⚠️ Email continuity is absolutely critical for the client, so I cannot risk any interruption. Thanks a lot in advance

r/OVHcloud
If you can’t identify the current mailbox service or its billing dependency, keep every potentially related account active until the responsible provider or account owner confirms what cancelling would affect.

Choose the right route: change web records, change nameservers, or move email too

website migration routes

A website-only move can use the existing authoritative DNS service. Changing nameservers brings in a whole new zone, and moving stored mailboxes is another project on top.

RouteWhat changesWhat staysDeciding condition
A: Web records onlyThe website A, AAAA or CNAME targets that need to changeCurrent nameservers and mailbox providerNo essential mail hostname depends on the changed target, and server-side mail routing is covered
B: NameserversRegistrar delegation to a prepared authoritative DNS zoneExisting mailbox serviceThe new zone holds every required service record, and any DNSSEC settings are coordinated
C: Website plus mailboxesWebsite and mailbox service, with matching routing changesOnly the services you explicitly keepA separate plan covers mailbox data, synchronization, old/new delivery and rollback

Route A is the smaller change when your current DNS provider stays authoritative. It gets harder when a mail hostname relies on a web address that is about to move.

Say mail.example.com is an alias of example.com. Moving the apex A record to a new web server also changes the address that mail hostname reaches. WP Engine documents this kind of email-related DNS dependency. Fix the relationship according to your email provider’s required configuration before the website-only cutover.

If that alias is an MX destination, it violates RFC 2181, which requires an MX destination to be a canonical hostname with address records. Other mail-related CNAMEs can serve provider-specific purposes, such as client discovery.

A domain can use Cloudflare for authoritative DNS while Microsoft 365 keeps hosting the mailboxes. Route B then changes the DNS authority, so the new zone needs your organization’s Microsoft 365 records.
domain nameserver choices

Route C needs its own mailbox-migration procedure, because stored messages move through a separate transfer process. A domain registration transfer has a separate administrative scope too and may leave nameservers and mailbox hosting unchanged.

Pick A, B or C and write down which services move. That decides which records go in your change plan.

Save the current DNS and email settings before anyone edits them

email DNS records

Capture the live authoritative zone and compare it against your planned DNS state.

Use your DNS administrator’s export or record inventory. For each record, list the name, type, exact value, TTL, priority where applicable, service owner, and action: keep, copy, modify or investigate.

Fill the two blank columns with the current and planned values for each record group. The last column is the condition that must hold. Leave unresolved values blank until the responsible service owner confirms them.

RecordCurrent authoritative valuePlanned valueExpected actionDependency / pass condition
NS delegation________________Keep for A; change for BThe authoritative nameservers you chose answer after cutover
A / AAAA / CNAME for apex and www________________Update website destinationSite resolves to the new web host
MX and priority________________Keep if mail provider is unchangedProvider’s MX targets and priorities stay; each target is a canonical hostname
Mail-host A / AAAA; other mail-related CNAME________________Keep records that mail still depends onMX target addresses resolve correctly; service aliases follow provider requirements
SPF TXT________________Compare effective sender authorizationDNS-dependent a, a:hostname or mx mechanisms still authorize your senders
DKIM selector TXT / CNAME________________Keep active selectorsThe signing provider’s required keys resolve
DMARC TXT at _dmarc________________Keep configured policyExisting DMARC reporting and policy remain
Autodiscover and service records________________Keep if the service staysClients find the mail service
DS / DNSSEC________________Coordinate for signed Route BRegistrar DS and authoritative DNSSEC state match
Other TXT, SRV, or subdomains________________Keep unless the owner approves a changeOther domain services keep the records they need

Look closely at SPF when the policy contains a, a:hostname or mx. RFC 7208 defines these mechanisms using DNS-derived addresses, so changing the address they resolve to can change the authorized sending IPs without any edit to the SPF TXT value.

MX locates inbound mail exchangers. SPF, DKIM and DMARC cover sender authorization, signatures, authentication and policy. For Microsoft 365, take values from your organization’s own administration settings. The Microsoft 365 DNS documentation describes the roles of MX, Autodiscover and SPF, including its guidance to keep one coherent SPF policy record per domain name.

mail DNS comparison

DKIM selectors come from a configured sending provider or from the selector named in a signed message.

A nonprofit’s web consultant changed DNS and pointed mail routing at the website server. The person troubleshooting it described what followed:

My son works for a non-profit who had a web consultant move their DNS without asking and, in the process, completely f**ked-up email by pointing all their MX at the webserver, which is not what NPO wants (or is paying for). Anyway, they know that I’m in IT (actually Infosec now) and asked if I could help. I believe I’ve got everything setup right. Email is going in and out, checked the headers and it appears that SPF, DKIM and DMARC are setup properly.

r/sysadmin

For Route B, build the replacement zone before you change delegation. Cloudflare’s full setup guide warns that automatic DNS scans can miss records, so reconcile every difference before you approve the zone.

Prepare the new website without disturbing the live email service

website staging checks

Build the replacement site on the new host and preview it through a staging URL or another method your provider supports before you edit public DNS. Check how the apex and www behave, confirm HTTPS works, and test the sender configured for contact forms or application notices. Keep the previous website available until the switch is done. If you plan to lower the TTL, do it early enough to cover previously cached TTL values.

Cut over the website without silently changing mail routing

DNS migration cutover

For Route A, edit the website records at your existing authoritative DNS service, using the new host’s exact destination values. These can include the apex A or AAAA record and www. Leave the independently hosted mail service and the dependencies from your inventory alone.

For Route B, configure the replacement authoritative zone first, with website destinations, existing mail records, authentication records and other live domain services. Change the registrar’s delegated nameservers once the required entries and validation prerequisites are in place. For decisions on domain registration, DNS hosting and website accounts, consult the hosting, domain, and DNS ownership guide.

In a conventional full setup with Cloudflare, its guidance says to disable the previous registrar-side DNSSEC configuration before switching nameservers and enable the new one after activation. Other providers or coordinated DNSSEC migrations can need a different procedure, so follow your selected provider’s method.
authoritative DNS change

Whichever route you take, keep a change log with the old value, new value, responsible administrator and reversal procedure. Keep your existing MX destinations when the mail provider is unchanged.

Test incoming, outgoing, internal, and website-generated email

email delivery tests

Run controlled delivery tests on every mail route your business uses. Use distinctive subjects and record the sender, recipient, time, result and any rejection code.

Mail pathTestEvidence to record
External to businessSend from an unrelated mailbox to an existing company addressArrival in the live business inbox
Business to externalSend from an authorized company mailbox to an external inboxReceipt at the external inbox, or the specific refusal
Same domainSend between two company addresses, if applicableReceipt through the mail service you expect
Website-generated messageSubmit a real contact form or an application noticeDelivery through the site’s configured sender
Alias or forwardingSend to an existing alias or forwarderDelivery to the configured final destination
Mail clientUse your normal client or webmail serviceSuccessful connection and the mail operation you need

Mark each path pass, fail or not applicable. A public MX query shows the reported destination, but actual receipt is what passes an inbound test.

mail acceptance evidence

A client sign-in or Autodiscover failure can occur while webmail still receives messages. Contact forms can use authenticated SMTP, a sending API or local hosting-server delivery, so they need their own row.

Keep the message header or SMTP response for any failed test. It can identify the responding system and separate a transport rejection from an authentication or mailbox problem.

If the website works but email fails, diagnose the failing path first

email failure diagnosis

An external bounce, an undelivered contact-form notification and a failed Outlook connection call for different investigations. Start with the route that failed and the error response.

SymptomFirst checkWhat to do
External sender receives a bounceAuthoritative MX, MX target resolution, mailbox existence, SMTP responseFix the mail destination or account problem the check finds
External mail arrives; website messages failApplication sender and host-local routing for the domainCorrect the site’s submission or delivery configuration
Outbound mail is rejected or filteredSender identity, SPF/DKIM/DMARC results, SMTP refusalFix the sender or authentication failure
Webmail works; Outlook failsClient authentication, settings, AutodiscoverRepair the client or discovery configuration
Mail appears in an old inboxOld and new mail service, sender routeLook for split delivery before closing that mailbox

An SMTP 550 response is a permanent rejection. It can mean an unknown recipient, unavailable access or a policy refusal. Read the full response text and note which server issued it before you decide what to investigate.

One subtle cause is a new web server treating your domain as a local email destination while the real mailbox service sits elsewhere. In cPanel, the Local Mail Exchanger, Backup Mail Exchanger and Remote Mail Exchanger options control this. Automatic detection reads the local DNS zone, and later zone changes do not refresh a routing setting already chosen. The cPanel Email Routing documentation covers the configuration. Other hosting platforms make the same routing decision under different controls.

server mail routing

A website owner moved a site from Cloudway(s) to SiteGround and kept the domain and email with GoDaddy. The reported failures involved internal messages and mail generated by the website:

After changing the website host from Cloudway(s) to SiteGround, our email is no longer working. The domain name and email accounts are still with GoDaddy, and we do not want to change either of those. Nothing was changed but we are not receiving emails internally as well as from the website to internal email. Does anyone have tips on how to get the email working properly again with this setup?

r/webhosting

The post describes symptoms without saying which configuration caused them. Use the failed path and any SMTP response to find the smallest reversible repair, then rerun that path’s test.

Handle DNS caches, DNSSEC, and mail-record edge cases without guessing

DNS resolver diagnostics

Different answers can be correct observations of different DNS states. A recursive resolver may still hold a cached record while the authoritative zone already has the new value. For details on DNS TTL, recursive resolvers and cached records, use the DNS TTL and resolver caching explanation.

First check the delegated authority, then compare a recursive reply with a direct answer from an actual authoritative nameserver. These commands use illustrative domain and server names.

dig NS example.com +short
dig +trace example.com NS +noall +authority +nodnssec
dig MX example.com +short
dig TXT example.com +short
dig TXT _dmarc.example.com +short
dig @ns1.example-dns.net example.com MX +noall +answer
dig TXT selector._domainkey.example.com +short
dig DS example.com +short

The plain dig NS result shows what a resolver says. The trace follows delegation toward the parent zone. The explicit @ns1.example-dns.net query targets the named server, so first confirm it is an authoritative server for the domain.

For DKIM, replace selector with one from your provider or a signed message. Check DS information separately if you use DNSSEC.

DNSSEC mail dependencies

A SERVFAIL after a nameserver change can justify reviewing the registrar’s DS record and the new authority’s DNSSEC configuration, though several other causes also produce that response. If you use Cloudflare’s web proxy, configure mail-related hostnames for ordinary mail protocols following its DNS-only guidance.

If a domain has no explicit MX record, does inbound email always fail?

RFC 5321 describes a limited fallback to address records when no MX record is published. It works only if the destination accepts mail, and it does not replace the MX records your provider requires.

When you escalate a resolver disagreement, send the returned records, the queried server and the observed time together. Stop editing authoritative entries while you investigate caches, because each edit makes the evidence harder to read.

Keep a rollback route and retire the old hosting only after mail passes

hosting rollback decision

Keep the old hosting account until you understand its service dependencies and the new environment passes the website and mail checks. Cancelling it is a separate decision from changing DNS.

  • Service ownership: You know the mailbox product, administrator, billing relationship, forwarding rules and application sender.
  • DNS restoration: Original records or delegated nameservers are documented, and the responsible administrator can restore them.
  • Mail acceptance: Inbound, outbound, same-domain, application and forwarding paths have passed, or each failure is documented.
  • Old mailbox data: If the mailbox service itself moves, a separate plan covers message storage, synchronization and possible deliveries to the old server.
  • Website data: Purchases, submissions and newer database writes are recorded before you restore an earlier website origin.
  • Rollback owner: An authorized person keeps the needed account access and knows which infrastructure can be reversed.
old hosting retirement

Reverting a website DNS record restores the previous destination as caches refresh.

Mail errors have their own consequences. SMTP’s temporary response class lets sending systems retry, while a permanent rejection can bounce immediately. The SMTP protocol specification defines these response classes and the sender behavior that goes with them.

For delegated nameservers, DNSSEC validation and SERVFAIL responses, consult the DNS resolution troubleshooting runbook.

Leave a Reply

Your email address will not be published. Required fields are marked *