Your new web host tells you to update an A record. Your email provider asks you to add a TXT record. Your registrar offers to change your nameservers. These instructions all involve DNS, but each affects a different part of how your domain works.
This guide explains the DNS records website owners are most likely to edit. It also shows how to identify the dashboard that controls your live records, make a targeted change, and verify that the website and email still work afterward.
What are DNS records?
DNS records are entries that tell applications where to find services for a domain. A web browser uses DNS to find where a website is served. An email system uses DNS to find where to deliver mail. Other records publish verification information or identify the nameservers responsible for answering DNS queries.
Your registrar manages your domain registration and usually gives you a way to change its nameserver delegation. Your DNS provider publishes the live records. Your web host serves your website. One company may fill all three roles, or you may use separate providers. If you edit a DNS dashboard that no longer serves your domain, the changes may never appear in public lookups. Cloudflare’s DNS record reference
Common DNS record types explained
| Record | What it does | When you might change it |
|---|---|---|
| A | Points a name to an IPv4 address | Your host gives you a new IPv4 address for the site |
| AAAA | Points a name to an IPv6 address | Your host provides new IPv6 settings or tells you to retire an old address |
| CNAME | Makes one name an alias of another hostname | A provider asks you to point www or a subdomain to its hostname |
| MX | Identifies the servers that receive email for a domain | You move incoming mail to a new provider |
| TXT | Publishes text used for verification or policies | You verify domain ownership or configure email authentication |
| NS | Identifies authoritative nameservers for a zone or delegated subdomain | You move DNS service or delegate a subdomain |
An MX record includes a priority. Lower numbers are preferred, so copy the priorities from your email provider along with the target names. Email authentication may also involve TXT records for SPF and DMARC and either TXT or CNAME records for DKIM, depending on the provider. Cloudflare’s record types and examples
The root domain and www are separate names
Many dashboards display the root domain, such as example.com, as @. The name www usually refers to www.example.com. Updating one does not automatically update the other unless their records are set up to work together.
For example, if www.example.com is a CNAME pointing to example.com, changing the root A record can affect both names. If www has its own A record pointing to the old server, it may still reach that server. Also check for an old AAAA record, since visitors using IPv6 could reach a different destination from visitors using IPv4.
CNAME records and redirects solve different problems
A CNAME affects how DNS resolves a hostname. If you want visitors who enter www.example.com to land at example.com in their browser, configure a redirect through your host, CDN, or forwarding service. Test HTTPS on both names.
An ordinary CNAME cannot share a name with other ordinary record types. At the root, where DNS already needs records such as NS and SOA, check whether your provider offers a supported equivalent such as CNAME flattening or an alias feature. Use the instructions for your specific host and DNS provider. Cloudflare’s zone apex guide
What to check before editing DNS records
1. Find the live DNS provider
Check the domain’s delegated nameservers in your registrar account or through a public DNS lookup. Compare them with the nameservers shown in the dashboard you plan to edit. If the change involves a subdomain with its own delegated nameservers, check which provider serves that subdomain too.
2. Save the current records
Export the zone if your provider supports it. Otherwise, record the names, types, values, TTLs, and MX priorities. Include provider-specific options such as proxy status where applicable. Keep the previous values close at hand so you can restore them if needed.
3. Identify exactly which service is changing
| Your goal | What to check |
|---|---|
| Move the website and keep the current email provider | Check the root and www website records. Preserve MX and mail authentication records, and verify that mail-related names do not depend on the website record you plan to change. |
| Connect a store on a subdomain | Follow the platform’s instructions for that exact subdomain, such as shop.example.com. |
| Verify a domain for a service | Add the verification record at the exact name given. Some dashboards append the domain automatically. |
| Change incoming email providers | Follow the new provider’s MX and authentication instructions. Test both sending and receiving. |
| Change DNS providers | Build and compare the new zone before changing the delegation. Coordinate DNSSEC and the parent DS record with both providers if DNSSEC is enabled. |
A nameserver change moves responsibility for answering queries about the domain. The new provider needs records for all services you intend to keep, including email, subdomains, and verification records. Follow your provider’s migration instructions for the correct sequence. Amazon Route 53 DNS migration guide
4. Plan around DNS caching
TTL, or time to live, tells DNS caches how long they can normally reuse an answer. If you lower a record’s TTL shortly before changing its value, a resolver may still have the old answer cached under the old TTL. For a planned change, lower the TTL in advance where the provider allows it, and leave enough time for earlier cached answers to expire.
When moving a live site, keep the old hosting service available during the transition if feasible. For a site that takes orders or accepts form submissions, plan how you’ll handle activity that reaches either server during the cutover.
Worked example: move a website and keep email
Imagine your new host asks you to replace the A record for example.com. Your current www record is a CNAME to example.com, and your MX records point to an external email provider.
- Record the old A value and check whether the domain also publishes an AAAA record.
- Confirm the new host can serve the root domain and
wwwover HTTPS. - Replace the old A value with the address provided by the new host. Review the AAAA record against the host’s instructions.
- Check whether any mail records rely on the website address. In this example, mail uses a separate provider, so its MX and authentication settings stay in place.
- Look up both website names, load both URLs over HTTPS, and test email in both directions.
If the website fails but the DNS records show the expected destination, check the new host’s domain configuration, redirects, and certificate. If your DNS provider proxies web traffic, its public answers may show proxy addresses. Check the configured origin in the provider’s dashboard. Cloudflare’s DNS record reference
How to verify a DNS change
Check the exact name and record type you edited. If you can query an authoritative nameserver, use that answer to see what the provider is publishing. Then compare with a public resolver. If the authoritative answer is new and a public resolver still returns the old answer, caching is a likely explanation. If the authoritative server still shows the old answer, check the dashboard, zone, and record name before waiting longer.
Finish by testing the service itself. A DNS lookup can show the expected answer while the website still has an HTTPS error or the mail provider has yet to finish its setup. If you revert a record, verify the original value on the authoritative nameserver and allow for cached answers from the attempted change.
Frequently asked questions
Does changing a DNS record transfer my domain?
Editing a record changes how a service for the domain is found. A domain transfer moves the registration to a different registrar. You can usually change a website record while keeping your existing registrar.
How long do DNS changes take?
It depends on when the provider publishes the change and how long resolvers retain earlier answers. Compare authoritative and public responses to distinguish an unpublished change from a cached answer.
Can I add more than one TXT record?
Yes, a name can have TXT records for different purposes. If you already publish an SPF policy for the same name, follow your mail provider’s instructions to update that policy instead of adding a second SPF policy.
Why does my website work with www but fail without it?
The names may point to different destinations, or the hosting platform may be configured for only one. Check DNS for both names, then test their HTTPS certificates and redirects.
Should I delete an old record I don’t recognize?
Identify which service uses it first. A record may support email authentication, domain verification, or a subdomain someone still uses. Save its current value and confirm the dependency before removing it.
Conclusion
Start with the service you want to change, then find the DNS provider that publishes its records. Save the old values, edit the exact name and type your provider specifies, and test both the DNS answer and the service. For a website move, testing both domain variants and sending and receiving email can catch problems a homepage check alone would miss.


