Jump to content

Recommended Posts

Posted

DNS CNAME

A DNS CNAME (Canonical Name) record is used to create an alias for a domain name, mapping it to another domain name instead of an IP address. It allows multiple domain names to point to the same destination without needing separate IP addresses.

How a CNAME Record Works:

If you create a CNAME record like this:

Hostname: www.example.com

Record Type: CNAME

Value: example.com

When someone visits www.example.com, the DNS server redirects the query to example.com. The DNS resolver will then look up the A record for example.com to get the IP address.

Example Use Cases:

Pointing Subdomains:

www.example.com → example.com

Branding for Services:

mail.example.com → ghs.google.com (Google Workspace)

Content Delivery Network (CDN):

cdn.example.com → cdn.cloudflare.net

CNAME Record Rules and Restrictions:

Alias to a domain name, not an IP address.

Multiple CNAMEs can point to the same target domain.

Cannot be used for the root domain (apex domain). Use an A or ALIAS record instead.

CNAME loops are not allowed: a.example.com → b.example.com → a.example.com.

CNAME vs. A Record vs. ALIAS:

Record TypePurposePoints To

A RecordMaps a domain to an IPv4 address192.168.1.1

CNAME RecordMaps a domain to another domain nameexample.com

ALIAS RecordRoot-level domain redirection (like CNAME)example.com → IP

  • Nulledin changed the title to DNS CNAME (Canonical Name) Record

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms and Conditions