Change default sitemap URL

#1119954
  • Resolved William Van Laere
    Rank Math free

    Hi,

    I was wondering if it’s possible to change default sitemap url from sitemap.xml to something else? I want to personalize it so competitors can’t easily find the sitemap. I will submit this sitemap through GSC/BING.

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

    We apologize for the issue you are facing. Unfortunately, Rank Math does not provide an option to change the default sitemap URL from sitemap.xml to a custom URL. The sitemap is typically set to be accessible at the standard location for ease of use and compatibility with search engines.

    However, you can still take steps to secure your sitemap by using the robots.txt file to restrict access or by ensuring that it is not easily discoverable through other means. If you need further assistance with this or have any other questions, please feel free to reply to your ticket, and a human agent from our support team will assist you further.

    Thank you for raising this concern!

    Sources:
    How to Configure Sitemaps in Rank Math – Best Settings and Tips

    Hello,

    Yes, you can change/rename your sitemap using a filter.

    Here’s the code you can use and customize:
    https://rankmath.com/kb/filters-hooks-api-developer/#modify-sitemap-index-slug

    Looking forward to helping you.

    Hi,

    Will this also stay when I update rankmath?

    Hello,

    Yes, the filter will remain active even if you update the Rank Math plugin but if you directly add the filter to your main theme’s functions.php file, it will be removed after updating your theme.

    That’s why we suggest using the filter code to your child theme or any external plugin like Code Snippet.

    Here’s how you can crate a create a child theme on your website: https://www.hostinger.com/tutorials/how-to-create-wordpress-child-theme

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    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 4 replies - 1 through 4 (of 4 total)

The ticket ‘Change default sitemap URL’ is closed to new replies.