Hello @rohit_gomgee,
Thanks for reaching out regarding your sitemap.
If I understand correctly, your sitemap is read by the Google Search Console when you set a limit of 2000 URLs but not read when you change it to 9000 URLs.
The default limit we set for the sitemaps is 1000 URLs for each child sitemap. This is because it will load faster without impacting the PHP resource or server load. And as you’ve confirmed, setting the limit to 2000 URLs produced better results than 9000 URLs.
So I’ll recommend you leave it at 2000 URLs limit that has worked for you or better, stick with the default limit of 1000 URLs. A quick and easy way to do this is to install the Yoast Test Helper plugin. Then navigate to WordPress > Tools > Yoast Test > XML Sitemaps
I have created sitemap using custom coding. Is there a way to create automatically change 9000+ url to diffrent sitemaps or I have to use custom coding for this?
I am using hooks : wpseo_sitemap_index and wpseo_do_sitemap_{SITEMAP_KEYWORD}
if you have any sample code for this it will helpfull.
@rohit_gomgee You can limit the number of sitemap entries by using the filter wpseo_sitemap_entries_per_page. Here follows example code to limit the max entries to 100:
/* Limit the number of sitemap entries for Yoast SEO */
function max_entries_per_sitemap() {
return 100;
}
add_filter( 'wpseo_sitemap_entries_per_page', 'max_entries_per_sitemap' );
We also have more information on customizing the sitemap here, and you can also find the developer documentation on this here.
This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.