Problems with sitemap index

#983232
  • Resolved Alber Montalvá
    Rank Math free

    Hi, I’m using Rank Math on my site and the plugin is in charge of making the sitemaps of the page. However, the sitemap_index.xml file that it automatically generates for me is returning a critical error from WordPress. I have tried deleting the cache, changing the permalinks and nothing seems to work. Doesn’t seem to be an issue in between plugins, so what could be the problem?

    Thanks.

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

    We apologize for the issue you are facing with the sitemap index. Since you’ve already tried clearing the cache and changing the permalinks, here are a few additional steps you can take to troubleshoot the problem:

    1. Check for a Blank Space Error: Ensure there are no blank spaces or lines before the XML declaration in your sitemap file. This can often cause errors. You can check this by viewing the source code of your sitemap.
      Blank Space Sitemap

    2. Flush Permalinks Again: Sometimes, simply saving the permalinks again can resolve issues. Go to Settings → Permalinks in your WordPress dashboard and click Save Changes without making any changes.
      Flush permalink settings

    3. Check for Custom Rewrite Rules: If you are using an Apache or Nginx server, ensure that the appropriate rewrite rules are added to your .htaccess or Nginx configuration file respectively. Here’s an example for Nginx:

      # START Nginx Rewrites for Rank Math Sitemaps
      rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
      rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
      rewrite ^/([a-z]+)?-sitemap.xsl$ /index.php?xsl=$1 last;
      # END Nginx Rewrites for Rank Math Sitemaps
    4. Check for Plugin Conflicts: Even if you believe there are no conflicts, it might be worth running a conflict check using the Health Check plugin to ensure everything is functioning correctly.

    5. Review Server Logs: If possible, check your server error logs for any specific errors related to the sitemap generation.

    If these steps do not resolve the issue, please reply to this ticket with your site URL so that a human agent from our support team can assist you further. Thank you for raising this concern!

    Hello,

    You must have received an email from WordPress with the details about the error. Please share it with us here so we can check.

    If you haven’t received the email with the error code, you can follow this guide to enable debugging in WordPress
    https://wordpress.org/support/article/debugging-in-wordpress/ or you can get in touch with your web host, and they will help you locate the log file.

    Having an error log will help us determine what is causing the critical error on your sitemap.

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Problems with sitemap index’ is closed to new replies.