Add-on Domain Document Root


Guy Scharf
 Share

Recommended Posts

I have an add-on domain for another domain name. Originally, both the primary and secondary domains pointed to the same data. I am slowly teasing apart the contents of the two domains to make them completely separate (mail is still combined and will probably remain combined).

By default, cpanel suggests public_html/secondary.com as the document root when creating addon domain secondary.com. This means that the root directory is a subdomain of the primary domain, and anyone with access to the primary domain has access to the secondary domain as well. And I think it means that search engine indexing of the two domains is not completely separate.

Am I correct in understanding that:

  1. If I set the add-on document root to /secondary, then somone accessing the primary domain cannot access files in the add-on domain?

  2. secondary.com would resolve to /home/hostingaccount/secondary so anyone with access to the add-on domain would not have access to the primary?

  3. I could put a robots.txt file in /secondary and it would control search engine indexing of the secondary domain without any reference to the primary? Similarly, indexing of the primary would not include anything of the secondary?

My goal is to have the add-on domain be separate and distinct from the primary (except as I might include explicit html links). (Use of both primary and add-on domains is minimal so account resource limits are not an issue.) Is changing the document root the best way to do this?

What other pros and cons are there to placing the add-on domain in a directory of its own instead of a subdirectory of public_html?

Thanks!

Link to comment
Share on other sites

I don't think the document root is going to mess with your search engine rankings, and someone with access for cPanel would always have access to your secondary domain since there wouldn't be separate cPanel accounts.

*HawkHost staff, please correct me if i'm wrong in this matter*

Link to comment
Share on other sites

1) The content from your addon domains and primary domain would be separate. cPanel adds a DNS entry/subdomain for each addon domain, but keeps the content separate. For example, say you're using website.com as your primary. You add nerfgunsareawesome.com as an addon domain. Even if someone visits the subdomain created (nerfgunsareawesome.website.com) it'll still load the content from your addon domain.

2) Same answer as number one, if you reach the addon domain you wouldn't know there was a primary domain to access to begin with.

3) To the best of my knowledge, and if you absolutely need a concrete answer here I can get one from someone more "in the know" than myself, any crawlers/search engines will index the sites as if they were their own, and does not care if they're primary domains or addon domains.

As for pros and cons, offhand I'm not really aware of any by modifying the document root of your addon domains. I have seen some accounts that place all their addon domains in their /home/username directory, keeping them outside of public_html and using software (WPMU, I believe, and others I'm sure) to make those sites web-accessible.

Hopefully what I said makes sense + provides the answers you were looking for. If not I'd be happy to provide any more details / pull in some more of our technical staff.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share