How to Migrate a Business Website Without Breaking Email or DNS

10 views 23 min read
How to Migrate a Business Website Without Breaking Email or DNS

To move a business website without disrupting email, identify the systems behind the domain, test the new website, and change only the DNS records needed for web traffic. Keep the existing mail service active and verify both inbound and outbound mail after cutover.

1. Understand What You Are Actually Migrating

Before moving anything, identify which services are changing.

A business domain may be connected to several providers.

For example:

Service Example responsibility
Domain registrar Maintains domain registration
DNS provider Publishes DNS records
Website hosting Runs the public website
Email provider Sends and receives business mail
CDN or reverse proxy Routes and protects web traffic
Application provider Runs business forms, databases and workflows

These services can be supplied by one company or several different companies.

A business might register its domain with one provider, use Cloudflare for DNS, host its website on cPanel and use Microsoft 365 for email.

In that situation, moving the website does not normally require transferring the domain registration, replacing the DNS provider or migrating the email mailboxes.

Three different types of migration

Website-only migration: Move website files, database and application configuration while preserving the domain name and email provider.

Website and email migration: Move the website and transfer mailboxes or email services to a new provider.

Full domain and hosting migration: Change the domain's DNS management or registration arrangements alongside website or email infrastructure.

These should not be treated as the same operation.

For most website-only migrations, the safest approach is to change only the records and services that actually need changing.

2. Identify Where Your Business Email Is Hosted

The first step in protecting email is determining which provider handles incoming messages.

Do not assume business email is hosted by the same company that hosts the website.

Scenario A: Email hosted on the existing cPanel account

Suppose a company has:

  • Website: www.example.com
  • Email: [email protected]
  • Hosting: Existing shared cPanel server Both the website and the mailboxes may be located on the same hosting account.

If the website moves to a different server, the existing email service might continue operating on the original server.

However, the company must retain the old email service and preserve its mail-routing DNS records.

If the original hosting account is cancelled, mailboxes hosted there may stop working.

Therefore, keeping email on the old server may only be a temporary arrangement until a separate email migration is completed.

Scenario B: Email hosted with Microsoft 365 or another provider

The business website may use cPanel while email is handled independently by Microsoft 365, Google Workspace or another email provider.

In this case, moving the website should not require changing the email provider's MX records.

The email configuration should be preserved unless there is a specific, authorised reason to change it.

Scenario C: Website and mail share a DNS hostname

This is a particularly important situation.

Suppose the MX record points to example.com and the domain's A record points to the current hosting server.

If you change the A record to the new website server, the MX hostname may now resolve to the new server as well.

Even though the MX record itself has not changed, incoming email can be affected.

The correct solution depends on the existing setup. It may involve configuring a dedicated mail hostname and ensuring the MX record points to the intended mail provider.

Never assume that leaving the MX record unchanged guarantees email continuity. Check the hostname that the MX record resolves to.

3. Understand the DNS Records Before Changing Them

DNS tells computers and services where to find the systems associated with a domain.

Different DNS records serve different purposes.

During a website migration, the following records deserve particular attention.

DNS record Purpose Migration consideration
A Connects a hostname to an IPv4 address May need updating for the new web server
AAAA Connects a hostname to an IPv6 address Check for an old server address
CNAME Points a hostname to another DNS name Preserve or update according to the intended service
MX Identifies incoming mail exchangers Preserve unless email routing is changing
TXT (SPF) Authorises email-sending sources Review if the sending service changes
DKIM Supports email authentication through signed messages Preserve the provider's records
DMARC Defines authentication policy and reporting Preserve and validate
CAA Can restrict which certificate authorities issue certificates Check compatibility with new certificate issuance
SRV and service records Support certain service discovery configurations Preserve where required

Not every business uses every record type.

The important requirement is to inventory the existing records and understand their purpose.

Example DNS configuration

Consider this illustrative configuration:

example.com       A       192.0.2.10
www.example.com   CNAME   example.com
mail.example.com  A       192.0.2.20
example.com       MX      mail.example.com

The website uses 192.0.2.10.

The email server uses 192.0.2.20.

If the website moves to 198.51.100.30, the web A record may need to change.

The mail hostname and MX record can remain associated with the existing email service.

The addresses above are documentation examples, not real server addresses.

What if the company uses Cloudflare?

If Cloudflare is the authoritative DNS provider, DNS record changes should be made in Cloudflare.

Updating records inside an unrelated cPanel DNS zone will not necessarily affect public DNS.

Always identify the domain's active authoritative nameservers first.

When Cloudflare proxies web traffic, public DNS lookups normally return Cloudflare addresses rather than the origin server's actual IP address.

This matters when testing a migration: public DNS output alone may not reveal which origin Cloudflare is using.

4. Perform a Complete Pre-Migration Audit

A migration should begin with an inventory, not a file transfer.

Website information

Record:

  • Domain and relevant subdomains.
  • Current hosting provider.
  • Application framework or CMS.
  • PHP and database versions.
  • Website document root.
  • Public URLs.
  • Media storage locations.
  • Scheduled tasks.
  • Application environment requirements.

Email information

Record:

  • Email provider.
  • Current MX records and priorities.
  • Mail hostnames.
  • SPF, DKIM and DMARC records.
  • SMTP provider used by website forms.
  • Mailbox locations where relevant.
  • Autodiscover or other service records.
  • Existing mail-routing settings.

Website functionality

Identify important workflows such as:

  • Customer contact forms.
  • Quotation submissions.
  • Customer logins.
  • Online orders.
  • Payment processing.
  • File uploads.
  • Email notifications.
  • Scheduled reporting.
  • Third-party integrations.

SEO information

Record:

  • Existing public URLs.
  • Canonical URLs.
  • XML sitemap.
  • Robots directives.
  • Important redirects.
  • Key landing pages.
  • Search Console ownership and settings. The goal is to establish what should continue working after the migration.

Without this inventory, it becomes difficult to distinguish a migration defect from a problem that existed beforehand.

5. Take a Complete, Restorable Backup

Before making infrastructure changes, prepare an appropriate backup.

A website migration backup may need to include:

  1. Application files.
  2. Database contents.
  3. Uploaded media.
  4. Relevant server configuration.
  5. Required application settings.
  6. DNS record inventory.
  7. Email data, if email migration is included. Do not assume that downloading the public website folder provides a complete backup.

Many applications store important information in a database or private storage directory.

Similarly, a database export without uploaded files may be insufficient for restoring the website.

WordPress example

A WordPress migration commonly needs the database, WordPress files and uploaded media.

Plugin-specific files or configuration may also matter.

Laravel example

A Laravel migration may require application source files, dependencies or reproducible dependency installation, database records, private storage and the necessary environment configuration.

Sensitive settings should be transferred securely rather than included in public archives.

Test the backup

A backup file existing is not proof that restoration will work.

Where possible, restore it in a suitable test environment.

Verify that the application can access its database and required media.

Do not delete the original hosting environment immediately after creating a backup.

Keep a suitable rollback option until the migration has been verified.

6. Prepare the New Hosting Environment Before Changing DNS

One of the most common migration mistakes is pointing the domain to the new server before the website is ready.

A better approach is to configure and test the destination first.

Verify compatibility

Check:

  • Required PHP version.
  • Necessary PHP extensions.
  • Database server compatibility.
  • Web-server configuration.
  • Storage permissions.
  • Application runtime requirements.
  • Scheduled task support.
  • SSL certificate arrangements.
  • Available resources. If the current site uses Laravel, WordPress or another framework, confirm that the destination meets its actual requirements.

Transfer the application

Move the required files and import the database through the supported migration process.

Update environment-specific values carefully.

These may include:

  • Database connection settings.
  • Internal application paths.
  • Storage locations.
  • Cache configuration.
  • Email delivery settings.
  • Third-party integration endpoints.

Avoid accidental live data changes

For websites accepting orders, quotations or customer records, a database copied earlier in the day may already be outdated.

Plan how new submissions will be handled between the initial data copy and the final cutover.

Possible approaches include a controlled maintenance window, a final database synchronisation or an application-specific migration strategy.

The correct method depends on the system.

For transactional applications, simply transferring an old database backup and switching DNS can result in missing customer records.

7. Test the New Website Before Switching Traffic

The destination should be tested while the original website remains operational.

A staging hostname or controlled test environment can be used for this purpose.

For some deployments, developers can also test an origin using an appropriate hostname and connection override.

However, direct-origin testing may not work when the hosting setup intentionally permits traffic only through a reverse proxy.

Use a method compatible with the site's existing security and hosting architecture.

What should be tested?

Public content

Open the homepage, service pages, portfolio, blog and contact page.

Images and documents

Verify uploaded media and downloadable files.

Forms

Submit authorised test enquiries and confirm the backend records the submissions correctly.

Authentication

Test appropriate staff and customer accounts.

Database operations

Create, update and retrieve test records where the environment permits.

Email notifications

Test the website's configured outbound email delivery.

A functioning business mailbox does not automatically mean the website's SMTP configuration is correct.

Performance

Check representative pages and important workflows.

Mobile experience

Test the actual site on small screens and reasonable mobile network conditions.

The new website should not be considered ready merely because its homepage loads.

8. Preserve MX, SPF, DKIM and DMARC Records

Email continuity requires more than preserving the visible mailbox address.

MX records

MX records identify the servers responsible for receiving mail for a domain.

If the business continues using the same email provider, preserve the correct MX configuration.

Remember that the hostname targeted by the MX record must still resolve to the intended mail server.

SPF records

SPF identifies authorised email-sending services.

A domain may send mail through several systems, including:

  • Business email provider.
  • Website notification service.
  • Customer support platform.
  • Approved transactional email provider. If the website migration changes the server used to send application emails, review the SPF configuration.

Do not automatically add a second independent SPF TXT record.

The domain's SPF policy should be maintained as a valid, coordinated configuration.

DKIM records

DKIM allows receiving mail systems to verify messages using cryptographic signatures.

Preserve existing DKIM records for email services that remain active.

If the migration introduces a new sending provider, configure its DKIM records as required.

DMARC records

DMARC defines how receiving servers should handle messages that fail relevant authentication and alignment checks.

Preserve the organisation's established policy unless a separately justified change is required.

Changing the website server does not automatically justify weakening DMARC enforcement.

Important distinction: incoming and outgoing mail

An MX record concerns incoming mail delivery.

Website notifications may use SMTP credentials or a transactional email service to send outgoing messages.

Therefore, test these separately.

A company could receive mail successfully while its quotation notification system fails to send messages.

Both functions must be verified.

9. Special cPanel Issue: Local vs Remote Email Routing

When migrating a website between cPanel environments, email routing settings can cause problems even when public DNS records look correct.

cPanel supports different mail-routing configurations.

Local Mail Exchanger

The server accepts mail for the domain and handles local delivery.

This is appropriate when that server is actually responsible for receiving the domain's mail.

Remote Mail Exchanger

The server treats the domain's email as externally hosted and routes outbound messages to the appropriate remote mail exchanger.

This is relevant when the website runs on cPanel but the business email is hosted elsewhere.

Why the setting matters

Suppose a website moves to a new cPanel server while its email remains with Microsoft 365.

If the new cPanel environment incorrectly treats the domain's mail as local, application-generated messages addressed to the company's own domain may be routed incorrectly.

This can produce confusing failures.

The correct routing setting depends on the actual mail service architecture.

Also note that cPanel's automatic detection relies on its local zone configuration and does not necessarily update when external DNS changes.

Verify email routing explicitly rather than assuming the hosting panel always detects the correct arrangement.

10. Migrate a Website Using Cloudflare Without Affecting Email

Cloudflare is commonly used to manage DNS and proxy web traffic.

During a website-only migration, the intended change may be as simple as updating the relevant web origin address.

However, several checks are necessary.

Step 1: Identify the web records

Locate the domain's web-facing A, AAAA or CNAME records.

Check both the root domain and www hostname.

Do not overlook an old AAAA record if the new hosting environment does not support that IPv6 address.

Step 2: Verify mail-related records

Confirm the MX destination and all relevant mail hostnames.

In Cloudflare, ordinary SMTP, IMAP and POP3 connections do not pass through the standard HTTP proxy.

Mail-specific hostnames should therefore use an appropriate DNS-only configuration.

Step 3: Update the correct origin

For a proxied website, update the appropriate DNS record to the new origin while retaining the intended proxy setting.

For a DNS-only website, change the relevant public record to the new destination.

Do not change unrelated TXT, MX or service records simply because the hosting server is changing.

Step 4: Validate HTTPS

If the website uses Cloudflare Full (strict), the new origin must present an appropriate valid certificate for the requested hostname.

Otherwise, visitors may encounter an HTTPS connection error such as Cloudflare 526.

Prepare and verify the origin certificate before directing production traffic to the new server.

Do not disable certificate validation to hide a migration problem.

Step 5: Check caching

Cloudflare may continue serving cached assets after the origin changes.

Use targeted cache invalidation where required, especially when files or asset versions have changed.

Avoid treating a cached page as proof that the new origin works correctly.

11. Understand DNS TTL and Propagation

TTL means Time to Live.

It controls how long DNS resolvers are permitted to cache a record.

A shorter TTL can reduce the time that a resolver uses an older DNS result, but it does not guarantee that every user will see the new destination immediately.

For example, a DNS-only web record with a long TTL may continue to be cached after the record changes.

If the current provider allows it, lowering the TTL sufficiently before the planned cutover can help.

Cloudflare's standard proxied DNS records use an automatic TTL of 300 seconds.

That does not mean every change will become visible everywhere in exactly five minutes.

Local resolver caches, client behaviour and other infrastructure can affect observed results.

DNS record changes vs nameserver changes

Changing an individual A or CNAME record is different from changing the domain's authoritative nameservers.

Moving a website usually does not require changing nameservers when the existing DNS provider will remain in use.

A nameserver change introduces a broader set of risks because the destination DNS provider must already contain all necessary records.

If DNSSEC is enabled, the delegation and DS records must also be planned correctly.

Avoid unnecessary nameserver changes during a website-only migration.

12. Execute the Final Cutover Carefully

After the new website has passed testing, prepare the production cutover.

Recommended sequence

  1. Confirm the destination is ready.

Check the application, database, media, HTTPS and important workflows.

  1. Confirm email remains correctly configured.

Record the current MX, mail hostname and authentication settings.

  1. Prepare the final data synchronisation.

For transactional applications, prevent accepted records from being lost between the old and new systems.

  1. Update only the necessary web DNS records.

Preserve unrelated mail and service records.

  1. Verify the new destination.

Confirm that the domain is serving the intended application.

  1. Test the business workflows.

Check forms, logins, enquiries and application emails.

  1. Monitor both hosting environments.

Some traffic or background requests may still reach the old environment during the transition.

  1. Retain the recovery option.

Do not immediately cancel the original service.

A migration is complete when the application and its dependent services operate correctly, not when the DNS record has simply been changed.

13. Test DNS and Email After Migration

For Windows users, PowerShell can help inspect the public DNS configuration.

The following examples use a fictional domain.

Replace it with the domain being migrated.

Check the website address records

Resolve-DnsName example.com -Type A
Resolve-DnsName example.com -Type AAAA
Resolve-DnsName www.example.com -Type CNAME

Not every hostname uses every record type.

For a Cloudflare-proxied hostname, the result normally represents Cloudflare's public addresses rather than the origin server.

Check incoming mail routing

Resolve-DnsName example.com -Type MX

Verify that the returned mail exchangers match the email provider's expected configuration.

Check the mail hostname

Resolve-DnsName mail.example.com -Type A

Use the actual hostname referenced by the MX record.

If the MX target is not mail.example.com, query the correct destination instead.

Check SPF records

Resolve-DnsName example.com -Type TXT

Identify the relevant SPF policy among the returned TXT records.

Check DMARC

Resolve-DnsName _dmarc.example.com -Type TXT

DKIM selectors depend on the email provider, so verify them using the provider's documented hostnames.

Check the website response

curl.exe -I https://www.example.com/

Check the status code, redirects and response headers.

A successful HEAD request does not replace full browser and functional testing.

Perform real email tests

DNS lookups cannot prove that email delivery works end to end.

Test these situations:

  1. Send from an external mailbox to the company's business address.
  2. Reply from the business address to the external mailbox.
  3. Test employee mailbox access.
  4. Submit a website contact or quotation form.
  5. Confirm the application sends its expected notification.
  6. Check delivery logs or message traces where available. Test more than one mailbox if the business has different departments or providers.

14. What Happens If Something Breaks?

A migration plan needs an agreed recovery procedure.

Problem: The website displays the old content

Possible causes include cached content, old DNS results or an incomplete switch to the new environment.

Verify which origin is serving the request before making additional changes.

Problem: The website returns a 500 error

Inspect the application logs and runtime configuration.

Possible causes include missing dependencies, incorrect environment values, database connectivity or file permissions.

Problem: HTTPS fails

Check the certificate, hostname, origin reachability and the configured TLS mode.

Avoid disabling HTTPS or weakening certificate validation as a shortcut.

Problem: Business email stops arriving

Check the MX destination, its resolved address, authoritative DNS records and actual mailbox service.

Also verify that the intended email server is still operating.

If mail is hosted on the original cPanel account, confirm that the original account remains active.

Problem: Internal application emails fail

Inspect the application's SMTP or email service configuration.

For cPanel-hosted applications, verify the domain's local or remote email-routing setting where applicable.

Problem: New orders or enquiries disappear

This is potentially more serious than a temporary website error.

It may indicate that some requests were written to the old database and others to the new one.

Avoid blindly restoring an earlier backup over newer records.

First identify the authoritative source of each transaction and reconcile affected data.

Rolling back the migration

If the new hosting environment fails, a DNS rollback may redirect website traffic to the previous server.

However, this is only safe when the previous application environment and its data are still suitable for production.

For example, if customers created records on the new server, reverting to an older database can hide those records.

A correct rollback plan covers both traffic routing and data consistency.

DNS rollback is not a complete data-recovery strategy.

15. How to Preserve Google Rankings During a Website Migration

Moving a website to another hosting provider does not inherently require changing its public URLs.

This is useful for protecting existing search visibility.

For example, a website may move from one cPanel server to another while retaining:

https://www.example.com/services/

The hostname and page path remain unchanged.

In this scenario, the priority is ensuring that the new server continues providing the correct content at the existing URLs.

Maintain existing public URLs

Avoid unnecessary changes to:

  • Service page paths.
  • Blog article URLs.
  • Portfolio URLs.
  • Image paths where practical.
  • Internal navigation.

Preserve SEO signals

Check:

  • Page titles.
  • Meta descriptions.
  • Canonical URLs.
  • Robots directives.
  • XML sitemap.
  • Structured data.
  • Internal links.
  • HTTP status codes. A migration can unintentionally introduce a sitewide noindex directive if staging settings are copied into production.

That is why public indexability must be verified after cutover. What if the domain name also changes? A domain migration is a separate SEO project.

Where URLs change, prepare a mapping from old URLs to their correct new destinations and implement appropriate permanent redirects.

Google recommends server-side permanent redirects for such moves.

Do not redirect every old URL to the new homepage regardless of content.

Also update relevant canonical URLs and follow Google's Search Console guidance for domain changes.

For a hosting migration where public URLs remain the same, a Search Console Change of Address request is not needed.

16. Example: Moving a PNG Corporate Website While Keeping Email

Consider a hypothetical engineering company in Port Moresby.

Its current configuration is:

Website: Shared cPanel hosting.

Email: Microsoft 365.

DNS: Cloudflare.

New hosting: A different compatible cPanel server.

The company wants to move the website only.

Before migration

The developer identifies:

  • Existing web DNS records.
  • Microsoft 365 MX destination.
  • Email authentication records.
  • Website application and database.
  • Contact form delivery method.
  • SSL configuration. The new cPanel hosting environment is prepared and tested.

During migration

The developer transfers the website and database.

Public pages, customer enquiries and notifications are tested in the new environment.

The existing Microsoft 365 email routing remains unchanged.

After the website passes validation, the relevant Cloudflare web-origin record is updated.

After migration

The developer verifies:

  • The new website is publicly accessible.
  • The company's original URLs work.
  • Microsoft 365 mailboxes continue receiving messages.
  • Staff can send outgoing email.
  • Website contact notifications work.
  • The new cPanel server uses the appropriate remote email-routing configuration.
  • No new application errors were introduced. This is an example of a properly scoped website-only migration.

The company moves its website without unnecessarily changing the systems responsible for business email.

17. Website Migration Checklist for PNG Businesses

Use this checklist when preparing to change hosting providers.

Before migration

  • Identify the domain registrar and authoritative DNS provider.
  • Confirm the current website hosting provider.
  • Identify the actual email provider.
  • Export and review DNS records.
  • Check the MX destination and mail hostname.
  • Record SPF, DKIM and DMARC configuration.
  • Identify application dependencies and integrations.
  • Prepare a complete, restorable backup.
  • Check the destination server's compatibility.
  • Prepare SSL and application configuration.
  • Record important URLs and existing SEO metadata.

Before changing DNS

  • Test the new website.
  • Verify database connectivity.
  • Verify images and uploaded documents.
  • Test forms and authentication.
  • Test application-generated email.
  • Plan the final data synchronisation.
  • Confirm the intended DNS changes.
  • Prepare a rollback procedure.

After migration

  • Confirm the new website is live.
  • Check both root and www hostnames.
  • Validate HTTPS.
  • Check important redirects.
  • Test external email delivery.
  • Test outgoing business email.
  • Verify website notifications.
  • Check database records and customer enquiries.
  • Verify the sitemap and indexability.
  • Monitor application logs.
  • Confirm the rollback window and old hosting retention. A documented checklist helps prevent overlooked dependencies, particularly when different providers manage the website, domain and email.

Frequently Asked Questions

Can I move my website to another hosting provider and keep my current email?

Yes, in many cases. The website and email services can remain separate. The migration must preserve the correct mail DNS records and keep the existing email service operational.

Will changing an A record affect business email?

It can, depending on the DNS architecture. If the MX destination resolves through the A record being changed, mail routing may be affected. Always inspect the MX target and its resolved addresses.

Do I need to change nameservers when moving a website?

Not necessarily. If the existing DNS provider remains in use, updating the appropriate website records is often sufficient.

Should I migrate email at the same time as the website?

Only if there is a clear business reason and a properly planned email migration. Separating website and email changes can reduce unnecessary complexity.

Does Cloudflare proxy business email?

Cloudflare's standard HTTP proxy does not handle ordinary SMTP, IMAP or POP3 traffic. Mail-related hostnames need appropriate DNS-only routing unless a supported specialised service is configured.

How long does DNS propagation take?

It depends on record TTLs, caches and the infrastructure involved. Do not rely on a fixed universal completion time. Monitor the actual destination and retain the old environment until the transition is verified.

Will changing web hosting affect Google rankings?

A hosting change does not automatically require new URLs or loss of rankings. However, extended outages, changed content, broken redirects, accidental noindex settings and other migration errors can affect search performance.

Can an existing cPanel email account continue working after the website moves?

It can, provided the original mail service remains active and the correct routing configuration is retained. Cancelling the old hosting account may terminate the mailboxes if email is included in that account.

Final Thoughts

A website migration should be planned around business continuity.

The goal is not simply to transfer files and update a DNS record.

It is to ensure that the business website, email accounts, customer enquiries, databases, online services and search visibility continue operating correctly.

For a website-only migration, the safest approach is often to preserve the existing email provider, change only the necessary web infrastructure and test both services independently.

When email is also moving, treat it as a separately planned operation with its own data migration, authentication and verification requirements.

A successful migration is one where customers can continue finding your business, sending enquiries and communicating with your team without unnecessary disruption.

Need Help Migrating Your Business Website in Papua New Guinea?

Embakai Tech Solutions provides website development, hosting and technical deployment services for businesses and organisations across Papua New Guinea.

Whether you are moving between shared cPanel accounts, upgrading to a VPS or changing website infrastructure while retaining your current business email, start with an audit of the existing services and dependencies.

Explore Domain, Hosting & DevOps or read Shared cPanel Hosting vs VPS for PNG Businesses for help choosing a hosting plan.

Contact Embakai Tech Solutions to discuss your website migration and request a quote.

Technical references

Need help applying this?

Turn the idea into a practical website, SEO or digital system improvement.

Contact Embakai Tech Solutions for a focused review, implementation plan or quote for your organisation in Papua New Guinea.