Preventing Woocommerce Pages from showing in Yoast’s Sitemap

Getting your Trinity Audio player ready...

By default, Woocommerce adds no index tags to certain pages. This includes pages that aren’t beneficial to search, such as Cart, My Account, and Checkout. At the same time, Yoast still shows these pages in their sitemap.

In a nutshell, what we get by default is this:

woocommerce cart checkout my account yoast


What we want is this:

yoast prevent woocommerce pages showing sitemap



The following code snippet should help remove those for you: