An A record connects a hostname directly to an IPv4 address. A CNAME record makes one hostname an alias of another hostname.
That is the central difference.
Use an A record when your hosting provider gives you a fixed IPv4 address such as 192.0.2.10. Use a CNAME when the provider gives you a hostname such as project.host.example, especially for a subdomain such as www, shop or app.
The two records can eventually lead visitors to the same server, but they store different targets and obey different DNS rules.
A .co.uk zone follows the same standards as the reserved examples used below.
A record vs CNAME at a glance
Question | A record | CNAME record |
|---|---|---|
What does it point to? | An IPv4 address | Another hostname |
Typical value |
|
|
Common name field |
|
|
Can you use it at the zone apex? | Yes | Normally no under standard DNS |
Can the same name hold other record types? | Yes, subject to type-specific rules | No, apart from DNSSEC-related exceptions |
Who manages target changes? | You update the IP | The target provider can change its IPs |
What happens during lookup? | The resolver receives an IPv4 address | The resolver follows the canonical target |
The @ symbol in many DNS panels means the zone apex: the bare registered domain without www before it.
A provider may use the words root domain or naked domain for the same position.

An A record stores the address. A CNAME stores the next hostname that the resolver must follow.
An A record ends at an IPv4 address
An A record answers the question: “Which IPv4 address serves this name?”
Type: A
Name: @
Value: 192.0.2.10
TTL: 3600
This example connects example.com to 192.0.2.10. A resolver can return that address without looking up another hostname.
Choose an A record when:
your web host supplies a stable IPv4 address;
you need to connect the zone apex to an IPv4 address;
a service explicitly asks you to publish an A record; or
you control the server address and will update DNS when it changes.
An A record does not cover IPv6. Add an AAAA record when the service also gives you an IPv6 address. Do not paste a hostname into the value field of an A record; the field expects an IPv4 address.
A CNAME makes one hostname an alias
A CNAME answers a different question: “What is the canonical hostname for this alias?”
Type: CNAME
Name: www
Target: project.host.example
TTL: 3600
Here, www.example.com becomes an alias of project.host.example. A resolver follows that target and then obtains its A or AAAA answer.
This suits services whose addresses may change behind a stable hostname. Your website platform, content delivery network or hosted application can update the target’s IP addresses without requiring you to replace an A record in your own zone.
Choose a CNAME when:
a provider gives you a hostname rather than an IP address;
several subdomains should follow one canonical service name;
you want
www.example.comto follow another hostname; ora platform’s custom-domain instructions explicitly request a CNAME.
A CNAME does not redirect a browser. DNS resolves names before the browser sends an HTTP request.
If you want example.com/page to send a visitor to a different URL, you need an HTTP redirect or a forwarding service.
A live lookup shows the difference
I queried Google Admin Toolbox Dig. The CNAME query for www.github.com returned github.com as its target.

The CNAME answer contains another hostname, not an IPv4 address.
I then queried the A record for github.com. That answer returned an IPv4 address directly.
DNS answers and TTLs can vary by time and location, so the address you see later may differ.

The A answer contains the IPv4 address used for that lookup.
The screenshots show the operational difference without implying that every CNAME requires a visibly slow second trip.
Resolvers cache records, and authoritative responses can include related data. The dependable distinction is the stored target: address versus hostname.
Why a CNAME normally cannot sit at the root
Standard DNS does not allow a CNAME to coexist with other data at the same name.
The zone apex already needs records such as SOA and NS. Turning the apex into a CNAME would conflict with those required records.
That is why a conventional setup often uses:
example.com. A 192.0.2.10
www.example.com. CNAME example.com.
Some DNS providers offer ALIAS, ANAME or CNAME-flattening features for the apex. These are provider-specific solutions, not a reason to assume an ordinary CNAME will work there.

For example, Cloudflare documentation explains how it flattens an apex CNAME and returns an IP answer, while Route 53 offers its own alias records for supported targets.
Follow the instructions for your active DNS provider. If its panel accepts a CNAME-like record at @, check whether it calls the result flattened, ALIAS or ANAME, and test the public answer after saving.
A CNAME name cannot also carry ordinary records
If shop.example.com has a CNAME, do not add an A, MX or TXT record with that exact same name.
RFC 1034 defines the alias as a separate identity from the canonical name, and later DNS guidance states that a CNAME cannot coexist with other ordinary data at its node.
This restriction can become apparent during service verification. A platform may ask for a CNAME at verify.example.com while another tool asks for a TXT record at the same label.
Use separate labels if the providers support them. Do not force both records onto one name.
The restriction applies to the full hostname, not to the whole domain. A CNAME at www.example.com does not prevent you from keeping MX records at example.com or a TXT record at _dmarc.example.com.
Choose the record from the target you received
Start with the value supplied by the service you are connecting.
Provider supplied | Record to choose | Example |
|---|---|---|
IPv4 address | A |
|
IPv6 address | AAAA |
|
Hostname | CNAME for a subdomain |
|
Hostname for the apex | Provider-specific alias or flattening | Route 53 alias, ALIAS, ANAME or flattened CNAME |
URL with | Neither by itself | Configure an HTTP redirect or application route |
Do not convert a provider’s hostname into the IP address it happens to return today unless the provider explicitly tells you to. The service may rotate that address.
The hostname is often the stable contract.
Avoid these five DNS mistakes
1) Putting a hostname in an A record
An A value must be an IPv4 address. If you received site.vendor.example, use the record type the vendor specified, usually CNAME for a subdomain.
2) Putting an IP address in a CNAME
A CNAME target must be a hostname. An IPv4 address belongs in an A record.
3) Replacing mail records by accident
Changing the apex or nameservers can affect far more than the website. Save the current MX, TXT and other service records before a migration. An A record change at @ should not require deleting unrelated mail records.
4) Building long CNAME chains
A chain such as www to site to origin creates extra dependency and makes faults harder to trace. Point the alias to the final stable hostname when the service supports it.
5) Judging success from the DNS panel
A saved row proves only that the panel accepted the input. Query the public DNS after the change, then test the website or service that depends on it.
Our pointing guide covers the wider connection process when your domain and hosting sit with different providers.
Test the answer after every change
Use dig, nslookup or a reputable online DNS lookup. Query the exact hostname and record type you changed.
dig example.com A
dig www.example.com CNAME
On Windows, you can use:
Resolve-DnsName example.com -Type A
Resolve-DnsName www.example.com -Type CNAME
Check that the returned value matches the intended address or hostname. Then test the connected service. A correct DNS answer does not prove that the web server has a valid TLS certificate, recognises the hostname or serves the expected site.
If an old answer remains visible, compare the TTL and query more than one resolver before changing the record again. Repeated edits restart the troubleshooting process and can leave different caches holding different versions.
Use A for an address and CNAME for an alias
The choice becomes straightforward once you inspect the target. An A record stores an IPv4 address. A CNAME stores another hostname and gives the target provider room to manage its addresses.
Use A at the apex when you have a fixed IPv4 address. Use CNAME for www or another subdomain when a platform gives you a canonical hostname. Treat apex aliases and flattening as provider-specific features, and never combine a CNAME with ordinary records at the same hostname.
If you need a domain with DNS controls in one account, search our domains and keep the service’s exact record instructions beside you during setup.
.com DomainsOwn the most recognised domain extension and earn trust at a glance.
Domain SearchYour ideal domain is only seconds away. Lock it in now.
UK DomainsBuild local trust instantly with a recognised .uk domain.
Whois LookupLook up domain owner information, renewal dates, and registration provider.
Domain TransferMove your domain with minimal disruption and full control
All DomainsChoose from a wide range of global domain extensions.
Web HostingDiscover cost-effective hosting packages designed for UK businesses.
Email HostingHost business email on your domain with enterprise-level security and effortless management.
Reseller HostingStart selling hosting today, even if you are not a tech expert.
Windows HostingGet peak performance for your Windows apps and websites.
cPanel HostingGet hosting managed through cPanel – effortlessly intuitive and globally recognised.
Affiliate ProgramEarn commission by referring customers to our services.
WordPress HostingFast, Optimised WordPress Hosting
VPS Hosting
Managed VPS Hosting
Dedicated Server



