Create subdomain of domainA to domainB with cpanel setting

tony1124

Registered
Jul 5, 2019
3
0
1
Hong Kong
cPanel Access Level
Root Administrator
let's say domainA is example.com and domainB is example2.com. And, example2.com is hosted in cpanel.

In example.com DNS record, I add an CNAME record with name: payment, TTL: 14400 and domain: example2.com.

Then, I tried payment.example.com in browser and got

i.ibb.co/n0wCGpf/1.png


From this page, I at least know that the pointing should be correct, but some settings in example2.com is wrong. I tried to search online. I found Create the sub-domain account in WHM. Then, I create an account like below.

i.ibb.co/23vbkrn/2.png
Then, I tried payment.example.com again, and I got.

i.ibb.co/NptfYrt/3.png

After this step, I can't find any solution. Does anyone know what step I missed if I want to reach same page either from example2.com or payment.example.com? Any suggestions? Thanks.
 
Last edited by a moderator:

nixuser

Well-Known Member
May 30, 2014
149
37
28
nixuser.com
cPanel Access Level
Root Administrator
Twitter
I am guessing you want to show the content of example2.com in payment.example.com.

Create subdomain payment.example.com.

Change the A record of the subdomain to the second server's IP.

Now park payment.example.com on top of example2.com from WHM, will have to edit tweak settings to allow this.
 

tony1124

Registered
Jul 5, 2019
3
0
1
Hong Kong
cPanel Access Level
Root Administrator
Change "Allow users to park subdomains of the server’s hostname." from off to on?

I tried, but still receive

example.com/cgi-bin/
 
Last edited by a moderator:

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
6,814
541
263
Houston
cPanel Access Level
DataCenter Provider
You'd want to go to the cPanel account for example2.com -> Domains -> Alias domains and add payment.example.com as an alias of example2.com