Adding CNAME records to Namecheap is a fairly simple process. First, open the Namecheap control panel and select Domains.
On the left side of the Domains page, you will see the list of your domains. Click on the domain you want to modify.
On the General page, under the DNS section, click on the CNAME tab. You will see a list of all the CNAME records associated with the domain.
To add a new CNAME record, click on the Add button.
In the Add CNAME dialog box, you will need to provide the following information:
Name: The name of the CNAME record.
Alias: The alias name of the CNAME record.
IP Address: The IP address of the hostname you want to map to the CNAME record.
Hostname: The hostname you want to map to the CNAME record.
Click on the OK button to add the CNAME record to the Namecheap control panel.
Now, you need to assign the CNAME record to the domain. To do this, open the Namecheap DNS configuration file ( located at /etc/Namecheap/domain-config.xml ) and locate the domain you want to modify.
In the < domain > section, locate the < alias > section and add the CNAME record information. For example, here is how the < alias > section for the mydomain.com domain might look:
mydomain.com.
CNAME mydomain.
Now, you need to restart the Namecheap name server for the changes to take effect. To do this, open the Namecheap control panel and select Servers.
On the right side of the Servers page, click on the name of the name server you want to modify.
On the General page, under the DNS section, click on the Restart button.
Finally, you need to update the DNS records for the domain. To do this, open the DNS server configuration file ( located at /etc/resolv.conf ) and add the mydomain.com domain name to the list of nameservers. For example, here is how the mydomain.com domain might be listed in the file: nameserver 192.168.1.1.
You can also add the CNAME records to the nameserver configuration file directly.1 mydomain.