sitemap redirects to homepage

#443149
  • Resolved ivanamomentum
    Rank Math free

    Hello,

    my sitemap is redirecting to homepage and when submitting to search console getting the following error ‘Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead’. hence my posts are not indexing in google. Please can you help?

    I cleared the sitemap cache and excluded sitemap from page caching.

    I tried to deactivate cache completely. Nothing helped.

    Thanks,
    Kind regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Anas
    Rank Math business

    Hello,

    Thank you for contacting Rank Math, and sorry for any inconvenience caused.

    Please add this filter to your website:

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

    Here is a guide you can follow to add the filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Once done, flush the Sitemap cache by following this video screencast and check the sitemap:
    https://i.rankmath.com/pipRDp

    Hope this helps.

    Thank you.

    Hello,

    I added the filter to child theme functions.php, flushed the sitemap cache, but it didn’t help.

    Can we try something else?

    Thanks!

    Anas
    Rank Math business

    Hello,

    Can you please share the sitemap URL with us so we can check?

    We look 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 redirects to homepage’ is closed to new replies.