CNAME (Canonical Name Record) is a DNS record that creates an alias for a domain name, allowing you to point a subdomain to a canonical domain. This article analyzes the role, format, configuration, advantages, disadvantages, and practical applications of CNAME records.
High-Speed Proxy - Ready to Try?
ALGO Proxy offers residential, datacenter & 4G proxies in 195+ countries
What is CNAME?
What is CNAME? CNAME (Canonical Name Record) is a type of name record in the Domain Name System (DNS), also known as an alias record, used to designate a domain name as an alias of another canonical domain name.
Every website hosting system needs an IP address to connect to the Internet. A computer can have countless CNAME aliases, but each alias must have a separate CNAME record in the database. This allows multiple servers, such as FTP servers and web servers, to operate on different ports from the same IP address. Each server will have its own entry in DNS, for example ftp.yourdomain.com.
CNAME also allows multiple HTTP servers to run on the same port but with different names, all belonging to the same physical server.
The benefit of using CNAME is that when you change the IP address of an A record, all CNAME records pointing to that host will also be automatically updated. For example, if you have a website with the domain bizflycloud.vn, it will be linked to an A record that converts the domain name to IP address 1.2.3.4. When you have several subdomains like www.example.com, ftp.example.com, mail.example.com, you can use CNAME so that all these subdomains point to the main domain vccloud.com, instead of having to create a separate A record for each subdomain and link it to an IP address.

The Role of CNAME in Domain Management
The role of CNAME in domain management is to provide a method for pointing one domain name to another, creating a link between them while maintaining the properties of the original domain.
When a server receives a request to access a domain with a CNAME record, it automatically redirects the request to the domain specified in the CNAME record.
CNAME is very useful when you want to map a subdomain or specific service to a main domain. Instead of updating multiple A records (IP addresses) every time you change servers, you only need to change the CNAME record to remap the domain.
For example, if you have the subdomain blog.tmproxy.com and want to point it to the main domain tmproxy.com, you simply create a CNAME record where blog.tmproxy.com points to tmproxy.com. When there is a request to access blog.tmproxy.com, the system will automatically redirect to tmproxy.com.
CNAME Record Format
The format of a CNAME record is:
Where:
: is the domain name you want to create a CNAME record for.- IN: is the record class (here IN stands for Internet).
- CNAME: is the record type.
: is the canonical domain name that you want to link with the specified domain.
For example, to create a CNAME record linking the www domain to the main domain example.com, you can use the following format:
www IN CNAME example.com
Note that the syntax and format of CNAME records may vary depending on the DNS service and DNS version you are using.

Advantages and Disadvantages of CNAME Records
Like any other technology, CNAME has its own advantages and disadvantages. Understanding these strengths and weaknesses will help you use CNAME more effectively in your domain management strategy.
Advantages of CNAME Records
First, CNAME helps create alternative domain names (aliases) for the canonical domain, making domain management and website structure easier and more convenient. Instead of using the main domain, you can create alternative domain names that are easier to remember and more flexible.
Second, CNAME records allow you to change the IP address of a domain with just a single edit to the linked record. This saves time and effort compared to modifying multiple A or AAAA records. Instead of updating multiple records, you only need to edit a single record to change the IP address.
Finally, using CNAME records simplifies redirecting access from one domain to another. This minimizes the complex steps involved in domain migration. Instead of adjusting multiple settings and updating multiple records, you only need to create a single record to redirect access from one domain to another.
Disadvantages of CNAME Records
Although CNAME records offer many benefits in domain management, there are some disadvantages to be aware of:
- Every time there is a request to a CNAME record, the DNS resolution process must redirect from the alias domain to the target domain. This can increase response time due to the additional forwarding step.
- When a CNAME record is configured for a domain, that domain cannot have other DNS records (such as A, MX, TXT). This can cause conflicts if the domain needs to point to multiple different services.
- CNAME records cannot be used for the root domain — they only apply to subdomains. This limits flexibility when you need to use CNAME for the main domain.
- If the target domain in the CNAME record encounters issues or goes down, the alias domain will be affected and cannot be accessed normally, increasing dependency on the target server's configuration.
- Using CNAME without careful configuration can affect SEO, as search engines may index both the alias domain and the main domain, leading to duplicate content.
Guide to Configuring CNAME Records
Properly configuring CNAME records is crucial to ensuring the effective operation of the DNS system. Below is a detailed guide on how to configure CNAME records in common scenarios.
Configuring CNAME Records for a Domain
Typically, when configuring a CNAME record, you would do the following:
Example: with the domain pavietnam.vn, you can configure the CNAME record as follows:
www 360 IN CNAME pavietnam.vn
Configuring CNAME Records for a Subdomain
To configure an alias for a subdomain, you typically use a CNAME record.
Example: with the subdomain ftp.pavietnam.vn, you can configure as follows:
ftp IN CNAME www.pavietnam.vn
Configuring CNAME Records for SSL Certificate Verification for Domain/Subdomain
Configuring CNAME for SSL verification for a domain
Example: You will receive a CNAME record to configure on the domain for SSL verification:
_AF5022C8CD914E2B20A0AD92FE150ACC.toanthanggps.vn Point to C41E05B39DFB2AD4C401F8C35558A62F.1BA50DB0AAA11954414EE0555CFC4B83.M45k5m5f5mg0Ks5kc25z.sectigo.com
Please configure the CNAME for the domain as follows:
To configure the domain when registered at P.A Vietnam, access the domain management page at:
- https://access.pavietnam.vn/
- https://access.dotvndns.vn/
Log in using the domain name and password (password information will be sent when the domain is registered).
After logging in, add the CNAME record in the domain configuration section, as shown below:

Insert CNAME configuration image
Then save the settings.
You can verify the configured CNAME record by visiting:
https://mxtoolbox.com/SuperTool.aspx and entering the CNAME value to check:
_AF5022C8CD914E2B20A0AD92FE150ACC.toanthanggps.vn

Configuring CNAME for SSL verification for a Subdomain
What is Cloud? Meaning, benefits, and applications of Cloud Server
Example: You will receive a CNAME record to configure on the domain for SSL verification:
_C539FA59AA8F08F5EB02805BFBD9E44C.tienich.tatthanh.vn CNAME B322AF6FFA0CE4E7099D4F3F539B98AC.F53A4B0BABC1EEA13E0CCF94327D8892.8Qk9Rp6s.comodoca.com
Please configure the CNAME for the domain as follows:
_C539FA59AA8F08F5EB02805BFBD9E44C.tienich 360 IN CNAME b322af6ffa0ce4e7099d4f3f539b98ac.f53a4b0babc1eea13e0ccf94327d8892.8qk9rp6s.comodoca.com
Then save the settings.
You can verify the CNAME record by visiting:
https://mxtoolbox.com/SuperTool.aspx and entering the CNAME value to check:
_c539fa59aa8f08f5eb02805bfbd9e44c.tienich.tatthanh.vn

Querying CNAME Records
You can use the dig command in the terminal to identify the CNAME record linked to a domain. The result will appear in the ANSWER section, including the fully qualified domain name (FQDN), time to live (TTL), and the domain name.
Example dig command:
dig www.pavietnam.vn The result may look like this:
yaml
; <<>> DiG 9.16.1-Ubuntu <<>> www.pavietnam.vn ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 188 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;www.pavietnam.vn. IN A ;; ANSWER SECTION: www.pavietnam.vn. 302 IN A 112.213.82.66 ;; Query time: 3 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: T2 Thg 11 14 09:20:32 +07 2022 ;; MSG SIZE rcvd: 61
Applications of CNAME Records
CNAME (Canonical Name) records have many important applications in domain management and DNS, including:
- Domain redirection: CNAME allows you to redirect an alias domain to another domain, simplifying the management of multiple domains and ensuring users always access a single address.
- Cloud service management: When using cloud hosting or CDN (Content Delivery Network), CNAME records can point your domain to the service address, maintaining brand consistency without needing to change IP addresses when the service changes.
- Subdomain assignment: CNAME is commonly used to point subdomains to different services. For example, you can point blog.example.com to a blogging platform like WordPress.com or Medium.
- Supporting multiple development environments: When developing web applications, CNAME records can point from a subdomain to a testing or development environment without changing the main DNS configuration, making management easier.
- Email service management: CNAME can also be used to configure email services such as Google Workspace or Microsoft 365. CNAME records point to the email service's servers, supporting authentication and domain management.
- SEO optimization: Although it requires careful configuration, CNAME can help manage content effectively and ensure alias domains do not dilute traffic, thereby improving SEO performance.
- Third-party service integration: CNAME is commonly used to integrate with third-party services such as e-commerce platforms (Shopify, BigCommerce) or video hosting services (YouTube, Vimeo), helping maintain branding and optimize domain usage.

Differences Between ALIAS and CNAME
Below is a comparison table between CNAME Record and Redirect:
| Criteria | CNAME Record | Redirect |
|---|---|---|
| Concept | A DNS record used to point an alias domain to another domain. | A method of redirecting requests from one URL to another. |
| How it works | Forwards at the DNS level. | Forwards at the HTTP level. |
| Response time | May cause latency in DNS resolution due to additional steps. | Usually faster because the redirect is executed immediately after access. |
| Use for root domain | Cannot be used for root domains. | Can be used for both root domains and subdomains. |
| IP address control | Does not provide IP address control, only forwards domain names. | Can specify a specific IP address for the destination page. |
| SEO | Does not directly affect SEO, but may cause duplicate content if not careful. | Can affect SEO depending on the redirect type (301, 302, etc.). |
| Redirect type | Only supports domain forwarding. | Supports multiple redirect types (301, 302, meta refresh, etc.). |
| Cache impact | CNAME can be stored in DNS cache. | Redirect can be stored in browser or proxy cache. |
What is VPS? Advantages, disadvantages, and applications of Virtual Private Server
Summary:
CNAME Record is typically used to link domains with other domains and create alias domains. Redirect is used to redirect users from one URL to another. When to use CNAME:
When you want to create subdomains that point to the same IP address. When you want to connect a domain name with external services like CDN, email hosting, etc. When to use Redirect:
When you want to redirect users from one URL to another. When you want to update the URL structure of a website or migrate to a new domain. When you want to notify users about a temporary website migration.
Important Considerations When Using CNAME Records
When configuring and using CNAME Records, there are several important things you need to keep in mind to ensure effective DNS operation:
- Do not use CNAME for root domains: CNAME cannot be applied to root domains — it can only be used for subdomains. To link a root domain, you should use an ALIAS or A record.
- Verify the domain: Before adding a CNAME record, make sure the domain you are using does not have other DNS records such as A, MX, or NS pointing to it. If it does, you need to delete or modify those records before adding the CNAME.
- Ensure hostname uniqueness: The hostname in the CNAME record must be unique and cannot be used for other records like MX, A, or AAAA. However, DNSSEC records like RRSIG and NSEC may be exceptions.
- Impact on DNS response speed: Using too many CNAME records can increase DNS response time. Each CNAME requires an additional DNS query to resolve the new hostname.
- Update management: When you need to change the IP address or target hostname, you only need to edit the CNAME record instead of changing multiple A or AAAA records. However, ensure updates are correct and synchronized to avoid service disruption.
- Use with third-party services: Check whether your DNS service provider or hosting provider supports CNAME records. Make sure they allow you to configure and manage this record in their system.
- Consider DNS caching: DNS queries can be cached in DNS servers and network devices. Therefore, when changing DNS information, such as switching Nameservers, it may take time for these changes to propagate across all DNS servers on the network.
{{< test-result title="Comparison of CNAME and other DNS records" headers="Criteria|CNAME|A Record|ALIAS|Redirect" row1="Function|Point alias to domain|Point to IP address|Point root domain to domain|URL redirect" row2="Root domain|Not supported|Supported|Supported|Supported" row3="Level|DNS|DNS|DNS|HTTP" row4="Speed|Slower (extra step)|Fast|Fast|Fast" row5="SEO|Careful of duplicate content|Good|Good|Depends on 301/302" />}}
Conclusion: CNAME is an important DNS record that helps create aliases for domain names, simplifies system management, and supports third-party service integration. Careful configuration is needed to avoid DNS speed impacts and duplicate content SEO issues.









