Addon domain shows as subdomain
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
-
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 -
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 -
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 -
Am I correct?
Yes, and this is mentioned in those docs I linked you to. :)0 -
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 -
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.com0 -
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 -
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 -
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 -
Happy to help. You can check your current DNS using a site like intodns.com for example. GL! 0 -
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 -
Like what exactly? 0 -
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.uk0 -
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 -
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 -
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.
Comments
17 comments