February 10, 2023
CNAME (Canonical Name) records are used to map an alias or subdomain to a real or target domain name. For example, you might use a CNAME record to map the hostname “www.example.com” to the target domain “example.com”.
Here’s an example of a CNAME record:
www.example.com. IN CNAME example.com.
In this example, the CNAME record maps “www.example.com” to “example.com”. So, when a user visits “www.example.com“, the server will return the same content as it would for “example.com”. This can be useful for hosting multiple subdomains on a single server, or for redirecting traffic to a different server without changing the URL in the user’s browser.
A (Address) records, on the other hand, map a domain name to an IP address. For example, you might use an A record to map the domain name “example.com” to the IP address “192.168.1.100”.
Here’s an example of an A record:
example.com. IN A 192.168.1.100
In this example, the A record maps “example.com” to the IP address “192.168.1.100”. So, when a user visits “example.com”, their browser will connect to the server at IP address “192.168.1.100” to retrieve the content for the website.
It’s important to note that CNAME records cannot be used for the root domain (e.g., “example.com”), as the root domain must be mapped to an IP address using an A record. Additionally, CNAME records can’t be used in combination with other record types for the same hostname, as this can lead to conflicts and unexpected behavior.
ANOTHER EXAMPLE:
dev.website.com.au. 14400 A 100.1.100.100
www.dev.website.com.au. 14400 CNAME dev.website.com.au
More Post to read
Essential Security Checks for Your WordPress Website
September 17, 2025
Workflows That Work: How Make.com and n8n.io Are Saving Small Businesses Time
June 16, 2025
Cybersecurity for Healthcare Websites: What You Need to Know (and Where to Look)
5 Essential Features for a Small Business Website
June 10, 2025
What to Do If Your Website Starts Sending Spam Emails
April 15, 2025
Simple Membership Plugin: Setup
January 31, 2025
Essential Tools for Checking ARIA Compliance in Web Development
October 1, 2024
Secure Your WordPress Site with a Robust .htaccess Configuration
September 3, 2024
Setting Up a New Business: Should You Choose Google Workspace or Office365?
August 29, 2024
How to Add a Domain that Works with All Google Maps Platform APIs
July 3, 2024
June 20, 2024
May 11, 2024
April 23, 2024
SQL URL Replacer – From Local to Live
April 21, 2024
Building an Accessible Accordion Component