Go back

Have you migrated your website? The DNS records you must not forget

Migrating a website is not just about copying its files and database to the new hosting. To ensure that the domain, email, and other services continue to function, you must also review its DNS configuration.

If you’re not clear on what DNS are or what role their records play, you can first check our guide on what DNS are, their records and servers. It will help you understand how they connect your domain with the web, email, and other services.

Next, we will see which are the most important DNS records and how to know which ones you should change and which ones should be kept during the migration.

Why you should review DNS records when migrating a website

When you change hosting, you usually need to update the records that connect the website to the server. However, other records may still be necessary for email, subdomains, or external tools to function.

Imagine moving a store to another location: you have to update its address, but that doesn’t mean you should also change its phone number or messaging service. The same goes for DNS records: only modify those related to the services you are moving.

Before you start, save a snapshot of the complete DNS zone. This way, you can later check that no record is missing and recover the previous configuration if you make a mistake.

Where you can find your domain’s DNS records

DNS records are not found within WordPress or among your website’s files. They are managed from the panel of the provider responsible for your domain’s DNS, which could be cdmon or another company.

To locate them, enter that panel and look for a section called «DNS Management,» «DNS Zone,» or something similar. There you will find a list with the A, AAAA, CNAME, MX, and TXT records used by your domain.

Keep in mind that the provider where you registered the domain is not always the same as the one managing its DNS. If you don’t know where to find them, check which DNS servers or nameservers are configured with Dig Web Interface. Enter your domain, select NS in the «Type» field, and click «Dig.» The tool will show addresses similar to these:

ns1.provider.com
ns2.provider.com

The provider’s name that appears in those addresses can help you know in which panel you should make the changes. If you still can’t locate it, consult with the company where you have registered the domain or with your hosting provider.

Once inside the DNS zone:

  • Save a copy or snapshot of all current records.
  • Check which service each one uses.
  • Change only the records indicated by the new provider.
  • Keep those related to services you will continue using, such as email or an external platform.

The new hosting provider should provide you with the values you need to enter. You don’t have to guess them or modify all the records: usually, you will only need to update those that connect the website to the new server.

Now that you know where to find your DNS zone and have saved a copy of its configuration, it’s useful to understand what each record is for. This way, you can identify which ones you need to update during the migration and which ones you need to keep so that email, subdomains, and other services continue to function.

Next, we review the most important DNS records and what you should do with each one.

A Record: the one that connects the domain with the web

The A record connects a domain or subdomain with the numerical address of the server where the website is located, known as IPv4. You will usually have to update it when you move your website to a new hosting.

For example:

@ → 192.0.2.10

In the DNS configuration, the symbol @ represents the main domain, for example, yourdomain.com. The number next to it is the address of the server where the website is hosted. When you change hosting, you will need to replace that address with the one provided by the new provider.

You should also check if you have subdomains, such as blog.yourdomain.com, store.yourdomain.com, or panel.yourdomain.com, that point to their own address.

You should only modify those that have been moved to the new hosting. If any continue to function from the previous server or another platform, keep their current configuration.

AAAA Record: also check the IPv6 address

The AAAA record serves a similar function to the A record but connects the domain with an IPv6 address, a more recent format of Internet address.

Although many configurations still primarily use IPv4 addresses, you should also check if there is any AAAA record. If it continues pointing to the previous hosting, some people might access the old website while others see the new one.

Before modifying it, confirm that the new hosting supports IPv6 addresses and check what value you should use. Do not delete it without first checking what it is for.

CNAME: don’t lose sight of www and other aliases

A CNAME record makes a name function as an alias for another domain, that is, it connects a secondary address, such as www.yourdomain.com, with another address, such as yourdomain.com, so that both show the same website.

For example:

www → yourdomain.com

This makes www.yourdomain.com show the same website as yourdomain.com.

It can also be used to connect subdomains with external services, such as a newsletter platform, an online store, a reservation system, or a customer service tool.

During the migration, especially check:

  • The address with www.
  • Subdomains connected to external services.
  • Records used by a CDN.
  • Connections with marketing or analytics tools.

During the migration, check if you are still using these platforms. If they remain active, keep their CNAME records as they are. Do not change them to point to the new hosting, because the store, reservation system, or another linked tool might stop working. If you don’t recognize a record, consult with your provider before modifying or deleting it.

MX Records: necessary to continue receiving emails

MX records indicate which servers should receive messages sent to your domain’s accounts.

If you are only migrating the website and want to keep the email with the current provider, you should not change the MX records. Copy their values and priorities exactly as they appear in the previous configuration.

For example:

10 mail1.provider.com
20 mail2.provider.com

The number indicates the priority. The server with the lowest value is usually the first one to which the message delivery is attempted.

If you are also going to migrate the email, first create the accounts in the new service and copy the messages you need to keep. Change the MX records only when the new system is ready to receive them.

Modifying the MX records too soon can cause some messages to arrive at the old server and others at the new one.

SPF, DKIM, and DMARC: protect your email delivery

Records related to email authentication help demonstrate that messages sent from your domain are legitimate. A poorly planned migration can remove them or leave them pointing to a service you no longer use.

The three main records that fulfill this function are SPF, DKIM, and DMARC. Each performs a different check, but together they help prevent identity spoofing and reduce the risk of your emails ending up in the spam folder. If you want to know more about how they work together, check our guide on email security: SPF, DKIM, and DMARC.

SPF

SPF is usually configured through a TXT record. It indicates which servers are authorized to send email on behalf of the domain.

You might find a value similar to this:

v=spf1 include:provider.com ~all

If you keep the same email provider, keep the record. If you change services or use multiple platforms to send messages, the SPF should include all authorized sources.

A domain should only have one SPF record. If you need to authorize multiple services, they should appear within a single configuration.

DKIM

DKIM adds a digital signature to the emails you send from your domain. This signature allows the server receiving the message to verify that it actually comes from your domain and that no one has modified its content during transmission.

To configure it, the email provider or email marketing platform will provide you with one or more TXT or CNAME records. Their name usually has a format similar to this:

selector1._domainkey.yourdomain.com

If you change providers, you will need to request new DKIM keys and add the records indicated by the new service. Do not keep only the previous ones, as they correspond to the provider you used before.

DMARC

DMARC allows you to indicate what the receiving server should do when a message fails SPF or DKIM checks. It can also send reports on possible spoofing attempts.

It is usually found in a TXT record associated with:

_dmarc.yourdomain.com

Do not delete it during the migration. If you have changed the way you send email, check that the policy remains compatible with the new configuration.

Verification TXT Records: small but important

Not all TXT records are related to email. Many services use them to verify that you have control over a domain.

You may find verification records for:

  • Google Search Console.
  • Microsoft 365.
  • Email marketing platforms.
  • Social networks.
  • Payment systems.
  • Security tools.
  • Analytics or advertising services.

Although a record may seem like a string of meaningless letters and numbers, do not delete it without checking its origin. You could lose domain verification in a tool you still use and, as a result, lose access to some of its functions or data.

Subdomains: review each one separately

Your main domain and its subdomains do not have to be hosted in the same place. For example, you can move yourdomain.com to a new hosting while store.yourdomain.com remains connected to an e-commerce platform and campus.yourdomain.com continues to show your training platform.

Before changing the DNS configuration, review where each subdomain points:

  • If the subdomain is also moved to the new hosting, update its record with the data provided by the new provider.
  • If it continues to use the same hosting or external service, keep its record as it is.
  • If you don’t know what it is used for, do not modify or delete it without consulting your provider first.

If you only update the main domain and do not properly keep the subdomains’ configuration, some services may stop working.

SRV and CAA Records: less visible but not dispensable

SRV records are used to locate certain services within a domain. They can be part of telephony, messaging, Microsoft 365, or other application configurations.

CAA records, on the other hand, indicate which certification authorities can issue SSL certificates for the domain. An incorrect CAA configuration could prevent the new hosting from generating or renewing the certificate.

Not all websites use these records, but if they appear in your DNS zone, copy them and check their function before changing them.

Be careful when changing DNS servers

DNS servers, also called nameservers, indicate which provider stores and manages all the DNS configuration of your domain. DNS records are the instructions contained in that configuration: where the website is hosted, which service manages the email, or where each subdomain points.

To connect the domain with the new hosting, the provider may ask you to change only the record that directs the website or to replace the entire DNS servers. It’s not the same:

  • If you only change the website record, it will point to the new hosting, but the email, subdomains, and other services will keep their configuration.
  • If you change the DNS servers, you will transfer all DNS management to the new provider. Before doing so, you will need to copy all existing records there, including those related to email, subdomains, and external tools.

For example, you can move yourdomain.com to a new hosting and keep the email on Google or store.yourdomain.com on an external platform. In that case, you should only change the website address and keep the records of the services that continue to function from other providers.

If you change the DNS servers without copying the entire configuration, the website might work, but you could stop receiving emails, lose a subdomain, or disconnect external tools.

If your domain uses DNSSEC, an additional protection measure for DNS, ask for help from both providers before making the change. An incorrect configuration could prevent some people from accessing the domain.

Before changing the DNS, make sure the website has already been moved and is working correctly on the new hosting.

Reduce the TTL before migration

The TTL indicates how long servers can store a DNS response before consulting it again.

Reducing it a few hours or a day before the migration can facilitate the change to the new server being updated more quickly. It doesn’t completely eliminate the propagation period, but it reduces the time during which some networks retain the previous value.

When you have finished the migration and confirmed that everything works, you can return it to its usual value.

If you have already made the change, you will only have to wait for the previously stored information to expire. In our guide on how to check DNS propagation, we explain how to verify which destination the domain is returning from different locations.

Checklist after changing DNS

Don’t consider the migration finished as soon as the homepage appears. Check one by one the services associated with the domain:

  • The domain works with and without www.
  • The SSL certificate loads correctly.
  • Internal pages and the admin area respond.
  • Subdomains remain available.
  • You can send and receive emails.
  • SPF, DKIM, and DMARC records are published.
  • External tools still recognize the domain.
  • The website points to the new server from different networks.
  • There are no A or AAAA records left accidentally pointing to the previous hosting.

Keep the old hosting active for a reasonable period. This way, you can recover information or review its configuration if you detect any forgotten record.

A migration doesn’t end when copying the website

The files and database are not the only things you need to move. You also have to review the DNS records, which connect the domain with the web, email, and other services. If you forget any or configure them incorrectly, part of these services may stop working.

Save the previous configuration, modify only the necessary records, and verify the result before canceling the old hosting.

If you are going to migrate your website to cdmon, our team can help you review the migration and prevent the change from affecting email, subdomains, or services connected to your domain.

Frequently Asked Questions

What DNS record should I change when migrating a website?

Normally, you will need to update the A record so that the domain points to the IPv4 of the new server. You should also review the AAAA record if you use IPv6 and the CNAMEs related to www or other subdomains.

Do I have to change the MX records when migrating hosting?

Only if you are also going to change the email service. If the email continues with the same provider, you should keep the MX records and their priorities.

How long does it take for a DNS change to propagate?

It depends on the previous TTL, the provider’s configuration, and the information stored by each network. During that period, some people may access the previous server while others already reach the new one.

Can I delete DNS records I don’t recognize?

It is not recommended. They may belong to email, a subdomain, or an external tool. Find out what each record is used for before deleting it.

Does changing the A record also modify the email?

Generally, no, as long as the email uses its own MX records and these are not modified. However, it is advisable to check if any email service depends on a name pointing to the same server.

Is changing hosting the same as transferring a domain?

No. Changing hosting means moving the website or email to another server. Transferring the domain means changing the registrar company that manages it. Both processes can be done separately. If you also want to change the company that manages the domain, check how to transfer your domain to cdmon.

We have solutions for everyone