Sitemap URL redirects to homepage

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

    Thanks for contacting us, and sorry for any inconvenience that might have been caused due to that.

    Google detecting your sitemap as HTML page, as it’s showing your homepage, which represents a HTML page.

    However, upon further checking, It seems to be the /?sitemap=1 is loading perfectly fine and the issue is only with the /sitemap_index.xml.

    The sitemap generates on the fly in Rank Math, when you enable that module. We rely on redirects enabled by your server software to accomplish that. As the Sitemap doesn’t work in your case, you may have to add some rewrite rules to them in order to function sitemaps properly.

    To rewrite /?sitemap=1 to sitemap_index.xml, please follow the guide I’ve shared below:
    https://rankmath.com/kb/sitemap-404-error/#nginx-apache-server

    If that seems to be complicated for you, please get in touch with your hosting provider to see if they can do that for you.

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

    Thank you.

    Hi! Thank you for the reply.

    I added the code to nginx server and now the sitemap is loading fine.
    Added also the URL to Search Console and it’s working fine for HTML pages, but not for images.
    Please take a look to this screens:
    https://postimg.cc/gallery/KcyBZ91

    Do you know if it’s something related to Rank Math?

    Thank you!

    Hello,

    I’ve checked the sitemap, and indeed there are invalid image URLs from those pages.

    In this case, assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Here is a video you can follow as well: https://www.youtube.com/watch?v=FcIWRhcUP2c

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Meanwhile, there is a similar issue with Elegant themes which adds invalid images in Rank Math’s sitemap. If that’s the same case on your site, you can get in touch with their development team for this issue.

    Looking forward to helping you.

    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 ‘Sitemap URL redirects to homepage’ is closed to new replies.