Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Google is indexing top level domain content as though it belongs on subdomains and I want to disable this.

My site has wildcards enabled and we also have two subdomains with unique content. The first subdomain serves as a blog, the second one has only one page. Both have backlinks. Google has indexed content from the main site under the subdomains as well.

Let's say that we have a page at example.com/page.html . The same page has also been indexed as subdomain.example.com/page.html as well and sometimes ranks better than the one located at the main site.

The thing is that we never placed this content at the subdomain. I've thought about adding canonical tags at the subdomains to help with the duplicate content issue.

How can I stop Google from indexing those pages? I don't even know how Google found those, since we never placed them at the subdomains.

share|improve this question

migrated from stackoverflow.com May 28 '12 at 8:42

This question came from our site for professional and enthusiast programmers.

    
If you sign up for Google Webmaster Tools you'll be able to manage many details of how Google indexes your site(s). –  Filburt May 9 '12 at 9:21

3 Answers 3

You can stop the google spider robots from searching through certain pages and indexing them with a robots.txt file or meta robots tag

share|improve this answer
1  
thx for your answer..the point is that I want robots to index all my content from main site and the other 2 subdomains. The problem is that it found content under the subdomains that was not placed there by me... –  Christie Angelwitch May 9 '12 at 10:06

This has happened to me to in the past month. I think the latest google update changed the way they regard geotargeting redirection. I suggest you check your logs and see if requests to your main domain are redirected to the subdomain in larger quantities than before.

share|improve this answer

Wildcard subdomains are more trouble than they are worth. I'd suggest turning that off if possible and setting up the subdomains you require manually.

Failing that, your best solution would be to do a 301 redirect from any wildcard subdomain back to the main domain. Since the wildcards would be reading from the same directory as the main domain, this should be a simple matter of an .htaccess file that redirects if the requested URL does not start with the main domain or your specific subdomains.

If that is not possible, then a canonical tag would be effective as well. You should also make sure your internal links point to the main domain, ie if a user enters the site at sub.example.com/page.html, a next page link would for example point to example.com/page2.html.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.