Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Sub-domain, add-on domain oddities

Discussion in 'General Discussion' started by meeven, Mar 19, 2009.

  1. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    132
    Likes Received:
    1
    Trophy Points:
    168
    Just trying to sort out/understand a few issues relating to sub-domains and add-on domains:
    • Is there a way to prevent a sub-domain http://[B]sub[/B].example.com from also being accessible at its internally redirected path http://example.com/[B]sub[/B] ?
    • Why does cPanel create an add-on domain as a sub-domain of the primary domain? That is, if I add http://[B]example2.com[/B] as an add-on domain for example.com, it's actually set up as http://[B]example2[/B].example.com
    • If I delete the sub-domain entry above for the add-on domain in the cPanel sub-domains section, will the add-on domain still work?
    • Is there a way to ensure that an add-on domain's (http://example2.com) content is NOT accessible at its sub-domain (http://example2.example.com)?
    • Is it possible to create a sub-domain for an add-on domain? Techinically, this would be http://[B]sub.example2[/B].example.com. The sub-domain entry form defaults to adding the sub-domain paths even for an add-on domain as public_html/sub instead of public_html/example2.com/sub. When I go ahead and choose the latter path, I don't get any cPanel errors, but I just wonder if this will behave well if any content was actually put on the sub-domain of the add-on domain. I mean, will there be any problems with links, .htaccess files etc?
    I will be very thankful indeed for any assistance about these issues/questions.
     
    #1 meeven, Mar 19, 2009
    Last edited: Mar 19, 2009
  2. JPC-Stefan

    JPC-Stefan Member

    Joined:
    Oct 29, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    51
    Hi

    May be the following answers help you regarding sub-domain and add-on domain issues.

    You can disable the access of subdomains URL like "http://example.com/sub" by redirecting it to either "http://sub.example.com" or to any other error page.

    cPanel handle Add-on domains in this way. A add-on domain is equivalent to subdomain + Parked domain.

    Sub-domain cannot be deleted having add-on domain related to it. First you have to remove add-on domain and then sub-domain.

    Again this can be done using redirects.

    A subdomain for add-on domain can be created and you can set the path of this sub-domain to either "public_html/sub" or "public_html/example2.com/sub" and there will be no problem in both cases. However if example2.com is your add-on domain and your are creating sub-domain sub.example2.com, then it will be only accessible by "sub.example2.com" and not from "sub.example2.example.com"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    132
    Likes Received:
    1
    Trophy Points:
    168
    Thanks for your answers.

    This doesn't work. Instead, you get the following message:
    So, it seems sub-domains urls will always be accessible at both http://sub.example.com and http://www.example.com/sub

    Thankfully, cPanel allows the sub-domain created for an add-on domain (http://example2.example.com) to be easily redirected to http://example2.com
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice