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 domain shows as subdomain

Discussion in 'Bind / DNS / Nameserver Issues' started by jim52c, Jun 9, 2016.

  1. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi all.

    I have added a Addon domain to my normal account.

    I was under the impression that this could be accessed via the browser address bar as "new_addondomain.co.uk" instead of "new_addondomain.current_domain.co.uk

    Could someone please point me in the right direction to solve my problem as I have searched around and cannot find a solution. I understand it could be done by the use of an htaccess file.

    Are there any entries in the Cpanel Zone Editor that I can delete to solve it or will doing such as this cause the Addon not to function at all.

    Thanks in advance, any help gratefully appreciated.

    Jim
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The docs may be of some use to you:
    Addon Domains - Documentation - cPanel Documentation

    You want to create the addon domain, outside public_html/. You should be able to modify the Addon Domain you created and change its doc root in the same area you created it.
     
  3. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Addon domain can be accessed directly (i.e. addondomain.com). You just need make sure that your addon domain is pointing to your server. Addon domain is mapped to subdomain of the main domain but it can be accessed directly using domain name.
     
  4. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for your reply.

    Created the Addon in Cpanel and it placed the www folder inside the public_html folder.

    So you say I should be able to login to cpanel again and go to "Manage Addon" and change the path to the root directory.

    Am I correct?
     
  5. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    It is mapped to the server as I was instructed to by the host, plus ip address change.

    Thanks for responding.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes, and this is mentioned in those docs I linked you to. :)
     
  7. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thank you very much, I will fully read the docs and then try as you suggest.

    I have not read the docs fully yet but I will find time.
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    My reply above is probably more than enough to get you going. Here's the entire section about modifying Doc root for an Addon Domain:


    All you really want to do with that path edit is, remove public_html/ from the path line.
    So, original path is:
    public_html/example.com
    Change it to

    example.com

    and save. The new doc root should be created in:

    yourcpaneluser/example.com
     
  9. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1

    Ok.

    I have changed the doc route but the only way I can view a page is by:-

    www.addon.mainsite.co.uk

    I notice in cpanel that there is Addon and Subdomain setting where both are the same, the subdomain details shows the edit path I have done for the Addon.

    There are "Delete" buttons for the Subdomain settings but I reckon if I delete those it will also remove the "Addon"

    I am getting confused now.
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Assuming the domain's DNS is already propagated to your server, and you have nothing in that Addon domain yet, you might consider removing the Addon Domain properly in the same area you created it. When you do, the directory the system created for it, will remain. Manually remove it.

    Next, go to cPanel > Domains > Addon Domains and re-add the Addon Domain and be sure to remove public_html/ from the doc path before creating it. When you do, example.com should, if DNS is up-dated already, work for you properly.

    addon.example.com doesn't exist in that scenario and you wouldn't be able to open it in your browser..
     
  11. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1

    Thank you for all the help.

    The DNS should be updated by now, first started doing this 2 weeks ago.

    I will have to do that tomorrow because I have to go out shortly and will not be back until late.
     
  12. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Happy to help. You can check your current DNS using a site like intodns.com for example.

    GL!
     
  13. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Before I try your suggestion later today.

    Does it affect things because we are on shared hosting?
     
  14. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Like what exactly?
     
  15. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Good morning.

    I removed the Addon, then added it below the public_html folder but can still only access the Addon domain as a subfolder ie:

    Addon.maindomain.co.uk
     
  16. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    After you removed the addon domain, did you manually remove the directory?

    If you had, there could be no addon.maindomain.co.uk when you recreated the addon.

    Once you recreated the addon again, outside public_html/ if the DNS is updated properly, it would only open in your browser at example.com
     
  17. jim52c

    jim52c Member

    Joined:
    Jul 3, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Yes. after deleting the Addon from within Cpanel I then used my ftp software and manually removed the directory.

    I have the the created folder under the private_html directoy but no a addon.domain was created as you say.

    I have noticed that the main domain has different nameserver setting to what the domain I am adding as an Addon, my host told me that this didn't matter, could tis be something to do with my problem?
     
  18. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes.

    Your main domain, and your addon domain you're trying to add, should be using the same nameservers.

    When you created the addon the first time, it created a directory of the same name, here: /cPanelUser/public_html/addon
    If you deleted the directory addon/ it would not open in your browser as you mention. It can't it doesn't exist.

    There is no directory on your cPanel account by default, named private_html/ if you have one, you created or your Hosting Provider created it. I can't help you with that as I've got no clue where its located.

    Following my suggestion earlier, when creating a new addon domain and removing public_html/ from the path for the new addon domain, the new addon domain would be located here, only: /cPanelUser/addon
    Addon of course, being the actual name of the addon, not the word, addon.

    Once the nameservers are corrected at your Domain Name Registrar, and both domains point to the proper nameservers, you should be able to create the addon domain as mentioned easy enough.

    This is post #18 for this issue...
    That is your issue, Jim. Fix it.
     
Loading...

Share This Page