Adding a CNAME record in cPanel

A CNAME makes one hostname an alias of another hostname. It is useful for services that supply a canonical target, but it is not an HTTP redirect and does not change the URL displayed in a visitor’s browser.

Check access and requirements

Confirm cPanel serves the domain’s authoritative DNS and copy the exact target supplied by the destination service. A CNAME normally cannot coexist with other ordinary record types at the same name, and the zone apex has special constraints.

01 Add a CNAME record in cPanel

  1. Open Zone Editor and select Manage for the domain or use the CNAME shortcut.
  2. Enter the alias hostname, such as shop.example.com. Review the final name after the panel expands any relative label.
  3. Enter the target hostname without https://, a port, or a URL path. Do not enter an IP address in the CNAME target field.
  4. Resolve any conflicting record at the same name only after recording its existing purpose. Save the new CNAME.
  5. Complete the destination service’s custom-domain verification and certificate setup, then check DNS and the application over HTTPS.

02 Example: enter a CNAME target without URL components

If your service gives you an alias target such as tenant.platform.example, map it into cPanel Zone Editor as a hostname. This fictional target illustrates the required format. Use the exact current value issued by your destination service.

Example details
Name:    shop.example.com.
Type:    CNAME
TTL:     300
Target:  tenant.platform.example.

Verification:
dig shop.example.com CNAME +noall +answer

Read the result: The target contains no https:// prefix, port number, slash or website path. The resulting DNS answer should show shop.example.com as an alias of the supplied hostname. A CNAME does not send a browser to a different URL and does not enable a custom domain inside the destination platform.

Check for existing A, AAAA, TXT or other conflicting data at this exact alias name before changing it. Complete the provider's domain verification and certificate steps, then test the public HTTPS site. Leave apex and email records intact unless the migration specifically requires them.

Confirm the expected result

The alias should resolve through the intended target and the external service should recognise your hostname. DNS alone does not authorise an unknown domain on the destination application.

Why is the CNAME rejected, and can it replace a browser redirect?

If the panel rejects the record, inspect A, AAAA, MX or other conflicting records and confirm the hostname is appropriate for a CNAME. Do not replace the apex with a conventional CNAME unless the DNS provider explicitly supports an appropriate alternative. Use a web redirect when the browser URL must change.

  • 0 Users Found This Useful
  • cpanel-whm, domains-dns
Was this answer helpful?

Related Articles

Adding an IPv4 A record in cPanel Zone Editor

An A record maps a hostname to an IPv4 address. Edit it in cPanel only when the domain’s...

Adding MX records for an email provider in cPanel

MX records tell other mail systems where to deliver messages for a domain. Use the exact...

Editing or deleting a DNS record in cPanel Zone Editor

Use Zone Editor to change a specific DNS record or remove one that is no longer needed. Work on...

Changing or removing a cPanel CNAME alias

Update a CNAME when a custom-domain integration moves to a new canonical hostname, or remove it...

Changing or removing MX records during an email migration

Editing the MX set changes where new incoming mail is routed. A reliable migration coordinates...