Configuring A records (sub domain) under account to point to another account (WHM)

markuswest

Active Member
Oct 21, 2013
30
0
6
cPanel Access Level
Root Administrator
Hi,

On my server I have 2 accounts, the one is a live website the other is an open account to develop the new website but my problem is I want to create a sub domain on the account of the live site that points to the other (new/development) account, so I did add the "A" record as "dev.domain.co.za" with the IP of the development site (on the right) but after I log back in to edit the DNS zone I only see "dev" <- I guess its normal behavior.

And after I have done this, when I type in the browser "dev.domain.co.za" I end up with the default cgi page and I still get directed to the live site, and if I type the IP address of the development site I can see the new development site, how do I fix this sub domain error?

:confused:
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello :)

The "A" record should not be necessary if you have created a separate cPanel account for the subdomain. Instead, a DNS Zone for the subdomain should already exist on it's own. Is that not the case?

Thank you.
 

markuswest

Active Member
Oct 21, 2013
30
0
6
cPanel Access Level
Root Administrator
Hi,

Yes, there is a DNS zone for the new account, When I go to "Home » DNS Functions » Edit DNS Zone" I have 2 zones, "domain.co.za" & "dev.domain.co.za" but I am not sure how to configure this "dev." account to work when I type "dev.domain.co.za" into my browser (I think its better to have the name right for the developers when they access the site instead of a IP)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
You will need to edit the zone for the primary domain name and ensure any "A" records for "dev" are removed. The separate DNS zone for the subdomain already handles the DNS for it. Assuming this domain name uses name servers pointed to this server, the subdomain should load the correct content in the web browser.

Thank you.
 

markuswest

Active Member
Oct 21, 2013
30
0
6
cPanel Access Level
Root Administrator
Hi,

Ok, I removed the "dev." "A" records from the primary domain name under "Home » DNS Functions » Edit DNS Zone" but I have noticed the name servers on the top of the list (please look in the attachments or below) is different from each other, do you think that could be the problem for the dev.domain.co.za site not to work in my browsers?

I wonder if I should actually register my domain (dev.domain.co.za) at a registrar to work in South Africa that would be /http://co.za/ ?

I know the propagation would take 24-48 hours to take effect, but after I have created the account my browser didn't pick up the website therefore I thought to add the "A" record.

domain.co.za
beadsforyou.co.za.jpg

dev.domain.co.za
dev.beadsforyou.co.za.png
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
I don't believe you can register a subdomain at a domain registrar (there may be different standards for the .co.za tld). Do those name servers all point to IP addresses added to your cPanel server? Or, are they name servers that handle the DNS at the domain registrar itself?

Thank you.
 

markuswest

Active Member
Oct 21, 2013
30
0
6
cPanel Access Level
Root Administrator
Hi,

Do those name servers all point to IP addresses added to your cPanel server?
I am not sure if I understand you correctly, I think no, when I use the WHOIS tool from .co.za I see the name servers for "domain.co.za" is:

"ns.dns1.co.za" & "ns.dns2.co.za" & "ns.otherdns.net" & "ns.otherdns.com"

And that name servers is in the "Edit DNS Zone" of the dev.beadsforyou.co.za account, could this be a problem or do I miss you completely?

/http://co.za/cgi-bin/whois.sh?Domain=beadsforyou&Enter=Enter

Or, are they name servers that handle the DNS at the domain registrar itself?
I don't know...
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
If you are using your registrar's name servers, then you must manually add the "A" record at your domain registrar. If the DNS is controlled there, then no DNS you configure on your cPanel server will matter.

Thank you.
 

markuswest

Active Member
Oct 21, 2013
30
0
6
cPanel Access Level
Root Administrator
Hi,

So my Web Host helped me a little bit, what they did is on the account with the primary domain under "Home » DNS Functions » Edit DNS Zone" they added "dev" "A" and the IP of the second account (the new website) so then I saw the URL worked in 2 ways:

http://www.dev.domain.co.za &
http://dev.domain.co.za/index.php

both works, now when I type: "dev.domain.co.za" I end up with this:

dev.domain.co.za/cgi-sys/defaultwebpage.cgi

How do I fix this one, so that I don't see the default web page and get directed to the website?
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
You will need to have them add an additional "A" record for the www prefix of the subdomain.

Thank you.
 

markuswest

Active Member
Oct 21, 2013
30
0
6
cPanel Access Level
Root Administrator
Hi,

On my primary domain, under "Home » DNS Functions » Edit DNS Zone" I have added a new "A" record as "www.dev" with the IP of the development site (secondary domain) right now the URL is working perfect, just want to know if its legal in terms of the DNS record?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Yes, it's fine to use an "A" record pointing to an IP address for a subomain.

Thank you.