Sitemap appears as HTML error on google search console

#981066
  • Resolved Alaaeldin Amin
    Rank Math free

    I use RankMath for SEO and activated the sitemap option. Google search console keep giving an error the sitemap is not in the correct format and appears as HTML page. I purged all caches, deleted and resubmitted the sitemap with no success. The sitemap is only recognising two pages out of 8.
    [moved to sensitive data section]
    Thanks for your help.

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

    We apologize for the issue you are facing with your sitemap appearing as an HTML page in Google Search Console. Here are some steps you can take to troubleshoot and resolve this issue:

    1. 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. If there are issues, the tool will provide feedback.
      An example displaying how to validate a sitemap

    2. Check Sitemap Location: Ensure that your sitemap is located in the root folder of your WordPress installation. The correct URL should be:
      `https://rankmath.com/kb/fix-sitemap-issues/#sitemap-loads-slowly

    3. Ensure Posts Are Set to Index: If your posts are set to noindex, they won’t appear in the sitemap. Go to Rank Math SEO → Titles & Meta and ensure that the Index checkbox is enabled for your posts.
      Index Titles and Meta settings

    4. Check for Plugin Conflicts: Sometimes, other plugins can conflict with Rank Math. You can use the Health Check plugin to identify any conflicts.

    5. Flush Permalinks: If you encounter a 404 error, go to the Permalinks settings in your WordPress dashboard and click Save Changes without making any changes. This can help refresh the permalink structure.

    6. Check robots.txt File: 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.

    If you’ve tried all these steps and are still experiencing issues, please reply to this ticket with any error messages you see or additional details, and a human agent from our support team will assist you further. Thank you for raising this concern!

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

    Alaaeldin Amin
    Rank Math free

    Thanks for your reply. I tried the above steps, although I couldn’t use the Health check plugin and I can still see the sitemap error on google search console

    Hello,

    Your page sitemap is accessible, however, it is returning this error using this tool:
    https://www.xml-sitemaps.com/validate-xml-sitemap.html

    Incorrect http header content-type: "text/html; charset=UTF-8" (expected: "application/xml")

    In this case, please follow our guide here to fix this:
    https://rankmath.com/kb/incorrect-http-header-content-type-sitemap-error/

    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 ‘Sitemap appears as HTML error on google search console’ is closed to new replies.