Reputation: 2565
I have two websites:
Main Website www.WebsiteONE.com
Subdomain www.WebsiteTWO.com
They are both on the same hosting account. On the server, their files are stored as follows:
..for www.WebsiteONE.com the files are stored in folder public_html/
..for www.WebsiteTWO.com the files are stored in folder public_html/WebsiteTWO/
Now, i noticed that you can actually access WebsiteTWO by typing
www.WebsiteONE.com/WebsiteTWO/index.html (or any other file in the WebsiteTWO folder)
Also i noticed that google indexes files from WebsiteTWO as being part of the WebsiteONE
I don't want this to happen, is there anything i can do, maybe to the .htaccess file. Or maybe you know another way. The thing is that these sites are completely different and they have no connection with each other. Still Google indexes files from site TWO to site ONE.
Upvotes: 0
Views: 74
Reputation: 649
public_html is the document root for WebsiteONE.com, and anything that resides in that folder will be visible on WebsiteONE.com.
You've placed WebsiteTWO.com's document root inside public_html hence why it's visible on WebsiteONE.com.
To fix this simply create a new folder somewhere above (or as a sibling of) public_html:
/path/to/public_html -- all WebsiteONE.com files in here
/path/to/public_html_two -- all WebsiteTWO.com files in here
Upvotes: 1