0

Take Grammarly, for example: https://www.grammarly.com/sitemap.xml

A smaller website would just have that sitemap.xml list all the actual URLs, but Grammarly has that sitemap list two (sub) sitemaps. If I go into those (sub) sitemaps, then they do actually list the URLs.

However, can this be nested further? That'd mean a (sub) sitemap links to other (sub) (sub) sitemaps, and recursively so on.

1

1 Answer 1

2

There are sitemap index files and sitemap files. The sitemap protocol specifies that a sitemap index file can contain up to 50,000 sitemap files and must be no larger than 50MB. Each sitemap file can contain up to 50,000 URLs and also must be no larger than 50MB.

Besides listing sitemap files within sitemap index files no nesting is allowed. Sitemap index files are not allowed to contain other sitemap index files and sitemap files are not allowed to contain other sitemap files. However you can have multiple sitemap index files if needed:

/
├── sitemap-index-1.xml
│   ├── sitemap-1.xml
│   │   ├── url-1
│   │   ├── url-2
│   │   ├── ...
│   │   └── url-50000
│   ├── sitemap-2.xml
│   │   ├── url-1
│   │   ├── url-2
│   │   ├── ...
│   │   └── url-50000 
│   ├──  ...
│   └── sitemap-50000.xml
│       ├── url-1
│       ├── url-2
│       ├── ...
│       └── url-50000 
├── sitemap-index-2.xml
│   ├── sitemap-1.xml
│   │   ├── url-1
│   │   ├── url-2
│   │   ├── ...
│   │   └── url-50000
│   ├── sitemap-2.xml
│   │   ├── url-1
│   │   ├── url-2
│   │   ├── ...
│   │   └── url-50000 
│   ├──  ...
│   └── sitemap-50000.xml
│       ├── url-1
│       ├── url-2
│       ├── ...
│       └── url-50000 
├── ...
├── sitemap-index-N.xml
│   ├── sitemap-1.xml
│   │   ├── url-1
│   │   ├── url-2
│   │   ├── ...
...

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