Folders for main domain and addon domains

Avatar
  • Answered
I'm confused about how add-on domains work.

I've got multiple websites and want to move them over one at a time. Lets call them domainMain.com and domainNumber2.com.

My main account is domainMain.com and it now works fine. I put the relevant files in public_html and they show up when I go to domainMain.com.

But if I create an add-on domain for domainNumber2.com it creates a folder inside public_html called domainNumber2.com. Now if I go to domainMain.com/domainNumber2.com/ I see the new second domain. This is not desired.

Also if I move say 5 more domains over, I have to dig through all of the domainMain.com Wordpress files and look for specific folders named after my secondary domains, rather than having a clean location that lists folders for each domain only.

Am I missing something or is this the way it is suppose to work?

I expected and would kind of like to have a file structure more like this:

root/
domainMain.com/
public_html/
domainNumber2.com/
public_html/
domainNumber3.com/
public_html/
etc….
Avatar
CNick
Hi ron_davis, I'm sorry you're having trouble with the document root structure for your main domain and your Addon domains. The default behavior on the server is that public_html is the document root. Your main domain's files reside just inside public_html, with Addon domains each having a subfolder inside public_html. First, to clarify how you view your Addon domain sites. While yes you can view those sites by going to domainMain.com/domainNumber2.com, you do not have to do that to see your Addon domain. Simply go to domainNumber2.com in your browser and you will see your Addon domain site. If you would prefer to have your main domain in a subfolder of public_html to keep things organized, you can do this in a couple of ways. Because WordPress allows you to run it from a subfolder, you can simply set up your main domain's WordPress installation to run from a subfolder. Alternatively, you can request a document root change for your main domain and place your WordPress files in that new document root folder for your main domain. Please feel free to either update your question or add a comment below with which option you prefer. I'll be happy advise how to make either one of these changes. Regards, Christi N.