Sitemap can be read, but has errors

#1032585
  • Hello Bhanu and Support Team.

    I’m using your SEO Rank Math plugin in a blog-type website, but I’ve been facing some issues for the last 7 months. I did R&D for some issue solutions but didn’t get any solution for that.

    Can you please help me with this?

    My Issue List:

    1. Issue. Search Console in the site map submitted successfully, and all sitemap xml links listed properly. But 3 to 5 days after showing some sitemap XML list, this error “could not fetch” appears. I think this issue is coming when Google crawl bots play.

    2. Issue. Publish post didn’t submit for indexing automatically. And it didn’t update on the search console in the sitemap XML list.

    3. Issue. My post and page URL listed in sitemap.xml, but if I submit these url from the URL inspection tool and then submit indexing shows a sitemap processing error, and the sitemap doesn’t refer to this URL.

    Please give me a solution for this and reply to this issue point-by-point solution.

    Thanks & Regards

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

    We apologize for the issues you are facing with the Rank Math plugin. Thank you for detailing your concerns. Let’s address each of your issues point-by-point:

    1. "Could Not Fetch" Error in Sitemap

    This error can occur for several reasons. Here are some steps to troubleshoot:

    • Validate Your Sitemap: Use the Validate XML Sitemap tool to ensure your sitemap is correctly configured.
    • Check Sitemap Location: Ensure your sitemap is located in the root folder of your WordPress installation, typically at https://yourdomainname.com/sitemap_index.xml.
    • Flush Permalinks: Go to Settings → Permalinks in your WordPress dashboard and click Save Changes to refresh your permalinks.
    • Check Robots.txt: Ensure that your sitemap URL is not blocked by any rules in your robots.txt file. You can check this under Rank Math SEO → General Settings → robots.txt.

    2. Posts Not Automatically Submitted for Indexing

    If your posts are not being submitted for indexing automatically, ensure that:

    • Indexing Settings: Check that your posts are set to index. Go to Rank Math SEO → Titles & Meta and ensure the Index checkbox is enabled for your posts.
    • Sitemap Submission: After publishing a post, make sure to manually submit the sitemap again in Google Search Console if it doesn’t update automatically.

    3. Sitemap Processing Error on URL Inspection Tool

    If you’re encountering a sitemap processing error when submitting URLs:

    • Check for Custom Canonicals: If you have set custom canonical URLs for your posts, they may not appear in the sitemap. Consider removing these custom canonicals to allow Rank Math to generate them correctly.
    • Ensure Correct Header in Sitemap: Make sure your sitemap file uses the correct XML header:

    • Clear Cache: If you are using any caching plugins, clear the cache after making changes to ensure that Google sees the latest version of your sitemap.

    If these steps do not resolve your issues, we recommend replying to this ticket with your site URL so that a human agent from our support team can assist you further.

    Thank you for bringing these concerns to our attention, and we hope this helps you resolve the issues!

    and also sitemap validation screenshot:

    https://prnt.sc/VISYkmMn9DdP

    Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    Please follow the steps below for initial troubleshooting:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article: https://rankmath.com/kb/exclude-sitemaps-from-caching/

    If the issue persists then try disabling the transient cache for the sitemap. This will make sure that your XML sitemap always reflects the latest changes on your site. Kindly add this code snippet to your site:

    
    /** 
     * Filter if XML sitemap transient cache is enabled.
     *
     * @param boolean $unsigned Enable cache or not, defaults to true
     */
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    If you’re not sure how to add this code, you can follow this guide: https://rankmath.com/kb/wordpress-hooks-actions-filters/.

    After you add the code, please clear any cache on your site or server and then remove the submitted sitemaps on GSC and submit only the main sitemap (sitemap_index.xml) again. You might need to wait a while for the last read column to be updated.

    If you’re still facing issues with the sitemap, please let us know – we are happy to investigate further.

    Hello,

    Thanks for the reply!

    I did all the steps but got stuck on this code paste:

    I made the rank-math.php file in the child theme folder root, but I’m confused about which code we need to paste here. The code shows different, or the screenshot shows different code. please suggest

    Please share the code that we need to add to the rank-math.php file.

    Hello,

    You can copy and paste this code to your rank-math.php file:

    /** 
     * Filter if XML sitemap transient cache is enabled.
     *
     * @param boolean $unsigned Enable cache or not, defaults to true
     */
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    Also, don’t forget to include the opening PHP tag like in this image (Line 1 only):

    line1

    Looking forward to helping you.

    You share 2 img and deferent 2 code.

    Please share single code which we paste in file.

    Hello,

    The code from the screenshot is just an example and we have pointed out where to insert the following code:

    /** 
     * Filter if XML sitemap transient cache is enabled.
     *
     * @param boolean $unsigned Enable cache or not, defaults to true
     */
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    Use that code I just shared.

    If you are still having issues applying the code, we can do it for you. Please edit the first post on this ticket and include your WordPress and FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

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

You must be logged in to reply to this ticket.