How to remove out of stock product from sitemap

#208401
Viewing 3 replies - 1 through 3 (of 3 total)
  • Ankit
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    You can set all the URLs you want to remove as noindex and later Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/xXXhDt

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    hi, but how can I automatically set out of stock products in noindex? is there any php hook?

    Hello,

    Thank you for the follow-up.

    Unfortunately, we do not have a dynamic way of setting the no-index option when your products are out of stock. However, in Rank Math PRO you can noindex hidden products, assuming they are out of stock:
    Out of Stock Product

    This option will help your products be set to noindex and hence not be included in the sitemap. The noindex for hidden products option does apply if you do not want the hidden product page to be included in SERPs.

    I hope that helps. Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘How to remove out of stock product from sitemap’ is closed to new replies.