The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

subdomain bug

Discussion in 'General Discussion' started by maresen, Jan 4, 2013.

  1. maresen

    maresen Registered

    Joined:
    Jan 4, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,452
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    When creating the addon domain, for Document Root section of the setup screen, remove the path and add a . instead.

    Adding that "." means the addon directory is outside public_html in account root. That means none of this: whatever.maindomain.com

    Also make sure this setting is enabled in Tweak Settings:

    Prevent users from creating subdomains outside of their public_html directory. - cPanel Documentation

    I think that's what you seek.
     
  3. maresen

    maresen Registered

    Joined:
    Jan 4, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    thanks for the fast reply,


    can i do this as a normal "shared hosting plan user" ?

    i got a reply from a hoster few days ago about this subdomain problem, thats what they said:

     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    This is not a problem. It is by design. It is not a bug. The forum thread you referenced contains comments from users wishing they could create an addon domain without a subdomain, but it is explained in the thread that the subdomain is required.

    You are adding an addon domain. An addon domain is a special kind of subdomain that can be accessed both as a subdomain, and as a regular domain, but remember that it is a subdomain first.

    To use your example, if you add whatever.com as an addon domain to maindomain.com, you are going to get whatever.maindomain.com also, and there is no way to prevent this, because that is how addon domains first. Addon domains are subdomains.

    If you just want a domain alias that uses the same content as the main domain, use a parked domain instead. A parked domain is nothing more than a domain alias without its own document root. There is no way to create an addon domain without a subdomain, because the subdomain is the essential part of how an addon domain works.

    The following page in our documentation explains addon domains, and the differences between addon and parked domains:

    Addon Domains
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,452
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You cannot enable that setting in WHM, as an end user, no. But there's really nothing problematic with asking them to enable it. It's an added option some wish to use. Most do not bother changing it I don't think, but ask and find out.

    I've been running, hosting and managing websites for many years now. I have never had any problems with this:
    whatever.maindomain.com

    Contrary to what you read in that thread and many others like it on this forum and others about duplicate content etc.

    YMMV of course. :)
     
  6. maresen

    maresen Registered

    Joined:
    Jan 4, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    thanks, i will check it out :)
     
Loading...

Share This Page