Sitemap Not Working Correctly

#1099898
Viewing 15 replies - 1 through 15 (of 15 total)
  • Hello,

    We apologize for the issue you are facing with the sitemap functionality on your website. It seems that the sitemaps for posts, pages, and products are not being generated correctly, which can be frustrating.

    Here are a few steps you can take to troubleshoot and potentially resolve the issue:

    1. Flush Permalinks: Sometimes, simply flushing the permalinks can resolve 404 errors. Go to your WordPress dashboard, navigate to Settings → Permalinks, and click Save Changes without making any changes. This action refreshes the permalink structure.

    2. Check Index Settings: Ensure that your posts and pages are set to index. Go to Rank Math SEO → Titles & Meta and check the Robots Meta settings. Make sure the Index checkbox is enabled for your posts and pages.
      Index Titles and Meta settings

    3. Validate Your Sitemap: Use the Validate XML Sitemap tool to check if your sitemap is correctly configured. Enter your sitemap URL and click VALIDATE SITEMAP.
      An example displaying how to validate a sitemap

    4. 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.

    5. Server Configuration: If you are using Apache or Nginx, ensure that the necessary rewrite rules are in place as mentioned in our documentation:

      • For Apache, add the following to your .htaccess file:
        # START of Rank Math Sitemap Rewrite Rules
        RewriteEngine On
        RewriteBase /
        RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
        RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
        RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
        # END of Rank Math Sitemap Rewrite Rules
      • For Nginx, add the following to your config file:
        # 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

    If these steps do not resolve the issue, we recommend replying to this ticket so a human agent from our support team can assist you further with a more in-depth investigation into your specific setup.

    Thank you for bringing this concern to our attention!

    Sources:
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math

    Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Please follow the steps below:

    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/

    3. Apply the following filter code to your site.

    
    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    Here’s how you can add filter to your WordPress site:https://rankmath.com/kb/wordpress-hooks-actions-filters/

    4. Remove all your sitemaps from your Google Search Console and re-submit only the index sitemap (https://website.com/sitemap_index.xml)

    Let us know how that goes. Looking forward to helping you.

    jim
    Rank Math free

    I have done ALL the above but nothing is working. The problem is not with Google. It’s a problem with your rankmath plug-in

    Hello,

    We might need to take a closer look at your website to investigate this further. Please edit the first post on this ticket and include your WordPress & 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 plugin below 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.

    jim
    Rank Math free

    OK, got it!

    I’ll work on that and keep you posted!

    Thanks
    James

    jim
    Rank Math free

    I would create a user login for your staff.
    What email address should I use?

    Hello,

    You may use this email address for us to gain access to your WordPress Admin and your FTP: s******@r***********.

    We are looking forward to helping you.

    jim
    Rank Math free

    [Moved to the sensitive data section]

    jim
    Rank Math free

    An Admin user account has been created for:
    s******@r***********

    Please check your inbox for the login information and/or instructions.

    jim
    Rank Math free

    Any update this?

    Hello,

    We deeply apologize for the unexpected delay in response.

    The issue you’re facing is because of the YayMail plugin you’re using on your website. It added some incorrect compatibility code for our plugin. The code can be found in the wp-content/plugins/yaymail/src/Integrations/RankMath.php file.

    The filter they have used to exclude their post type from the sitemap is removing all post types from it.

    You can see the sitemap is working properly when we temporarily disable that plugin:

    Some of our users have already reported this issue to YayMail’s support team, and they have provided a fix.

    Since you are still experiencing the problem, we recommend reaching out to their support team and sharing these details with them.

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    jim
    Rank Math free

    OK, got it!

    Thanks for your help!

    Hello,

    We are glad to be of help.

    Do you still need our assistance with anything else or can we go ahead to close the ticket?

    We look forward to helping you.

    Thank you.

    jim
    Rank Math free

    No further assistance needed at this point.

    Thanks

    Hello,

    We’re delighted to hear that this issue has been resolved. We appreciate your feedback.

    This ticket will be closed now, but if you ever have another question or need any help in the future, please don’t hesitate to create a new forum topic. We’ll be more than happy to assist you again.

    Thank you.

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

The ticket ‘Sitemap Not Working Correctly’ is closed to new replies.