-
Dear Sir / Madam,
I set noindex to many posts however RankMath still displays them in my sitemap. Can you fix this bug?
Best regards,
Can
-
Hello,
We apologize for the issue you are facing with your sitemap displaying posts that are set to noindex. This behavior can occur if the custom canonical URLs are set for those posts, as Rank Math includes a self-referencing canonical for all posts that are set to index. If a custom canonical is added, it will not appear in the sitemap.
To resolve this issue, you can remove the custom canonical from the posts you want to be included in the sitemap. This will allow Rank Math to generate the canonical URLs correctly and include them in the sitemap.
If you need further assistance or if this does not resolve your issue, please reply to this ticket, and a human agent from the Rank Math Support team will take over and assist you further.
Thank you for raising this concern!
Sources:
How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank MathHello,
Could you please share some of the URLs that are still appearing in your sitemap so we can check? You can add it to the sensitive data section by editing your first post
It is completely secure, and only our support staff has access to that section.
Meanwhile, please follow these steps to flush your sitemap cache:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/3. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:
/** * Filter if XML sitemap transient cache is enabled. * * @param boolean $unsigned Enable cache or not, defaults to true */ add_filter( 'rank_math/sitemap/enable_caching', '__return_false');If you’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/Looking forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
In this case, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
The URLs you have shared in the sensitive data section are still in the published status on the site and are set to index:
Since they are published and set to index, they will be included in the sitemap. Instead of changing the title to 404 – Not Found, you should move them to trash or set them to nonidex to exclude them from the sitemap.
Please do not hesitate to let us know if you need our assistance with anything else.
Hello, I noticed that saving changes doesn’t keep my settings. I set a page to noindex and saved, then went back, it didn’t keep the setting. Thanks for your interest.
Hello,
Please share the affected page with us so we can investigate this further.
We look forward to hearing from you.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
We checked your website and found that Rank Math REST Routes that we use to update the data are being blocked on your website and most likely this is why you’re facing the issue. Please check the screenshot in the sensitive data section for reference.
In order to resolve the issue, we suggest you get in touch with your hosting provider and ask them to whitelist the following route:
/wp-json/rankmath/v1/updateMetaLet us know how it goes. Looking forward to helping you.
Thank you.
Hello, I don’t have a hosting provider, it’s my own server. Could you please give me an example to configure modsecurity in order to whitelist these files:
/wp-json/rankmath/v1/updateMeta /wp-json/rankmath/v1/updateSchemas /wp-json/rankmath/v1/updateRedirection /wp-json/rankmath/v1/getFeaturedImageId /wp-json/rankmath/v1/getHeadHello,
You can see examples of how to whitelist URLs in ModSecurity: https://samhobbs.co.uk/2015/09/example-whitelisting-rules-apache-modsecurity-and-owasp-core-rule-set
We won’t be able to give you specific instructions as that is outside the scope of our support.
If you are not familiar you need to get in touch with an experienced systems administrator.
Thank you.
Thank you for your interest.
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on
https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-postabout your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.
The ticket ‘Sitemap problem’ is closed to new replies.