Hi all, Ok i have a primary domain. I have folders on the domain with different websites in them, i have other domains pointing to these folders. When searching in google it shows the www.primarydomain.com/FOLDER. Rather than www.subdomain.com How can i rectify this? Thanks in advance. Adrian.
you have to make sure that nobody including bots can browse subdomain pages www.primarydomain.com/FOLDER. to do that you can redirect from that folder. in linux servers you could easily accomplish that using .htaccess rule.
I think you mistakenly treat that case as subdomain, it must be multiple domains on a server, and saying that folder was under the primary domain, it might be possible for Google bots to index it too. There are other issues that even more worse on this kind of case around where a server with multiple domains and database, a content belongs to site1 was indexed in site2 which should not exist.
Right ok i sort of understand you, So if i had mainsite.com and a folder inside called "anothersite" And a sub domain called subdomain.com with web forwarding to the folder "anothersite" How would i set the htaccess to stop the other folders on mainsite.com from showing? I have 6 domain names all using web forwarding to point to different folders on the main hosting.
Actually that's a bit of a mess to sort out. You'll have to use a Rewrite condition based on %{HTTP_REFERER}.