1

I have a google sitemap which is 1 massive file now because the site has grown large... I want to separate it out so every folder would have its own sitemap instead of 1 giant map in the root folder. I don't seem to be able to find the correct method of linking sitemaps and letting search engines know that this is the method I'm using. The only way to do it which I have found, is by adding each one individually into the search console sitemap tab. I want to be able to just link each site map so a search engine would know the location of each one without any manual entry.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 
   http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://www.sitename.co.uk/</loc>
<priority>1</priority>
<lastmod>2021-02-11T17:25:10+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
........ all the rest of the locations in this entire website

Is there a way to put a reference to child sitemaps?

2
  • XML sitemaps have almost nothing to do with SEO. They don't help your pages rank better and they rarely get search engines to index pages they wouldn't index anyway. At best sitemaps get search engine crawlers to crawl new pages quickly and give you extra stats in webmaster tools and search console. See The Sitemap Paradox Mar 24 at 15:30
  • @StephenOstermiller I updated the question. If you have the answer that would be great :-) Mar 24 at 15:36
1

You will probably be interested in the sitemapindex feature of the Sitemap protocol.
Here is a short example:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
   <sitemap>
      <loc>https://www.example.com/sitemap1.xml</loc>
   </sitemap>
   <sitemap>
      <loc>https://www.example.com/sitemap2.xml.gz</loc>
   </sitemap>
</sitemapindex>

You can add an optional lastmod attribute to any sitemap.

1

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.