PDA

View Full Version : Google Indexing Errors



Costa Boy
01-14-2010, 08:20 AM
Has anyone else had this problem with Google indexing their sites?

You have a hosting plan that allows unlimited domains - you specify one main domain to start off with and when you buy more domains they get added as add-on domains/folders.

But Google and other search engines are meant to see that the different sites are well ... different sites!

But I have a situation where pages in a site I started later are being indexed under my initial main domain I started with - and of course these pages are not getting ranked.

I hope this makes sense and hope somebody can offer some useful advice. I have a xml sitemap and use Google webmaster tools and I have waited months for the indexing to sort itself out but no such luck.

mjtaylor
01-14-2010, 08:27 AM
Well, if I understand you correctly, you need to separate the domains to their own hosting.

wige
01-14-2010, 09:25 AM
To clarify and make sure I understand the situation, you have a primary domain, lets say mydomain.tld. You have a second domain, on the same hosting account, lets say secondary.tld. The content for secondary.tld can also be accessed through mydomain.tld/secondary/, and this is causing ranking issues for secondary.tld?

If that is the case, you should be able to solve the issue by adding a line to the .htaccess file that is in the root folder for your main domain, which will prevent Google or any other search engine from accessing the content.

RedirectMatch 404 /secondary/.*

Some might suggest using <Directory> and denying access to the folder, however, that approach will allow Google to still attempt to access the URLs in that folder. The line of code above will cause anything trying to access that folder to get a File Not Found message instead.

This method should work with most hosting accounts as long as you are allowed to create custom .htaccess files. This does not require any special modules to be enabled, and will work even if mod_rewrite is not available. However, it should be noted that some hosting companies may set up the virtual subdomains in a wierd way, which might cause errors when accessing the secondary domain, so make sure you test it after adding this code.