Redirections in sitemap

#548227
  • Resolved Ross Canning
    Rank Math free

    Hi,
    I am getting a lot of warnings on hrefs.com that I have 410 and 301 redirects in my sitemap. They say I need to remove them from the sitemap? In terms of the 410s I have excluded the pages using their IDs, in the sitemaps section of the Rankmath plugin. But they are still appearing as errors after a new hrefs scan.

    The 301 redirects are all done via Rankmath, but again hrefs is saying remove the original URL from the sitemap. How can this be done if they are already redirected, why is the original URL appearing in the sitemap?

    Many thanks,
    Ross.

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    If they’re already redirecting, they should be removed from your sitemap.

    In this case, please follow the steps below for initial troubleshooting:

    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/

    If the issue still persists, please try adding this filter to your active theme’s functions.php file:

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

    Let us know how this goes.

    Thank you.

    Hi,
    Thank you very much, I’ll try these recommendations.
    Kind regards,
    Ross

    Hello,

    Glad that helped.

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

    We are here to help.

    Thank 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 ‘Redirections in sitemap’ is closed to new replies.