Error 404 post-sitemap.xml

#430261
  • Resolved Gabriel Martin
    Rank Math free

    Good morning,

    I have modified the website in relation to the Blog so that I have created categories and tags and assigned them to the entries. I do not intend to index the categories or tags. I have modified the url access to the entries so that between the domain and the entry I have included the name of the main category.
    I had the problem when I went to Rank Math to get the url of the entries I wanted to upload to GSC but when I went to verify that it includes the new urls it showed me Error 404. It does show the sitemap of the pages correctly.
    I have been reading the support information and have followed your instructions:
    1. Entered Rank Math->Sitemap Settings and hit save after modifying the number of links per sitemap.
    2. Entered in Settings->Permanent links and click on Save.
    3. I have included the sitemap urls (main and specific) in the Varnish plugin dynamic caching URL exclusion list.
    4. I deleted the WP Rocket cache and cleared the Varnish cache.
    It still shows Error 404 when accessing the sitemap of the entries. Can you please tell me how I can resolve this? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Prabhat
    Rank Math agency

    Hello,

    Thank you for contacting the support and we regret the inconvenience caused.

    Please add the below filter to the website:

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

    You can follow this guide to add the filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Once done, please flush the sitemap’s cache by following this screencast again and see if that helps: https://i.rankmath.com/pipRDp

    Let us know how that goes.

    Thank you.

    Hello!
    I did what you indicated but I kept getting error 404. From hosting support (I had also asked there) they have told me to remove the canonical urls from the post. I have tried it for one post and I have verified that it already generates the sitemap correctly.
    I assigned to each post a canonical url because each post has 2 categories and I wanted to avoid penalties for duplicate content but they tell me that I will not have a problem for it.
    In any case, thank you very much for your help!

    Anas
    Rank Math business

    Hello,

    Yes, Rank Math does not add the URLs to the sitemap if there is a custom canonical URL added to the page.

    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.

    Thank you.

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

You must be logged in to reply to this ticket.