2

I am using Yoast SEO plugin for my WordPress website. I am also using Yoast's XML Sitemap. Today I checked my pages in Google and found this indexed by Google:

Title: http://example.com/ 2014-02-15T22:23:51+00:00 weekly 1 http ...
Link: example.com/page-sitemap.xml‎
Description: http://example.com/ 2014-02-15T22:23:51+00:00 weekly 1 http://example.com
/contact/ 2014-02-06T13:47:35+00:00 weekly 0.8 http://example.com/blog/ ...

Any idea which caused this problem? I guess this is not good for my site SEO.

2
  • Did you submit the sitemap to your GWMT account? If no, then try to do this. Now it looks like Google treats your sitemap as a regular page of the website.
    – Oleg
    Feb 22, 2014 at 16:11
  • Yes, I submited the sitemap index from my GWT account. I'll wait few days to see if it disappears, but I think it won't. Any idea to solve that?
    – toofast
    Feb 23, 2014 at 10:06

1 Answer 1

3

If you want to remove the xml sitemaps as file from the Google search pages, you have to use the noindex header.

For example, if you create the sitemaps with php, use the following code:

header('X-Robots-Tag: noindex', true);

If your static xml files, you can send the header from the .htaccess file

<Files ~ "\.xml$">
  Header set X-Robots-Tag "noindex"
</Files>

For more information have a look at google developers

6
  • I don't want to remove that sitemap, it is the most important from my sitemap index because it contains my pages.
    – toofast
    Feb 23, 2014 at 10:08
  • By using the noindex header you do not tell Google not to use the sitemaps. Google will still use them to find your links, but will not included the sitemap as xml file on the search engine result pages :)
    – krokola
    Feb 23, 2014 at 16:57
  • @krokola is right. If you've submitted the sitemap to GWMT, then you just need to exclude the sitemap from indexing as a regular page by using noindex tag.
    – Oleg
    Feb 23, 2014 at 17:39
  • So where am I going to place that noindex tag if I generate the sitemap using Yoast's SEO Plugin for WordPress?
    – toofast
    Feb 24, 2014 at 21:07
  • You cannot place tag in an xml file, you have to send it with headers on your .htaccess file
    – krokola
    Feb 25, 2014 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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