Skip to content
WebsiteHosting.com

concept Domains & DNS

CNAME record

See how a DNS CNAME aliases a hostname to another name and why ordinary records cannot share that alias owner.

Sources checked · P0017

What it means

A CNAME record aliases one DNS owner name to another canonical name; resolution may then continue for the requested address type. It does not tell a browser to navigate to another URL or rewrite an HTTP request. Ordinary DNS rules restrict coexistence with other data at the CNAME owner. CNAME semantics RRset rules

Try it

Simulation — trace an alias graph, then break one rule. Inspect the fixed records and choose Trace selected graph. A successful trace reaches the target's address; a conflict, loop, missing target or educational depth limit produces a stop instead of an invented address.

Follow an alias without redirecting the URL

Trace a valid alias, then introduce a conflict or loop and observe the bounded stop.

Simulation
Inspect the graph, then trace

The initial graph is readable without JavaScript. Trace performs only the local, bounded walk.

Follow an alias without redirecting the URL: current state
ItemState / resultWhy it matters
www.example.testCNAME origin.example.testNo ordinary-data coexistence conflict
origin.example.testA 192.0.2.20No ordinary-data coexistence conflict
Follow an alias without redirecting the URL: local inputs and actions

Fixed synthetic records. Not a DNS provider parser, flattening service or live validation.

About this model

Ordinary CNAME data cannot coexist with ordinary A/TXT/SOA/NS data at its owner. DNSSEC-related metadata exceptions are outside this scene. The four-alias limit is an educational guard, not a universal DNS limit. DNS aliasing does not change the hostname in the browser URL or issue an HTTP redirect.

Read the article’s primary sources for protocol rules and implementation-specific limits. This scene has no network access.

Compare the direct alias with the two-alias graph. Both reach the same address through different paths. Then choose CNAME plus ordinary TXT at the same owner, or an apex CNAME alongside SOA/NS. These fixtures deliberately violate ordinary-data coexistence rules. Removing a timeout or extending a trace cannot resolve that conflict. CNAME consistency Alias clarification

GraphLocal outcomeImportant distinction
Direct or two-link aliasTarget address is foundThe requested browser hostname is unchanged
CNAME plus ordinary TXT or apex SOA/NSConflict; no successful traceAn alias owner is not an ordinary multi-type record set
Two-node cycleLoop; stopFollowing the same names repeatedly cannot reach an address
Missing target or more than four aliasesBounded stopThe four-alias cap is a teaching guard, not a universal DNS limit

The target being absent from this small map is not a live finding about a domain. DNSSEC-related metadata exceptions, caching each link and provider flattening are outside the scene. Reset returns to the untraced direct alias. A DNS alias does not itself send an HTTP redirect or change the hostname a certificate must cover.

Coexistence and the zone apex

At a standard CNAME owner name, the alias cannot coexist with ordinary resource records such as A, AAAA, MX or TXT. DNSSEC-related records have narrowly defined exceptions; that is not general permission to mix a CNAME with ordinary data. The apex of a zone needs SOA and NS records, so a standard CNAME at that same apex conflicts with those requirements. CNAME rule Zone records

Proposed setupStandard DNS result
www CNAME to a hostname, no other ordinary www RRNormal alias pattern
www CNAME plus www AConflict at the same name
Zone apex CNAME alongside required SOA/NSConflict at the same name
Provider ALIAS/ANAME or flattening featureProvider-specific behavior, not an ordinary CNAME

Some providers synthesize A/AAAA responses from a target name at the apex; read their provider documentation rather than assuming this is standard CNAME behavior. DNS also has standardized SVCB/HTTPS AliasMode for certain services, which is not equivalent to a generic CNAME and has different client support. Service binding AliasMode

The alias works, but the HTTP hostname stays

Suppose blog.example.test CNAME app.host.example.test and the latter has an A answer. A resolver can follow the DNS alias toward that address, but an HTTPS client still requests blog.example.test; the server must recognize that hostname and present the right certificate. Changing the CNAME does not redirect the browser to app.host.example.test. A tempting counterexample is an apex example.test with an ordinary CNAME: the apex also needs SOA and NS data, so standard CNAME coexistence constraints matter. Some providers implement apex-flattening conveniences, which must not be called a standard apex CNAME. DNS aliases CNAME restrictions

In practice

Check the exact alias owner and target and follow the resulting address chain; inspect for loops or missing targets. Verify the final web service for the original requested hostname. Avoid introducing a CNAME where MX, TXT or other required records coexist without a provider-specific, justified design.

Compare A and AAAA records for literal addresses. For a controlled cutover use Change a DNS record safely.

Key takeaways

DNS aliasing changes lookup resolution, not the visible web address or TLS reference identity. Confirm both name-resolution chain and application hostname independently.

Frequently asked questions

Editorial questions, answered from the sources listed for this article.

Will a CNAME change the address shown in the browser?

Not by itself. DNS alias resolution finds data through another name while the requested URL remains the original URL. An HTTP redirect is a separate response from the web service.

Why is an ordinary CNAME at a zone apex a problem?

A zone apex already needs SOA and NS data. Ordinary CNAME coexistence rules conflict with those records. Provider-specific alias or flattening features, and SVCB or HTTPS records, must be evaluated under their own rules rather than treated as ordinary CNAME exceptions.

Can a CNAME point directly to an IPv4 address?

No. A CNAME target is a domain name; A/AAAA records carry IP addresses.

Can a CNAME owner also have MX or TXT data?

Under ordinary DNS rules, a CNAME owner must not coexist with other data at that owner. Check provider-specific synthetic alias features separately.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. RFC 1034 — Domain Names: Concepts and Facilities

    Sections 2.4, 3.1, 4.3.2 and 5. DNS tree, zones, referrals, resolvers and caching.

    Checked .

  2. RFC 2181 — Clarifications to the DNS Specification

    Sections 5 and 10. RRsets, CNAME coexistence, and MX/NS alias restrictions.

    Checked .

  3. RFC 1035 — Domain Names: Implementation and Specification

    Sections 3.2, 3.3 and 4. RR formats, TTL, A, NS, SOA, CNAME and MX records.

    Checked .

  4. RFC 9460 — Service Binding and Parameter Specification via DNS

    Section 2.4.2, AliasMode. Standard SVCB/HTTPS AliasMode differs from CNAME and vendor flattening.

    Checked .