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?

Éric
  • 616
  • 3
  • 9

1 Answers1

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.

Éric
  • 616
  • 3
  • 9