Sitemap redirect to homepage

#397376
  • Resolved Victor Lukasso
    Rank Math free

    Hello,

    Before now, http://www.mysite.com/sitemap.xml which has been indexed in search console do redirect to mysite.com/sitemap_index.xml.

    But recently, it’s redirecting to homepage with a “This sitemap is a HTML page” error, meanwhile the new sitemap(sitemap_index) is showing 0 indexed URLs on search console for days now.

    Please, I need urgent fix to this. I’ve tried all the information I saw on the internet and none is working out.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with your sitemap.

    Please follow this guide to fix the sitemap.xml redirect to homepage: https://rankmath.com/kb/fix-sitemap-issues/#apache-error. Once the redirect if fixed, please delete the the line Sitemap: https://www.mydomain.com/sitemap.xml from your robots.txt file.

    Next 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. After that, remove all your sitemaps from your GSC and resubmit only the primary sitemap (sitemap_index.xml).

    Hope that helps. Please let us know if you have questions.

    Alright.

    But why is the /sitemap.xml not working?

    I’ve been using it for more than 4 years and I’m confused at the moment.

    Let me try this nevertheless, the sitemap_index.xml has been showing 0 URLs discovered since 24hours too.

    It didn’t work.

    I’ve tried all of this before now.

    The sitemap_index.xml is still showing 0 discovered URLs for days now.

    Meanwhile the former automatically discovers all my URLs on submission.

    Please, I need a quick fix to this.

    Hello,

    All your sitemap page variation is redirecting correctly now.

    Kindly insert this code into your theme’s functions.php file:

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

    Then, flush the sitemap cache again as shown here: https://i.rankmath.com/pipRDp

    After doing so, resubmit the sitemap to GSC.

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

    Alright, let me check it out

    Thank you very much. I can see it’s working now.

    One more thing please, why is the sitemap_index.xml still showing 0 discovered URLs for 3 days now? Even after the fix.

    It’s not showing sitemaps nor URLs discovered.

    All my old articles changed to indexed – not submitted in the sitemap. and the recent ones aren’t indexed at all.

    Please I need a quick fix.

    Anas
    Rank Math business

    Hello,

    Discovered URLs 0 that you see in Google Search Console just means that the URLs in the sitemap were already found by Googlebot by other means, instead of via the sitemap. For example, Googlebot may have found the URLs from internal links or possibly from links on another site.

    Please note that the Indexed, Not Submitted in Sitemap is not an issue, it only means that Google has already indexed the posts but not through the sitemap.

    Hope that helps.

    Don’t hesitate to get in touch if you have any other questions.

    I don’t think this is true tho.

    A blog of more than 4 years with all sitemap intact suddenly starts showing 0 URL discovered?

    My sitemaps do display all my URLs on submission before couple days of moving to WP on rankmaths.

    There’s an error somewhere please, Moreover I’m loosing too much traffic because of this sitemap issue so I don’t think Google discovered the links by other means.

    Please, Can’t this be rectified.

    Loosing more than 50% rankings because of a sitemap not been crawled is an issue please.

    Nigel
    Rank Math business

    Hello,

    Thank you for your patience as we investigate your sitemap and indexing issues.

    I tried to check your site website but it was giving a Cloudflare error 520.

    Your sitemap will not affect your website ranking as stated in this post: https://developers.google.com/search/blog/2008/01/sitemaps-faqs#:~:text=A%3A%20A%20Sitemap%20does%20not,your%20site%20in%20our%20index.
    Screenshot:

    Hope that helps. Please let us know if you have questions.

    Alright thanks.

    Anas
    Rank Math business

    Hello,

    If you have any questions in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

    Alright, thank you very much.

    Hello,

    We are glad that we were able to address your concerns.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘Sitemap redirect to homepage’ is closed to new replies.