How to Point a Subdomain to a Different Server

Steps to route a subdomain to an external server using A or CNAME records in the cPanel Zone Editor.

· Updated · 2,463 views

You may want a subdomain such as blog.yourdomain.com to run on a server other than your main hosting. DNS lets you do this with a single record while the rest of your domain stays where it is.

Choose the Right Record

  • Use an A record when the other server gives you an IP address.
  • Use a CNAME record when the other server gives you a hostname, such as a platform endpoint.

Point With an A Record

  1. Open Zone Editor in cPanel and click Manage.
  2. Click + Add Record and select A Record.
  3. Set Name to the subdomain, for example blog.
  4. Set Record to the destination server's IP address.
  5. Click Add Record.

Point With a CNAME Record

  1. In the Zone Editor, click + Add Record and choose CNAME Record.
  2. Set Name to the subdomain.
  3. Set Record to the target hostname provided by the other service.
  4. Click Add Record.

| Scenario | Record type | Value | | -------- | ----------- | ----- | | Server IP given | A | 198.51.100.42 | | Hostname given | CNAME | target.platform.com |

Verify and Finish

After propagation, confirm with dig that the subdomain resolves to the new destination. Remember that DNS only routes traffic. The destination server must also be configured to accept the subdomain and serve content, including any SSL certificate. If you mix an A and CNAME on the same name, remove one to avoid a conflict.

Was this article helpful?

Your feedback helps us improve our documentation.

Still Need Help?

Our support team is available 24/7 to assist you.