How To Prevent Google From Indexing Sitemap

How To Prevent Google From Indexing Sitemap ?

Have you ever thought about the sitemap of your website? Is Google indexing sitemap.xml of your website including your posts. If you want to stop indexing sitemap then how will you do it?

Have you ever thought to see the sitemap of your website? No, then you should and if yes, then have you ever searched it in Google?

No, then you should and if yes, then have you ever searched it in Google? How to prevent Google from indexing sitemap? Is it good or bad to stop indexing sitemap? You can see the sitemap of your website by simply writing sitemap of ‘yoursite.com’.

  If the sitemap of your website is appearing in Google search then it is easy to open it just by clicking at first URL you see. There is a greater possibility that most of the people will not able to understand the configuration of sitemap because it is not a simple file which can be understood by a non-technical person.

There is a greater possibility that most of the people will not able to understand the configuration of sitemap because it is not a simple file which can be understood by a non-technical person.

Before doing so you need to know what is sitemap? If you want to see it yourself then directly write ‘yoursite.com/sitemap.xml‘ and the sitemap.xml file will appear in front of you.

What Is Sitemap ?

Sitemap is a kind of file named sitemap.xml in which all the URLs of pages, images, videos of a website will be arranged in an appropriate manner. It is an easy way to find navigation.

It is the main key to tell search engines about every single URL consisting your website. It is arranged in an order according to which Google or any search engine come to know about the total indexing stuff of your website. Submission of a sitemap is the signal to Google about crawling your website.

The no. of posts you have written, all the pages you have made in your website, all the videos and images uploaded will be crawled by Google bots through the information provided by sitemap of your website. Here is the sitemap of my website. You can have a look.

How To Stop Indexing Sitemap ?

Have you ever thought about stop indexing sitemap? Is it important to Google indexing sitemap.xml? If you want to stop indexing sitemap then it is just one step to go ahead. There may be many reasons due to which you don’t want to get indexed the sitemap.xml file of your website to Google.

Maybe it is a matter of privacy. Not to give any hint to hackers about your website pages. Yes, you got the point, there is a possibility that hacker maybe reaches to the status of your website through the sitemap.xml file.

Though it is a far apart approach which can’t be done by everyone but still I recommend you to stop Google indexing sitemap.xml. If anyone does the query for the sitemap.xml file of your website then they shouldn’t come to see any result related to it. The only results to be shown should be other related pages to the keyword used for the query.

  • The main step to follow is adding no index robots meta tag value to your sitemap. There are many sitemap generators and many plugins like Google XML Sitemaps, XML Sitemap other few more by which sitemap.xml file can be generated automatically. But with generators, you have to do it manually.
<IfModule mod_rewrite.c>
<Files sitemap.xml>
Header set X-Robots-Tag "noindex"
</Files>
</IfModule>

When you are using these plugins then you have to add no index robots meta tag indirectly by adding the code written above into .htaccess file. And don’t forget to change the name of your sitemap.xml in while writing this code. If you have use any other name then it is necessary to rewrite it.

It can be done by simply going to your cPanel->files->filemanager->.htaccess. Copy the code and paste it in your .htaccess file will stop indexing sitemap.

If you have many sitemaps then you have to edit the name by the particular names of them. Suppose sitemapA, sitemapB and more. It is done where more than one sitemaps are provided to you. It is also similar to earlier the only difference is changing of names. You can do it by the code.

<IfModule mod_rewrite.c>

<Files ~ "^(sitemapA|sitemapB|).xml$">
Header set X-Robots-Tag "noindex"
</Files>
</IfModule>
  • Another method is by directly adding your sitemap.xml to your robots.txt. It can be done only by adding the URL of your sitemap to robots.txt file. Here is an example.
                             Sitemap: http://www.yoursite.com/sitemap.xml

You Can Check Your Sitemap status :

After doing all the changes you can check it by visiting urivalet.com. Type your any URL of the sitemap and check X-Robots tag, if it signals to no index then you have given a signal to Google bots to stop indexing sitemap successfully. Now the sitemap.xml will not appear in any search engine.

Few Final Words For Google Indexing Sitemap.xml :

I have explained about how to prevent Google from indexing sitemap? For a newbie, it is necessary to know about sitemap and how to stop indexing sitemap in any search engine?

The Sitemap is the main file which is considered as the base of any website to tell search engine bots and crawlers about the pages, images, posts, videos of your website. To ensure some security you can stop Google indexing sitemap.xml file of your website.

There is nothing to do more, just a simple step to follow. Maybe you have some question why to stop indexing sitemap? Is it safe? I don’t think you should have to face any problem regarding this. For any query, you can connect me.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.


Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE



4 comments

  1. Hey Ravi,

    So why would you not want Google to index your site? I know you said it could be for privacy issues so if that’s the case then why even include the XML Sitemap plugin on your blog in the first place. Right! Maybe someone put it on there and then later didn’t want it indexed. I guess that could be something to consider.

    That’s interesting and not that I’ll ever need this but it’s good to know.

    Thanks!

    ~Adrienne

    1. Hi Adrienne,

      You know it’s the matter of choice that there are many bloggers who don’t want to get indexed their XML sitemap by any search engine. So basically it is for privacy.Try to check sitemap of any website, don’t you think it seems odd? I mean what is the need for a sitemap to get indexed by Google?

      And as you are asking about the XML plugin, as we all know it is the main key by which we can make Google aware about the pages, posts of our websites. How can we forget a sitemap?

      Anyway thanks for making me remind about sitemap.

      Have a great day.

      ~Ravi

Leave a Reply

Your email address will not be published. Required fields are marked *