my sitemap is error showing it is html

#208270
  • Resolved Tejpal Singh
    Rank Math free

    my sitemap is error showing it is html i am getting this issue several. times since i am using rankmath are you guys not solving these errors? i am fed up now please help with it or i will switch to other than rm. again and again i am recieving this help out.

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

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    It seems your sitemap is redirecting to your homepage. Can you please follow these steps?
    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. Remove all your sitemaps from your GSC and submit only the primary sitemap (https://yourdomain.com/sitemap_index.xml). See if the issue goes away after doing so.

    If the issue persists, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login 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.

    Hello,

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

    Thank you.

    Anas
    Rank Math business

    Hello,

    Please add the WordPress login URL in the sensitive data section.

    We really look forward to helping you.

    Hello,

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

    Thank you.

    Anas
    Rank Math business

    Hello,

    I logged in to your website and flushed the sitemap cache and exluded the sitemaps from caching.

    As you are using Autoptimze plugin, it does not have an easy way to exclude files from the cache so I added the following code in your themes functions.php file:

    // Disable autoptimize on pages with the word "test" in the URL
    add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
    function my_ao_noptimize() {
    if (strpos($_SERVER['REQUEST_URI'],'sitemap_index.xml')!==false||strpos($_SERVER['REQUEST_URI'],'main-sitemap.xsl')!==false/* Add here any other sitemap to exclude*/) {
    return true;
    } else {
    return false;
    }
    }

    Then, I cleared the website cache and validated the sitemaps with https://www.xml-sitemaps.com/validate-xml-sitemap.html, the sitemap got validated without any errors:
    sitempa

    Please remove the sitemaps from Google Search Console and add sitemap_index.xml again and wait for Google to crawl the 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 5 replies - 1 through 5 (of 5 total)

The ticket ‘my sitemap is error showing it is html’ is closed to new replies.