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?

  • 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, 2012 at 16:30
  • @Su, Can you suggest a better way to accomplish what OP is asking about though? Apr 24, 2012 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, 2012 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, 2012 at 20:21
  • How about scenario where wrong sitemap file was submitted to google via GWT by mistake? Web-site owner realizes his mistake but he doesn't have the old sitemap file anymore (and might not know how to create one) and the new sitemap already indexed by google and "wrong" links are showing up in search results? Not so hard to imagine this happening in real life, is it? Apr 25, 2012 at 0:15

3 Answers 3


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"

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.


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)

  • Thanks, I need to done both two or either of them?
    – larryzhao
    Apr 17, 2012 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, 2012 at 7:20
  • Whoever downvoted this, care to explain? Apr 24, 2012 at 16:39
  • 1
    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, 2012 at 20:24
  • So, how would you accomplish removing the sitemap from google's search results without preventing google from accessing that file? Apr 24, 2012 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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