Speaking of Addons, I have some noob questions that the docs aren't clear about

GoWilkes

Well-Known Member
Sep 26, 2006
558
21
168
cPanel Access Level
Root Administrator
I figure it will be easier to ask than to poke around and try things myself, then make a mess that takes forever to clean up :-|

I have about 200 domains for local restaurants. This is a free service I offer (with Adsense on them, so it still generates revenue), which means that they all have the same general format.

Currently, I have them all parked on a single domain. Then /home/restaurants/www/index.php selects from a database table based on the domain name where they have specified simple things like background colors, logo, pics, menu, and verbiage.

Am I correct that I can do the same thing with an Addon, but I could set up a subdirectory in my main account (eg, /home/main_domain/www/addon-restaurants/ ) instead of using the other domain and account like I'm using now?

I also see that when I create an Addon, it creates a subdomain. Does this mean that I would have to have 200 separate subdomains (one for each restaurant)? Or can I have a single subdomain (like "addon-restaurants") that's used for each domain?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
591
188
343
cPanel Access Level
DataCenter Provider
What you have said is basically correct. The folder that gets created depends on how your host hat things configured. It would be /home/main/public_html/add_on or it could be /home/add_on.

Yes, cPanel creates a sub-domain for every add-on domain. Nothing you can really do about that, it's just what cPanel does.
 
  • Like
Reactions: GoWilkes

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,357
546
273
cPanel Access Level
Root Administrator
The subdomain is how the addon gets handled in Apache so the webserver knows where to look for the content. "Addon" domains are just special trickery we use in Apache to make a subdomain appear like it is a unique site. Everything you said sounds correct to me.
 
  • Like
Reactions: GoWilkes

GoWilkes

Well-Known Member
Sep 26, 2006
558
21
168
cPanel Access Level
Root Administrator
Thanks! I wish there was a way to do it without all the subdomains, that's going to be a HUGE DNS file! But I think it will be easier to manage in the long run, so I guess I'll survive :cool:

Merry Christmas / Happy Holidays!
 
  • Like
Reactions: cPRex