Subject: Sitemap not showing all published pages

#1105881
  • Hello,

    I am facing an issue with the sitemap generated by Rank Math.

    – WordPress version: 6.8.2

    – Rank Math version: 1.0.253 (Free)

    – Theme: Divi 4.27.4

    – WP Rocket

    – sitemap : https://groupe-allarys.com/sitemap_index.xml

    The problem:

    – I have 89 published pages in WordPress.

    – The sitemap at /page-sitemap.xml only shows 59 pages.

    – All pages are published, public, set to Index in Rank Math, not redirected, not password protected.

    – Sitemap settings are correct (pages are included, no IDs excluded).

    I have already tried:

    – Saving permalinks again,

    – Clearing Rank Math transients,

    – Rebuilding database tables,

    – Clearing all caches (WP Rocket, CDN),

    – Disabling WP Rocket completely,

    – Checking with ?debug=1 → still only 59 pages, no debug info.

    Yet the issue persists.

    Could you please help me identify why Rank Math only includes 59 pages instead of all 89?
    If necessary, I can provide examples of missing URLs.

    Thank you for your support.

    Best regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    We apologize for the issue you are facing with your sitemap not showing all published pages. Thank you for providing detailed information about your setup and the steps you’ve already taken to troubleshoot the problem.

    Here are a few additional things you can check:

    1. Exclude Posts Settings: Ensure that none of your pages are accidentally excluded in the Sitemap Settings of Rank Math. You can check this by navigating to Rank Math SEO → Sitemap Settings and looking under the Exclude Posts section.
      Exclude posts and terms in Sitemap settings

    2. Empty Archive Pages: If any of your category or tag archive pages are empty (i.e., they have no posts), they will be excluded from the sitemap by default. You can enable the Include Empty Terms option in your category/tag/custom taxonomy archive settings to include these pages.
      Include Empty Terms in Rank Math

    3. Caching Issues: Since you mentioned using WP Rocket, ensure that the sitemap is not being cached. You can add the following code to your theme’s rank-math.php file to disable caching for the sitemap:

      add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    4. Custom Canonicals: If any of your posts have custom canonical URLs set, they may not appear in the sitemap. Check if removing these custom canonicals helps in including those pages.

    If you’ve checked all these settings and the issue persists, please reply to this ticket with examples of the missing URLs, and a human agent from our support team will assist you further.

    Thank you for your patience, and we look forward to resolving this issue for you!

    Sources:
    Why Isn’t My URL Included in the Sitemap? » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hello,

    Please follow this guide for the common reasons why URLs are not showing in the sitemap:
    https://rankmath.com/kb/url-not-in-sitemap/

    Also, head over to your website files /uploads/rankmath/, and delete any XML files from that path.

    If the issue persists, try updating the plugin to the beta version, as we have included a fix for sitemap caching issues.

    Here’s a guide you can follow:
    https://rankmath.com/kb/version-control/#beta-updates

    Looking forward to helping you.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this ticket.