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.

Addon domains differing only in tld/extension

Discussion in 'General Discussion' started by cPdans, Dec 21, 2011.

  1. cPdans

    cPdans Member
    Staff Member

    Joined:
    Sep 6, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello Everyone,

    I've noticed some confusion regarding add-on domains. I was assisting a customer this morning and he wanted to add some add-on domains: domain.net and domain.biz. These were for differing purposes and needed to be directed to different directories. The general misconception is that this isn't possible because they will both generate subdomains that are the same: domain.maindomain.tld. This is not the case if you use different Subdomain/FTP Usernames. This field is autopopulated by the first portion of "New Domain Name". So there is a confusion about this. So if you have domain.net and domain.biz and set the usernames to john and jack, the subdomains would be john.maindomain.tld and jack.maindomain.tld respectively. I have seen this mentioned at least a couple times as a reason for changing the way our add-on domain system works and I just wanted to point out that there IS a way to make this work. Hopefully, this alleviates someone's troubles in the future.

    Thank you for choosing cPanel.
     
  2. ms308680

    ms308680 Registered

    Joined:
    Feb 5, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    that is not quite the main issue, the main issue is the creation of subdomains for add-on domains in the first place. There is no reason for this. A really quick work around for this is if they cannot get to the subdomain, so you don't have to worry about comtamination of the search engine. So how does everything on the web know where to go? DNS

    use the advanced dns editor and delete the subdomain entries, while you cannot delete the subdomains from the sub-domain manager, you can delete the subdomains from the dns manager. so to the world that subdomain does not exist.

    Just be aware that if you ever have to reset your dns zone back to origional, then it will restore these enteries.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  4. tdave888

    tdave888 Registered

    Joined:
    Feb 15, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Err, that might solve half of the problem. I tried deleting the subdomain's dns record using the simple dns editor in cpanel but page still opens up, maybe dns refresh issue. Time will reveal.

    The other half of the problem is when
    hosting-account's main domain: /penisenlargement.com
    add-on: /nurseryrhymes.com
    then google might still be indexing /penisenlargement.com/nurseryrhymes/humptydumpty.html
    CMIIW

    Anymore tricks to prevent the above? Thanks.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Yes, you don't have to have addon and subdomains in public_html folder for the document root. If your hosting provider allows subdomains and addon domains outside of public_html, when you fill out the folder for the addon or subdomain, remove the public_html portion. This will place it into /home/username/subdomainfolder path instead. Since the folder is outside public_html, it cannot be reached using http://maindomain.com/subdomainfolder any longer.
     
  6. mstech

    mstech Registered

    Joined:
    Mar 1, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I'm having exactly the same problem as a new cPanel user on a hosting package (adding add-on domains, creates a unwanted sub-domain)

    However the above workaround from cPanelTristan doesn't work with my host (using cPanel 11), moving the add-on domain path higher up the tree, from the account root (not in public_html, but above this), has no effect, the subdomain is still added, and is still fully accessible from http://add-on-domain/maindomain
     
  7. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    So my solution is this, which is an annoying workaround.

    First, I create the add-on domain, and rather than put the files in the home/username/public_html/addondomain.com folder, I put them in the home/username/addondomain.com folder.

    Yes, this still creates the subdomain of addondomain.maindomain.com. So I then go over to the "subdomains" section of cPanel, and in the section where the subdomain is listed, click the "manage Redirection" button and create a redirection so that addondomain.maindomain.com redirects to addondomain.com

    This seems to be working for me for now.
     
Loading...

Share This Page