Two hostnames, two dedicated servers and one domain name

azednetma

Active Member
Oct 27, 2015
41
3
8
Marrakech
cPanel Access Level
Root Administrator
Hello,

I have two dedicated servers and I need to create two hostnames using one domain name:

hostname1.domain1
hostname2.domain1

and use them in different servers.
server1 >> hostname1.domain1
server2 >> hostname2.domain1

the domain1 is hosted in server1.

how to achieve that please?
 

ZenHostingTravis

Well-Known Member
PartnerNOC
May 22, 2020
168
55
28
Australia
cPanel Access Level
Root Administrator
Hi @azednetma,

One solution is to point the name servers of your domain to server 1's name servers and then create the A records for the hostnames on server 1.

Obviously you would have to set the hostname for both servers when you set them up.

You also have to register the child name servers (that point to server 1) at your domain registrar.

Hope that helps!
 
Last edited:
  • Like
Reactions: azednetma

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,252
313
Houston
Yep all you would need is an A record created where DNS is hosted pointing to the other server for its hostname. You can do this for any number of subdomains so if you had 50 servers it would work the same way.

Server 1 hosts DNS records for domain1
server1.domain1.com - A record points to server 1
server2.domain1.com - A record points to server2
and so on