Cname mail record
A CNAME (Canonical Name Record) is a type of DNS record that maps an alias or a nickname to the canonical name of a server or host. In other words, it's a way to create an alias for a domain name.
A CNAME record is used to:
- Map an alias to a canonical name: For example,
blog.example.com
can be an alias forwww.example.com
. - Provide load balancing: Multiple CNAME records can be used to distribute traffic across multiple servers.
- Provide redundancy: CNAME records can be used to provide redundancy by mapping multiple aliases to the same canonical name.
The format of a CNAME record is as follows:
CNAME <alias> <canonical name>
Where:
<alias>
is the alias or nickname you want to create.<canonical name>
is the actual domain name or server name that the alias points to.
Here's an example of a CNAME record:
CNAME blog.example.com www.example.com
This CNAME record maps the alias blog.example.com
to the canonical name www.example.com
.
When a user types blog.example.com
into their browser, the DNS server will look up the CNAME record and return the IP address associated with www.example.com
.
CNAME records are commonly used for:
- Load balancing and redundancy
- Creating aliases for subdomains
- Mapping multiple domains to a single IP address
- Providing a way to redirect traffic from one domain to another
Keep in mind that CNAME records can only be used for domain names, not IP addresses. If you need to map an IP address to a domain name, you would use an A record instead.