samdark/sitemap

Check 10 MB size limit for a sitemap

samdark opened this issue · 6 comments

If it exceeds 10 MB, next sitemap should be used.

Size written is reported by file_put_contents.

Hello,

Since 11/2016, as you can check here : https://www.sitemaps.org/faq.html

Q: How big can my Sitemap be?

Sitemaps should be no larger than 50MB (52,428,800 bytes) and can contain a maximum of 50,000 URLs. These limits help to ensure that your web server does not get bogged down serving very large files. This means that if your site contains more than 50,000 URLs or your Sitemap is bigger than 50MB, you must create multiple Sitemap files and use a Sitemap index file. You should use a Sitemap index file even if you have a small site but plan on growing beyond 50,000 URLs or a file size of 50MB. A Sitemap index file can include up to 50,000 Sitemaps and must not exceed 50MB (52,428,800 bytes). You can also use gzip to compress your Sitemaps.

Hope, this help.

Yep. Limit varies in different search engines and 10MB is the lowest I was able to find.

It seems that you're more dealing with Yandex than me, i didn't notice that point : https://yandex.com/support/webmaster/controlling-robot/sitemap.xml (still 10MB -_-)

I have implemented this feature in pull request #55