Skip to main content

Addon domain shows as subdomain

Comments

17 comments

  • Infopro
    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.
    0
  • Kailash1
    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.
    0
  • jim52c
    The docs may be of some use to you:
    0
  • jim52c
    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.

    It is mapped to the server as I was instructed to by the host, plus ip address change. Thanks for responding.
    0
  • Infopro
    Am I correct?

    Yes, and this is mentioned in those docs I linked you to. :)
    0
  • jim52c
    Yes, and this is mentioned in those docs I linked you to. :)

    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.
    0
  • Infopro
    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: Modify Addon Domain Modify the document root for an addon domain To modify the document root for an addon domain, perform the following steps: Click the edit icon next to the addon domain that you wish to manage. Enter the new file path to the addon domain's document root in the available text box. Click Change.
    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
    0
  • jim52c
    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

    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.
    0
  • Infopro
    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..
    0
  • jim52c
    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..

    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.
    0
  • Infopro
    Happy to help. You can check your current DNS using a site like intodns.com for example. GL!
    0
  • jim52c
    Happy to help. You can check your current DNS using a site like intodns.com for example. GL!

    Before I try your suggestion later today. Does it affect things because we are on shared hosting?
    0
  • Infopro
    Like what exactly?
    0
  • jim52c
    Like what exactly?

    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
    0
  • Infopro
    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
    0
  • jim52c
    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

    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?
    0
  • Infopro
    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...
    I have noticed that the main domain has different nameserver setting

    That is your issue, Jim. Fix it.
    0

Please sign in to leave a comment.