Can I create sub domains if not using local DNS?

iambaz

Registered
Aug 29, 2016
2
0
1
UK
cPanel Access Level
Root Administrator
Hypothetically, if I have a domain 'example.com' which uses the domain registrar's DNS servers and has an A record pointing at my server's IP, can I still use cpanel on the server to create sub domains or must they be created at the registrar's control panel?
 

iambaz

Registered
Aug 29, 2016
2
0
1
UK
cPanel Access Level
Root Administrator
So what happens if I do set up a sub domain at the registrar? For example; I have a cpanel server at 1.1.1.1 and in Namecheap, I have a domain 'example.com' with the following settings:

A record : example.com. : 1.1.1.1
A record : subdomain : 2.2.2.2

In this case the FQDN 'subdomain.example.com' points to 2.2.2.2, and example.com points to my cpanel server at 1.1.1.1. So under these circumstances, if I added 'subdomain2' as a subdomain on my cpanel server, would both of the sub domains work?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
In this case the FQDN 'subdomain.example.com' points to 2.2.2.2, and example.com points to my cpanel server at 1.1.1.1. So under these circumstances, if I added 'subdomain2' as a subdomain on my cpanel server, would both of the sub domains work?
Hello,

Yes, as long as the IP address you use for the subdomain's "A" record matches the IP address assigned to the cPanel account it's added under.

Thank you.
 
  • Like
Reactions: iambaz