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.

Is it impossible to park a domain through user's cPanel?

Discussion in 'General Discussion' started by meeven, Jul 22, 2007.

  1. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Each time I try to park a domain (say, test.example.com) on www.example.com through the example.com user's cpanel, I get the following error:
    However, I can easily park a full domain name (www.example2.com) using the same cPanel interface, but not something like test.example.com.

    So, do WHM and cPanel have different meanings for the term parked domains? I can easily park test.example.com on www.example.com through the WHM interface for parked domains, but not through the acutal cPanel for the domain.

    Thanks.
     
  2. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    My hosting provider raised a ticket with cPanel about this and got the following response:

    Another one of cPanel's quirks, I suppose? Especially when the same term, 'Parked domains' is used to mean different things in cPanel and WHM? At least, cPanel could carry an error message saying that only full domain names can be parked through cPanel and that WHM needs to be used for sub-domains?
     
  3. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Not really a quirk in my book. test.domain.com is a subdomain - it isn't a domain.

    Create a subdomain in Cpanel - you can serve a website, give it a separate FTP login/password, have email addresses for it, etc.

    Mike
     
  4. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    When parsing a domain name remember this:

    third.second.1st

    third = machine name or sometimes "host" name
    second = domain or second level domain name
    1st = top level domain name or TLD

    So you cant "park a domain" that is a machine name, its a "subdomain" or a server/host name on a domain name.

    In some countries the second level is actually a hierarchy of the TLD, like "co.uk"
     
  5. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Thank you, mtindor and nyjimbo.

    The reason I am trying to park a domain the way I am, is to point it to the same document root. I have a CMS code base stored in public_html of that domain and by parking a domain, I can use that single code base to run multiple independent sites off that code base. I don't have to store the code base again in the subdomain.

    Of course, I can also do this by creating test.example.com as a subdomain from the cpanel. And, although it adds a directory called 'test' under the main domain's public_html directory, I don't really have to store the code base again to run an independent site off it, at least not for my CMS. My confusion was more with why WHM allows parking a sub-domain on top of any domain (without physically creating the sub-domain directory) while cPanel doesn't.

    Again, I am able to serve a website, give it a separate FTP login (hmm...haven't checked this one) and have email addresses even for domains parked through WHM as sub-domains, without physically creating the sub-domains through the subdomain manager.

    This is why I am a bit :confused:
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    test.example.com is as much a domain name as example.com, and they are both subdomains (example is a subdomain of com which is a subdomain of .).

    That said, there appears to be something that prevents people parking domain names that contain elements of the account's primary domain.

    With a test account assigned the domain of 'abc.com', cPanel refused to park the following domains:

    def.abc.com
    george.abc.com

    For each, cPanel returned the following error message:
    (substitute george for def when attempting to park george).

    However, cPanel had no problem parking totally invalid domains:

    truck.car.van
    griddle.me.waffle

    (all tests performed with the following tweak setting enabled: Allow Creation of Parked/Addon Domains that are not registered).

    For thoroughness, I also tested creating addon domains. The same issue occurred with def.abc.com and george.abc.com The same error message was produced by cPanel.

    Testing occurred on cPanel 11.6.1-C15328
     
  7. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Assuming you do not want to have mail for each specific subdomain and only want to use them for a website that pulls from the document root, it sounds like you might want to just add records to the domain.com DNS zone (if you are in control over the machine) or have your web host add the individual records to the domain.com DNS zone.

    For instance, let's say I want to have 5 sites (a., b., c., d., e.) that all use the same document root, that of the primary domain.

    I would edit the zone file to add either "A" records or "CNAME" records for a, b., c., d., e. such as this (where xxx.xxx.xxx.xxx is the IP address that the main site uses):

    a.domain.com. IN A xxx.xxx.xxx.xxx
    b.domain.com. IN A xxx.xxx.xxx.xxx
    c.domain.com. IN A xxx.xxx.xxx.xxx
    d.domain.com. IN A xxx.xxx.xxx.xxx
    e.domain.com. IN A xxx.xxx.xxx.xxx

    OR

    a.domain.com. IN CNAME www.domain.com.
    b.domain.com. IN CNAME www.domain.com.
    c.domain.com. IN CNAME www.domain.com.
    d.domain.com. IN CNAME www.domain.com.
    e.domain.com. IN CNAME www.domain.com.

    Then, if I visit www, a, b, c, d, or e it all pulls the same content.

    The next question is how do you plan on making them pull 'separate' content using the same CMS engine? Are you going to have it deliver different content based upon the host headers that the client browser feeds it?

    You can also add a DNS record such as this:

    *.domain.com. IN A xxx.xxx.xxx.xxx

    OR

    *.domain.com. IN CNAME www.domain.com.

    What the above record would do is say that ANYTHING.domain.com is to pull the content from the main site. - So if somebody just went and typed in wwX.domain.com accidentally, it would pull the main content, or if they just typed something_really_random.domain.com it would pull the content referenced by the *.domain.com CNAME record.

    A friend of mine uses that kind of record with mboffin.com - and each person who signs up for an account on his site automatically has their own blog section created, etc. - so if I sign up on his site as 'mtindor', then suddenly mtindor.mboffin.com is my own personal blogging area - using the same base code as the rest of registered user's blogs but with the ability for him to customize what I see (or for me to customize settings to make my template different) because he is using the host header information passed from the client's browser to tell his site what to deliver back to the client browser.

    NOTE: If you are the server webhost and you do make any changes to the DNS zone files in /var/named, always increment the serial # in he SOA record by at least one before you save it and do an 'rndc reload domain.com'

    Mike
     
  8. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I'll respectfully disagree with that. Cpanel is definitely capable of treating a subdomain exactly the same as a domain name, but from the standpoint of the DNS system there is technically a difference between test.example.com and example.com.

    Mike
     
Loading...

Share This Page