I’m looking to host a site that will be accessed through a subdomain (mysite.mainsite.com) of another site (mainsite.com). I have set the main domain for my shared hosting account as mainsite.com and I’m about to set an A-record for mysite.mainsite.com to point to the IP of my server and add mysite.mainsite.com as a subdomain in cPanel.

The mainsite.com will however never be pointed to my server, so it somehow feels like I'm "cheating". My question is simply, should this work or am I missing something?


From the viewpoint of the DNS system, it is absolutely ok. A hostname can contain a "." without any problem.

This leads to the difference between domains and zones. If you have a host named a.b.example.com, which is registered by an a.b record in your zone example.com, you will have a b.example.com domain too, but only the a.b.example.com and example.com zones.

Of course, the glue records in your parent nameservers need to be set up accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.