noindexing sold out items

#381584
  • I frequently notice SEO issues on webshops where Woocommerce is used.

    There’s an option to hide products from navigarion (both click-navigations as well as internal search functions) however if this is enabled, the product that’s hidden is still given a “<meta robots=”index, follow”> tag.

    so this just means that the page is now an orphan page – that’s not good.
    I then found out that you could write a simple script in functions.php to essentially say “if woocommerce stock status is not “instock” then –> create <meta robots=”noindex”>

    that works a treat since the product is now noindexed as it should be, but then we have the bread and butter of my question;

    Is there a way to make sure that this now noindexed product is also removed from the site’s sitemap?

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

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

    Unfortunately, we do not have a dynamic way of setting the no-index option and removing them from the sitemap when your products are out of stock.

    However, with 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.

    Hello Reinelle,

    Thanks for the response.
    I am however a bit unsure of how to understand it.
    First you say

    we do not have a dynamic way of setting the no-index option and removing them from the sitemap

    And then

    This option will help your products be set to noindex and hence not be included in the sitemap.

    And this makes me a bit in doubt – if I use the “noindex for hidden products” feature, will the product be in the sitemap, or not?

    Best regards,

    Hello,

    Apologies for the confusion.

    By dynamically, the noindexed products will not be excluded from your sitemaps if you’re using the filter to noindex them.

    However, with the Noindex Hidden products option in Rank Math PRO, they will be removed in the sitemap in real-time when the status of your products became out of stock/sold out.

    I hope that helps.

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

The ticket ‘noindexing sold out items’ is closed to new replies.