Hello,
Thank you for reaching out about adding custom URLs to the Rank Math sitemap index. To include custom URLs in the Rank Math sitemap, you can create a custom sitemap file and add the necessary code to include your dynamically generated URLs.
Here are the steps to create a custom sitemap and include it in Rank Math:
-
Create a new file in your child theme folder. You can do this by navigating to WordPress Dashboard → Appearance → Theme File Editor for Classic Theme or WordPress Dashboard → Tools → Theme File Editor for Block Theme.
-
Name the new file custom-sitemap.php
and add the code provided in the article How to Create a Custom Sitemap and Include It in Rank Math.
-
In the get_sitemap_links()
function of the code, replace the example URLs with your dynamically generated URLs. Each file should contain 5k URLs, and you will have a total of 10 files located in the public uploads folder (e.g., public/uploads/1.txt
, public/uploads/2.txt
, etc.).
By following these steps and customizing the code to include your specific URLs, you can create a custom sitemap for Rank Math that includes your dynamically generated URLs.
If you need further assistance or have any specific requirements for the format of the custom URLs, please let us know so we can provide more detailed guidance.
Looking forward to assisting you further!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
How to Create a Custom Sitemap and Include It in Rank Math » Rank Math
How to Configure Sitemaps in Rank Math – Best Settings and Tips
Rank Math’s Advanced Mode – Available Module, Options & More
The #1 WordPress SEO Plugin in 2023 – Rank Math
Hello,
Thank you for contacting Rank Math support.
It will require a complex modification of the filter to include the dynamically generated URLs in the custom sitemap, which falls out of the scope of our support. You should hire a professional developer to modify the filter and help you include the custom URLs in the sitemap.
Please do not hesitate to let us know if you need our assistance with anything else.
can u point us the filters??
which v need to modify it to fix it
Hello,
The full filter and guide to creating custom sitemaps is available here: https://rankmath.com/kb/custom-sitemaps/. You can share the guide with your developer and it should be a great start.
Thank you for your patience and cooperation
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.