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

Use an A record when your hosting provider gives you an IPv4 address. Use a CNAME when it gives you another hostname. If the service supplies an IPv6 address, add an AAAA record instead. Creating the DNS record is only half the job: your web host must also be configured for the new hostname and its TLS certificate.

For example, blog.example.com can point directly to 203.0.113.20 with an A record, or alias a hosted platform such as customer-site.vendor.example with a CNAME. The correct choice depends on the destination you were assigned, not on whether the name begins with blog, www or another label.

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

A record versus CNAME at a glance

Decision point A record CNAME record
Destination An IPv4 address, such as 203.0.113.20 Another DNS hostname, such as sites.vendor.example
Typical use A server whose address you control or were assigned A SaaS, CDN or hosted platform that gives you a target name
When the endpoint changes You must edit the address record when the provider assigns a different IPv4 address The provider can change the address behind its hostname while your record remains unchanged
Zone-apex compatibility Can be used for an apex if the DNS provider accepts an address there A standard CNAME cannot be used at the zone apex, such as example.com
Other records at the same name Can coexist with some record types according to DNS rules and provider validation Cannot share its name with MX, TXT, A, AAAA or other data records
IPv6 equivalent Use an AAAA record for an IPv6 address Still aliases a hostname; the target can resolve to IPv4, IPv6 or both

A CNAME target is always a DNS name, never an IP address. If a control panel rejects an IP in a CNAME field, that is expected behavior.

Before you add the record

Find the authoritative DNS provider

The registrar where you bought the domain may not host its DNS. Check the domain’s nameserver delegation, then open the dashboard for the provider listed there. Adding a record at a registrar that is not authoritative will not change public DNS.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Collect the exact values from the host

Write down the subdomain label, record type, destination, and any verification value supplied by the hosting platform. A provider may ask for blog as the name and customer-site.vendor.example as the target. Do not add the full domain to a name field if the dashboard automatically appends example.com; doing so can create blog.example.com.example.com.

Check for existing records

Search the zone for the name you plan to use. A CNAME cannot coexist with another record at that exact name. If blog.example.com already has an A, AAAA, TXT or MX record, remove or redesign the conflicting entry only after confirming what depends on it.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

How to add a subdomain record

  1. Open the authoritative DNS zone. Choose the domain and select a control such as DNS records, Manage DNS or Zone editor.
  2. Select Add record. Choose the record type specified by your host: A for IPv4, AAAA for IPv6, or CNAME for a hostname.
  3. Enter the subdomain label. Use blog, shop, status or another label. Most interfaces expect only the left-hand label, not the complete domain.
  4. Enter the destination exactly. Put the IPv4 address in an A record, the IPv6 address in an AAAA record, or the fully qualified target hostname in a CNAME field. A CNAME should not contain http://, a URL path or an IP address.
  5. Set the TTL. The time-to-live controls how long recursive resolvers may cache the answer. Keep the provider’s normal value for a stable record; a shorter value can make a planned migration easier but causes more frequent DNS queries.
  6. Choose proxying only when you understand it. Some DNS platforms can proxy web traffic instead of returning the origin address directly. Record whether this entry is DNS-only or proxied, because proxying can change the answer visible to lookups and the default TTL.
  7. Save and wait for publication. The authoritative server usually has the new value first. Recursive resolvers may continue returning the previous value until their cached TTL expires.
  8. Configure the web host and certificate. Add the hostname in the hosting platform’s custom-domain or site settings, then issue or attach a TLS certificate for blog.example.com. DNS does not create a website, a virtual host or a certificate.
  9. Verify both DNS and HTTP. Query the authoritative server and a public resolver, then visit the HTTPS hostname and confirm that the expected site and certificate are returned.

Cloudflare’s 2026 documentation describes the A-record entry this way: “To point to an IPv4 address, select A, use your subdomain (blog) for the record Name, and insert the IPv4 address in the respective field.” Other dashboards use different labels, but the values are the same.

When an A record is the right choice

An A record directly maps the subdomain to an IPv4 address. Use it when your company owns the server, has a reserved address, or has been assigned a fixed address by a hosting provider.

Example: a self-managed web server

Suppose your server is assigned 203.0.113.20. Create:

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
blog.example.com.  A  203.0.113.20

Then configure the web server’s virtual host for blog.example.com and obtain a certificate covering that name. If the server also has IPv6, add the supplied IPv6 address in a separate AAAA record. Do not substitute an IPv6 address into an A record.

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

Operational trade-offs

  • You have direct control over the address and can point traffic to infrastructure you manage.
  • If the provider changes the server’s IPv4 address, you must update DNS, and cached answers may delay the transition.
  • An A record exposes the configured IPv4 address to DNS clients unless a supported proxy is placed in front of it.

When a CNAME is the right choice

A CNAME makes one hostname an alias of another. It is usually the correct record for a hosted website builder, application platform, CDN or other SaaS that gives you a destination such as tenant.hosting.example.

Example: a hosted platform

Create:

blog.example.com.  CNAME  tenant.hosting.example.

The resolver follows the alias and obtains the target’s address records. If the platform moves the tenant to another server, it can update its own DNS while your alias remains unchanged.

Restrictions that matter

  • A standard CNAME cannot be placed at the zone apex. The apex is the bare domain, example.com; www.example.com and blog.example.com are below it.
  • The CNAME name must not have any other record data. You cannot put a TXT verification record, MX mail record, A record or AAAA record at that same name.
  • A CNAME points to a name, not a web address. Paths such as /blog and schemes such as https:// do not belong in the target field.
  • The target must not create an alias loop. For example, pointing blog.example.com to itself, directly or through another alias, produces a resolution failure.

Why you cannot normally use a CNAME for the root domain

The root, or zone apex, contains the zone’s own records, including SOA and NS data. DNS standards do not permit a normal CNAME to occupy that node. Amazon Web Services states in its Route 53 documentation: “The DNS protocol does not allow you to create a CNAME record for the top node of a DNS namespace, also known as the zone apex.”

Provider-specific apex alternatives

If a service asks you to point example.com itself to a hostname, look for the DNS provider’s supported alternative:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  • Alias records: Route 53 alias records can point the apex to selected AWS resources.
  • ALIAS records: Google Cloud DNS documents ALIAS behavior that is similar to a CNAME while remaining usable at the apex.
  • ANAME or CNAME flattening: Some providers synthesize address answers for the apex by resolving a target hostname on your behalf.

These are provider features, not interchangeable universal DNS record types. Follow the exact instructions for the authoritative provider and the hosting platform. If no apex-alias feature exists, use the A and AAAA addresses supplied by the host, or keep the apex redirected to a subdomain such as www using the provider’s web redirect service.

DNS records and website hosting are separate

A successful DNS lookup only proves that a name resolves. The web service must still recognize the hostname in the HTTP Host header and present a certificate whose name matches it.

Common hosting-platform steps

  1. Open the site’s Domains, Custom domains or equivalent settings.
  2. Add the complete hostname, such as blog.example.com.
  3. Complete any ownership check, which may require a TXT record at a separate verification name. Keep that TXT record separate from a CNAME at the site name.
  4. Enable HTTPS and wait for the platform to issue a certificate. Some hosts issue certificates only after DNS resolves publicly.
  5. Set the preferred canonical hostname and redirect alternate names if the platform supports it.

If DNS resolves correctly but the browser shows a provider’s default page, a 404, an unrecognized-domain message or a certificate warning, inspect the host configuration rather than repeatedly changing the DNS record.

Keeping a subdomain in the parent zone or delegating it

Most sites keep blog.example.com as an ordinary record in the parent example.com zone. This is simplest when one team manages all DNS.

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

When delegation is useful

Create a separate hosted zone for sub.example.com when another team or provider must manage every name beneath it. Add NS records for that child zone in the parent zone. From then on, records such as app.sub.example.com are maintained in the delegated zone, not copied into the parent.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

AWS documents both models: records can remain in the parent hosted zone, or a separately hosted zone can be delegated with NS records. Delegation adds an administrative boundary and another set of nameservers to monitor, so it is usually unnecessary for one or two ordinary subdomains.

TTL, caching and proxying during changes

TTL is a cache lifetime, not a guarantee that every resolver will refresh at an exact second. Lowering it before a migration reduces the maximum expected cache period after the change, but increases query traffic. Raise it again after the destination is stable if your operating policy favors fewer repeated lookups.

When a provider proxy is enabled, public queries may return the proxy network’s addresses instead of your origin. The provider may also apply its own TTL behavior. Document the mode alongside the record so an incident responder knows whether an observed address is the origin or a proxy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verification commands and a troubleshooting path

Check the authoritative answer

First identify the zone’s authoritative nameserver, then query it directly:

dig @ns1.example-dns-provider.test blog.example.com A
dig @ns1.example-dns-provider.test blog.example.com CNAME
dig @ns1.example-dns-provider.test blog.example.com AAAA

Replace the nameserver with one actually listed for your domain. An A query should show the IPv4 address; a CNAME query should show the alias target. An AAAA query is useful when IPv6 is part of the deployment.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Compare a public resolver

dig blog.example.com A +short
dig blog.example.com CNAME +short

If the authoritative server is correct but the public result is old, caching is the likely explanation. If both are wrong, recheck the authoritative provider, name field and saved value.

Match the symptom to the cause

  • NXDOMAIN: The name does not exist in the authoritative zone, the record was added at the wrong DNS provider, or a delegated zone is missing.
  • SERVFAIL: Investigate DNSSEC errors, an unreachable delegated nameserver, or an alias loop.
  • Old address: A recursive resolver is serving its cached answer. Compare several resolvers and allow the prior TTL to expire.
  • Unexpected address: Check whether proxying is enabled and whether you queried A, AAAA or CNAME as intended.
  • Certificate mismatch: The host has not issued a certificate for the new name, or the request is reaching the wrong virtual host.
  • Default page or 404: DNS works, but the application or web server has not mapped the hostname to the intended site.

Practical decision examples

You received an IPv4 address

Create an A record for the requested label. Add an AAAA record only if the provider separately supplies an IPv6 address and the server is configured to accept IPv6 traffic.

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

You received a target hostname

Create a CNAME for the requested subdomain, leaving the target exactly as supplied. Remove conflicting records at that name, then add the hostname inside the hosted service and complete its verification.

You must point the bare domain

Do not create a conventional CNAME at the apex. Use the authoritative provider’s documented alias, ALIAS, ANAME or flattening feature, or use the A/AAAA values supplied by the service.

You need another organization to manage all child names

Delegate a child zone with NS records from the parent, then give the delegated team control of records below that boundary. Keep ownership and renewal contacts documented so the delegation does not become an unnoticed single point of failure.

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.