Sitemap error on GSC: Sitemap appears to be an HTML page

#1107887
  • Resolved Shannon Sadik
    Rank Math free

    Hello,

    I am getting the “Your file appears to be an HTML page” Error on GSC. I have verified xml link is correct. I tried your troubleshooting steps, disabling all themes and plugins and have only enabled Rankmath and 24 theme, but the link still appears as regular web link, not an xml file, which google says it needs. Your guide says if this happens, it means it’s a wordpress setting, but does not say how to fix it?

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

    We apologize for the issue you are facing with the sitemap error in Google Search Console. Since you’ve already verified that the XML link is correct and have tried disabling other themes and plugins, here are a few additional steps you can take to resolve the "Your file appears to be an HTML page" error:

    1. Check for Plugin Conflicts: Sometimes, other plugins can interfere with how your sitemap is generated. You can use the Health Check plugin to identify any conflicts.

    2. Flush Permalinks: Go to your WordPress dashboard, navigate to Settings → Permalinks, and click Save Changes without making any changes. This can help refresh your permalinks and might resolve the issue.

    3. Check Robots.txt: Ensure that your robots.txt file is not blocking access to your sitemap. You can check this in Rank Math SEO → General Settings → robots.txt.

    4. Custom Code: If the above steps do not resolve the issue, you may need to add a filter to your theme’s rank-math.php file. You can add the following code:

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

      This will disable caching for the sitemap and may help in resolving the issue.

    5. Validate Your Sitemap: Use the Validate XML Sitemap tool to ensure that your sitemap is correctly configured.

    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, and we hope to help you get this resolved soon!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math

    Flushing the permalinks solved the problem. Thank you.

    Hello,

    Glad that helped.

    If you have any other concerns, please don’t hesitate to contact us anytime so we can assist you further.

    Looking forward to helping you.

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

The ticket ‘Sitemap error on GSC: Sitemap appears to be an HTML page’ is closed to new replies.