Big Dan
EQ Forum Moderator
By default when you create an addon domain in cPanel it places the sites files under /home/user/public_html/domain.com.
This isn't a problem when your serving static sites. However /home/user/public_html is the path for serving the primary domain. If you're running something like Wordpress with 'pretty permalinks' on the primary domain mod_rewrite in the parent directory (public_html) messes with subfolders (your secondary domain) and results in errors. Most common is you will see the secondary domain's URLs rewritten to primarydomain.com/secondarydomain.com/path/to/file.html which results in a 500 internal server error.
The easiest fix is to define the addon domain's path as /home/user/domain.com. This is easily done via the addon domains screen, simply remove public_html/ from the path.
I wrestled with this quite a bit in my early days of multi-siting on one cPanel account. Even going so far as to buy a domain to use as nothing more than my primary domain (a place holder). At the time none of the hosts seemed to know what was going on. Later on as a played more and more with Apache I figured out the problem on my own and have been using the /home/domain.com solution with no issues for quite a while.
I hope this explanation and tutorial saves someone all the frustration I had.
This isn't a problem when your serving static sites. However /home/user/public_html is the path for serving the primary domain. If you're running something like Wordpress with 'pretty permalinks' on the primary domain mod_rewrite in the parent directory (public_html) messes with subfolders (your secondary domain) and results in errors. Most common is you will see the secondary domain's URLs rewritten to primarydomain.com/secondarydomain.com/path/to/file.html which results in a 500 internal server error.
The easiest fix is to define the addon domain's path as /home/user/domain.com. This is easily done via the addon domains screen, simply remove public_html/ from the path.
I wrestled with this quite a bit in my early days of multi-siting on one cPanel account. Even going so far as to buy a domain to use as nothing more than my primary domain (a place holder). At the time none of the hosts seemed to know what was going on. Later on as a played more and more with Apache I figured out the problem on my own and have been using the /home/domain.com solution with no issues for quite a while.
I hope this explanation and tutorial saves someone all the frustration I had.
Last edited: