Hello,
Thank you for reaching out with your questions about how new pages are added to a website’s XML sitemap using default settings in WordPress.
Typically, when a new page is published and set to index, it will be automatically added to the sitemap. Drafted pages that are set to index should also be included in the sitemap. However, if a page is published but set to noindex, it will not be included in the sitemap.
Regarding 3xx redirects, they are usually not automatically removed from the sitemap. The sitemap generally includes URLs directly without following redirects.
If you have any specific concerns or if there is anything else you would like to know, please feel free to ask for further clarification.
Thank you for your understanding.
Best regards.
Sources:
Working With the News Sitemap in Rank Math » Rank Math
How to Get Your Website Listed in Google News » Rank Math
Why Isn’t My URL Included in the Sitemap? » Rank Math
How to Create HTML Sitemap Using Rank Math » Rank Math
How to Configure Sitemaps in Rank Math – Best Settings and Tips
What does “Drafted pages that are set to index should also be included in the sitemap,” mean? Does that mean it will still be added to the sitemap even if the page is in draft mode?
Hello,
Thank you for your query and we are so sorry about the trouble this must have caused.
To be included in the sitemap, a page or post must be set to index, published, and have a self-referencing canonical URL (which is automatic by default).
Rank Math’s sitemap generation is virtually done so when you visit the XML path, it is generated on the spot and looks for pages that meet the criteria we just mentioned above.
As for the drafts, those pages will not be included in the sitemap even if they are set to index
.
Don’t hesitate to get in touch with us if you have any other questions.
Thank you! Just a few more follow up questions, if a page has all that criteria but it has been redirected with a 301, will it be included in the sitemap as well? And, if we draft pages, set to noindex, will that remove them from the sitemap?
Hello,
if a page has all that criteria but it has been redirected with a 301, will it be included in the sitemap as well?
Yes, redirected URLs are still included if they meet those criteria. To exclude the pages from the sitemap, you may need to set them to noindex or unpublish/delete them on your WordPress site.
And, if we draft pages, set to noindex, will that remove them from the sitemap?
That is also correct. Noindex URLs are automatically removed from the sitemaps.
Hope that helps.
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.