Before you start
- Access to wherever the domain's DNS is hosted — the nameservers decide where that is
- The IP address or hostname you were given
Step 1: Choose the record type
An A record maps a name to an IPv4 address; AAAA does the same for IPv6. A CNAME makes a name an alias of another hostname, so it follows that hostname wherever it moves. If a service gave you an IP address, use A. If it gave you a hostname, use CNAME.
Step 2: Know where a CNAME is not allowed
A name that has a CNAME may have no other record at all. That rules out the bare domain (@), which must also carry the zone's SOA and NS records. Some DNS providers offer a substitute for the apex, called ALIAS, ANAME or CNAME flattening; whether you have it depends on the provider. Without it, the apex gets an A record.
Step 3: Open the zone editor and add the record
In cPanel it is Domains → Zone Editor → Manage next to the domain → Add Record. At a registrar it is usually under DNS settings. Every editor asks for the same four things: name (host), type, TTL and value.
blog.yourdomain.com. 3600 IN A 192.0.2.10 shop.yourdomain.com. 3600 IN CNAME shops.example-platform.com.Step 4: Type the name the way the editor expects
Panels differ: some want only the label (blog), some want the full name, and some want a trailing dot to mark a name as complete. If the editor appends your domain and you type the full name too, you create blog.yourdomain.com.yourdomain.com. After saving, read back the full name the editor displays.
Step 5: Remove what the new record replaces
If an A record already exists for the name you want to CNAME, delete it — the two cannot coexist. If you are changing an A record, edit it rather than adding a second one: two A records on one name split visitors between both addresses.
Step 6: Check the answer
Query the record directly. On Windows, nslookup does the same job. Expect the new value once the old record's TTL has run out.
dig +short A blog.yourdomain.com dig +short CNAME shop.yourdomain.com nslookup -type=CNAME shop.yourdomain.com
The mistake people make
Adding a new A record next to the old one instead of editing it. DNS returns both, so roughly half of visitors keep landing on the old server and the problem looks intermittent.
