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

I currently have a site setup that, in addition to regular static pages, also has a WordPress blog. This results in my main site having a sitemap.xml file listing the basic pages and then a sitemap for the WordPress blog posts. I understand that I could create a sitemap_index file and point to each of the sitemap files, but would it be possible to just link to the WordPress sitemap from my regular sitemap file?

For instance:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
    <loc>https://www.example.com/wordpress_sitemap.xml</loc>
    <changefreq>weekly</changefreq>
    <lastmod>2013-04-30T14:10:03+00:00</lastmod>
    <priority>1.0</priority>
</url>
share|improve this question
    
I believe the reason that wouldn't work is because the bots would then interpret your wordpress_sitemap.xml as just a regular page, not as a Sitemap. Which would then result in them indexing the sitemap, and not the pages pointed to in the Sitemap. –  nathangiesbrecht Apr 30 '13 at 16:39
    
Thanks for your comment. That was my initial thought, but couldn't find any definitive answer. –  Tim Banks Apr 30 '13 at 16:42
1  
Having your sitemap indexed by SE's isn't a bad thing. It's only if they don't know that it's a sitemap. Which is where adding it to robots.txt or submitting to Google & Bing come in. –  nathangiesbrecht Apr 30 '13 at 16:48

1 Answer 1

up vote 2 down vote accepted

Unfortunately, only sitemap_index's can have other sitemap's in them. You have two options as far as I can tell:

  1. You could add a sitemap_index, and then link to your other two sitemaps from there.
  2. You could just add both of your sitemaps to your robots.txt file (more info)

Alternatively, you could also disregard both of the above and just submit each of your Sitemaps to Google, Bing, etc. as you see fit (which you should do anyway). That might reduce the number of non-compliant crawler's scraping your website (if they don't know where the Sitemap is, it's harder for them to crawl your whole site).

share|improve this answer
    
Thanks for the answer. I think this will cover all bases. –  Tim Banks Apr 30 '13 at 18:56

Your Answer

 
discard

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.