Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Most websites need an A record and/or AAAA record for the root (apex) domain, plus a CNAME or address record for www. The exact values must come from your web host. Keep your mail-related MX and TXT records in place, then allow DNS caches time to refresh and verify both hostnames.

The critical first step is finding the DNS provider named by your domain’s authoritative nameserver (NS) delegation. Your registrar may hold the registration while another service publishes the DNS zone; editing the wrong control panel changes nothing for visitors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand who controls your DNS

A registrar manages the domain registration. The DNS provider listed in the domain’s NS delegation publishes the authoritative zone containing your A, AAAA, CNAME, MX, TXT and other records. These can be the same company, but they do not have to be.

Find the authoritative DNS host

  1. Open the registrar account that manages the domain.
  2. Look for Nameservers, DNS delegation or a similar setting.
  3. Record the nameserver hostnames currently assigned to the domain. Those nameservers identify the control panel where records must be edited.

If you intend to use Cloudflare as the DNS host, first replace the registrar’s nameservers with the Cloudflare nameservers assigned to your zone. Only after that delegation is active will records entered in Cloudflare answer public queries.

Why this distinction matters

Changing records at a registrar while the domain is delegated to a different DNS host has no effect. Conversely, changing nameservers can move the entire zone to a new provider, so copy any existing web, mail, verification and service records before switching.

DNS record types used by websites

Record What it does Typical website use
A Maps a hostname to an IPv4 address. Root hostname @ pointing to the host’s IPv4 address.
AAAA Maps a hostname to an IPv6 address. Root or subdomain pointing to the host’s IPv6 address.
CNAME Aliases one hostname to another fully qualified domain name. www pointing to a hostname supplied by the web host.
MX Specifies which mail servers receive messages for the domain. Email provider’s mail-exchange targets.
TXT Stores text used for verification and email policy. Domain verification tokens and SPF-related policy.
NS Delegates a domain or zone to authoritative nameservers. Registrar delegation to the DNS provider.

A record points to an address; a CNAME points to a name. A CNAME target must be a hostname, not an IP address. The host’s instructions determine which one is appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Collect the exact values from your web host

Open the hosting platform’s custom-domain or DNS instructions and copy the target values exactly. Depending on the service, you may receive an IPv4 address, an IPv6 address, a hostname, or more than one of these. There is no universal “website IP” that is safe to substitute.

  • Use an A record for each IPv4 address the host specifies.
  • Use an AAAA record for each IPv6 address the host specifies.
  • Use a CNAME when the host supplies a destination hostname.
  • Follow the provider’s instructions for the root hostname if it supplies a hostname rather than an address. Some DNS services offer a provider-specific apex-alias feature; use it only when both the DNS provider and host support it.

When a provider gives a fully qualified target, copy its spelling and any required trailing dot. A target such as target.host.example. is different from an accidentally truncated or misspelled name.

Set up the root domain and www

The root, or apex, is usually displayed as @ in a DNS editor. It represents example.com, not a separate subdomain. The following procedure works in most DNS control panels; labels vary by provider.

  1. Open the authoritative zone. Sign in to the DNS host identified by the domain’s NS delegation and select the correct domain.
  2. Create the apex address records. Add an A record at @ with the host’s supplied IPv4 address. Add an AAAA record at @ only if the host supplies an IPv6 address. If the host supplies multiple addresses, follow its instructions for adding each one.
  3. Configure www. Add a CNAME at www pointing to the host’s supplied fully qualified name, or add the address record the host explicitly requests. Do not create a CNAME and an A or AAAA record for the same hostname.
  4. Add only required subdomains. Create records for names such as blog, shop or app only when you have a service using them. Each subdomain can have its own A, AAAA or CNAME target.
  5. Review existing records. Before saving, check for an older A, AAAA or CNAME on the same hostname. Remove or replace obsolete web records only after confirming they are not used by another service.
  6. Save the zone. Keep a copy of the previous values so you can restore them if a dependent service stops working.

Illustrative values only

These entries demonstrate the format and are not universal values to copy:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Name Type Example content Use
@ A 203.0.113.10 Example IPv4 address supplied by a host
@ AAAA 2001:db8::10 Example IPv6 address supplied by a host
www CNAME target.host.example Example host name supplied by a provider

The addresses in this table are documentation examples. Replace them with the real values from your hosting provider.

Choose A, AAAA or CNAME for www

Situation Record to use Reason
Your host supplies an IPv4 address for www. A The hostname must resolve directly to that IPv4 address.
Your host supplies an IPv6 address for www. AAAA The hostname must resolve directly to that IPv6 address.
Your host supplies a destination hostname for www. CNAME The alias follows the host’s hostname if its infrastructure changes.
Your host supplies both address families. A and AAAA Publish both only when the provider instructs you to do so.

Do not add a CNAME at the apex unless your DNS provider explicitly supports an apex-alias implementation. Standard DNS does not permit a CNAME to coexist with the other records required at a zone apex, including MX and NS records.

Keep email records separate from website records

Changing web records should not remove or overwrite mail records. MX records route incoming mail; TXT records commonly carry verification tokens and SPF-related policy. Email platforms can also require CNAME records for service discovery or verification. Microsoft 365, for example, publishes CNAME requirements alongside its MX and TXT instructions.

Safe email change procedure

  1. Export or copy every existing MX and TXT value before editing the zone.
  2. Compare the email provider’s current instructions with the records already present.
  3. Add new verification TXT or CNAME records without altering unrelated web entries.
  4. Replace MX records only when the email provider explicitly instructs you to migrate mail.
  5. Send a test message after DNS changes and confirm that existing mailboxes still receive mail.

Do not use an MX target as a web target, and do not delete a TXT record merely because it does not look related to the website. It may authenticate mail or verify another service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set TTL deliberately

TTL (time to live) tells recursive resolvers how long they may cache a record. A longer TTL reduces repeated lookups but makes a correction remain cached longer; a shorter TTL allows changes to be observed sooner while the value is in effect. Follow your DNS provider’s guidance rather than choosing a value at random.

Lowering TTL shortly before a planned migration can reduce the time users retain an old answer, but cached responses already issued under the previous TTL still have to expire. After the change is stable, restore the provider’s recommended value if appropriate.

Verify the change from more than one angle

  1. Check the authoritative zone. Confirm that the saved records show the exact name, type and target supplied by the host.
  2. Query DNS. Use a DNS lookup utility or the provider’s lookup tool to query the A and AAAA records for the apex and the CNAME or address record for www. A command-line check can be as simple as dig +short A example.com, dig +short AAAA example.com and dig +short CNAME www.example.com; replace the domain with yours.
  3. Test both URLs. Load https://example.com and https://www.example.com separately. If you advertise both forms, both need working DNS and corresponding web-host configuration.
  4. Check from another network. A mobile connection or an external DNS checker helps distinguish a local cache from a zone-wide problem.
  5. Allow propagation. Microsoft documents that DNS changes typically take about 15 minutes to take effect, although some updates take longer because resolvers honor cached TTLs.

DNS resolution and website delivery are separate checks. A hostname can resolve correctly while the host has not yet configured the domain, HTTPS certificate or redirect. Resolve the name first, then investigate the web server or certificate if the browser still fails.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Diagnose common DNS failures

The site does not change after editing records

  • Confirm the registrar’s NS delegation matches the DNS provider you edited. If it points elsewhere, make the change in the authoritative zone or correct the delegation.
  • Check the record name. Some panels expect @ for the apex, while others expect the bare domain; entering the full domain in a field that automatically appends the zone can create the wrong hostname.
  • Review TTL and wait for caches to expire. A successful lookup at the authoritative server does not instantly replace cached answers everywhere.

One hostname has conflicting records

An A or AAAA record and a CNAME for the same name are generally incompatible. Remove the stale record or follow the host’s migration instructions so that one clear answer remains. Multiple A or AAAA records are valid only when the provider intentionally supplies multiple addresses.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DNS_PROBE_FINISHED_NXDOMAIN appears

NXDOMAIN means the queried name does not exist from the resolver’s perspective. Check that the domain is delegated to active nameservers, that the zone exists on those nameservers, and that the requested hostname has a record. An incomplete zone or a missing www entry can produce this result.

www fails but the apex works

Verify that a www record exists and that its target is spelled exactly as the host supplied. If the host expects a CNAME, do not point www at an unrelated IP. Also confirm that the web host has been told to accept the www hostname; DNS alone does not add a domain to the hosting account.

The apex works but IPv6 users fail

An incorrect AAAA record can send IPv6-capable clients to an unreachable server even when the A record is correct. Remove an obsolete AAAA record or replace it with the IPv6 address supplied by the host. Publish AAAA only when the host supports IPv6 for that site.

Cloudflare-proxied alias errors occur

When a CNAME chain is used with Cloudflare proxying, the chain must ultimately resolve to a hostname that has a valid A or AAAA record. Check every hop and correct the final target rather than adding an arbitrary address.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Email stops after a website change

Inspect MX and TXT records for accidental deletion or replacement. Restore the email provider’s exact values, then allow their TTLs to expire and test delivery. Web A, AAAA and CNAME changes should not be used as a shortcut for changing mail routing.

How to evaluate a DNS provider

If you are choosing or changing DNS providers, compare capabilities rather than selecting solely by brand or interface.

  • Record and apex support: Confirm that the service supports every record type your host requires and provides an approved method for the apex when the host supplies a hostname.
  • TTL controls: Check whether you can set the TTL values needed for migrations and routine operation.
  • Proxying and DNSSEC: Understand whether traffic proxying is optional and whether DNSSEC is available for your domain and registrar combination.
  • Integrations: Check compatibility with the registrar, hosting platform and email provider before moving the zone.
  • Diagnostics: Look for authoritative lookup views, change history and clear error messages that help distinguish delegation, record and caching problems.
  • Cost and support: Compare recurring charges and the support channels available for outages or delegation errors.

The right record also depends on context: whether the name is the zone apex or a subdomain, whether the destination is an IPv4 address, IPv6 address or hostname, and whether the traffic is web or email.

A practical pre-launch checklist

  • The domain’s NS delegation points to the DNS provider you are editing.
  • The web host’s current A, AAAA or CNAME targets are copied exactly.
  • The apex has the required address or supported apex-alias configuration.
  • www has the host-prescribed record if that hostname is advertised.
  • Only the subdomains actually in use have been created.
  • No hostname has an accidental A/AAAA and CNAME conflict.
  • Existing MX and TXT records remain intact, including email verification and SPF-related entries.
  • TTL settings follow the DNS provider’s guidance.
  • Authoritative lookups return the intended answers.
  • Both the apex and www URLs have been tested after caches had time to refresh.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.