HTACCESS

#973280
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    I apologize for the issue you are facing with your htaccess file and sitemap. To ensure that your sitemap can be crawled properly, you may need to add specific rewrite rules to your htaccess file. Here’s what you can do:

    1. Check if your sitemap loads: First, visit `https://rankmath.com/wp-content/uploads/2021/01/edit-.htaccess-file.jpg. If this loads your sitemap, then you need to add the following rewrite rules 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
    2. Edit your .htaccess file: You can edit your .htaccess file by going to Rank Math SEO → General Settings → Edit .htaccess. If this section is not available, ensure that you’ve switched to the Advanced Mode in Rank Math.

      Edit .htaccess in Rank Math

    3. Save Changes: After adding the rules, make sure to save the changes and check if the sitemap is now accessible.

    If you continue to experience issues, please reply to this ticket with any error messages or additional details, and a human agent from the Rank Math Support team will assist you further.

    Thank you for raising this concern!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    How to Edit Your htaccess File Using Rank Math » Rank Math

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

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

    Please note that it is expected for the sitemap to have noindex as you don’t want the sitemap to get indexed on the SERP.

    Please refrain from submitting your sitemap in Google’s URL Inspection tool. The correct way to submit your sitemap to Google is by following this guide: https://rankmath.com/kb/submit-sitemap-to-google/

    However, we noticed your sitemap URL is returning a page not found error. To troubleshoot this, 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/

    Let us know how that goes. 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘HTACCESS’ is closed to new replies.