I have an unlimited cPanel shared hosting account, which I stopped using since I moved on to VPS. I can still access the account, and kept the files undeleted as a backup. Since I have addons enabled, I though I can allow some other people to host their sites on my account (yes, I can run a shared hosting service using my VPS, but I try to keep it isolated and lightweight).

But the problem is, when I tried to access the cPanel of one of my existing addon domains, I was able to access the document root of my main site. This means if I setup an addon domain for somebody else, they might be able to access the main root also. How to prevent this from happening?

1 Answer 1


...they might be able to access the main root also

Yes, that is how cPanel's Addon domains work. They are simply additional (ie. "add-on") domains on the main account. You can't restrict access.

In order to restrict access, you would need to create another "account". eg. As a "reseller".

Related question:
with PHP: How to restrict access from one Addon domain to another?

  • I had issues with subdomains and certificate, so the hosting company told me to use addon domains, for which I had to pay extra. The certificate now works, but I have this problem. Why cant I put a rule in htaccess which does a redirect from maindomain/addonfolder to addondomain. I tried but it doesn work for me. Dec 20, 2021 at 13:58
  • @RohitGupta Yes, you can implement a redirect in .htaccess to do as you require. But that is a very different requirement than stated in this question. If you have another question regarding a redirect then please ask another question.
    – MrWhite
    Dec 20, 2021 at 15:49
  • @RohitGupta I see you have... webmasters.stackexchange.com/questions/137946/…
    – MrWhite
    Dec 20, 2021 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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