Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am an amateur to SEO. I have a new site recently and submitted the site map to GWT. But after several weeks. I found when I search my domain in google. The site map also appears to be one of the links in the search result.

How could I prevent if from showing up in the search result?

share|improve this question

migrated from stackoverflow.com Apr 24 '12 at 3:22

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

Who cares? There's nothing in the sitemap that anybody shouldn't see. Why do you want to do this? The result with the accepted answer from @BluesRockAddict is that Google can't even access it(which makes no sense if you submitted it to them), not just that it doesn't show in results. – Su' Apr 24 '12 at 16:30
@Su, Can you suggest a better way to accomplish what OP is asking about though? – BluesRockAddict Apr 24 '12 at 16:38
@Su' I also have some of the concern that the approach BluesRockAddict provided will result in that way. I haven't fully thought it over, so I haven't done anything yet. It is not so important, because it will mostly never show up front in any organic search. But I just think it look quite odd that the site map is contained in the result sometime. – larryzhao Apr 24 '12 at 18:53
I can't suggest anything better, because I don't think it should be done at all unless more information is provided that defines an actual problem. This is a public file, and it's correct that it shows up in search, assuming it works for the terms submitted. – Su' Apr 24 '12 at 20:21
Thanks @Su' I think you are correct. – larryzhao Apr 24 '12 at 20:45
up vote 1 down vote accepted

Stop Google indexing sitemap using HTACCESS

In my honest opinion the best method stopping Google indexing sitemaps by using the htaccess since technically robots.txt is a denying access while noinded is readable yet won't index.

<IfModule mod_rewrite.c>
    <Files sitemap.xml>
       Header set X-Robots-Tag "noindex"
share|improve this answer

Use no follow on sitemap or go to google webmaster tool click on Site configuration after that click on Sitemaps and after that Select the url and Delete Selected.

share|improve this answer

Two things:

  1. You should delete sitemap from your account using Webmaster Tools (Site configuration -> Sitemaps -> Select -> Delete Selected)

  2. You should change your robots.txt to prevent Google from accessing the sitemap file (i.e. some like Disallow: /sitemap.xml)

share|improve this answer
Thanks, I need to done both two or either of them? – larryzhao Apr 17 '12 at 6:13
If you want sitemap to eventually disappear from google's search results, you'd need to make changes to your robots.txt file. That would not prevent "bad" guys from indexing your sitemap though as their bots ignore the robots.txt anyway. If you're concerned about it, you should remove the actual sitemap.xml file from your server. Deleting it from GWT is optional (and mainly cosmetic). – BluesRockAddict Apr 17 '12 at 7:20
Whoever downvoted this, care to explain? – BluesRockAddict Apr 24 '12 at 16:39
The suggestion oversteps the question. If the sitemap was personally submitted, we can assume Google should have access to it; asker just wants it not in results(though I see nothing wrong with that). Blocking that access runs counter to the entire point of having a sitemap file. – Su' Apr 24 '12 at 20:24
So, how would you accomplish removing the sitemap from google's search results without preventing google from accessing that file? – BluesRockAddict Apr 24 '12 at 23:51

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.