网友回复
可以生成多个sitemap文件,多个sitemap文件在robots.txt中按行分割如下:
User-agent: * Sitemap: https://www.example.com/sitemap1.xml Sitemap: https://www.example.com/sitemap2.xml
可以在sitemap.xml中拆分成多个sitemap文件,示例如下:
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex> <sitemap> <loc>http://www.example.com/sitemap_1.xml</loc> <lastmod>2021-10-09</lastmod> </sitemap><sitemap> <loc>http://www.example.com/sitemap_2.xml</loc> <lastmod>2021-10-09</lastmod> </sitemap> </sitemapindex>