You can exclude the product attributes directly from the Yoast SEO → XML Sitemaps → Taxonomies (tab).
Every time new attribute taxonomy is created, it creates a new sitemap with a default value IN SITEMAP. This indexes a bunch of URL’s which I don’t want to keep indexed. Is there any way to change the default value to NOT IN SITEMAPS for all product attributes?
@martin1982 Unfortunately, there is no such option to exclude the product attributes from the sitemap automatically. You’ll need to manually exclude them from the sitemaps option.
Hi @martin1982
There are couple options:
- I think that Yoast WooCommerce SEO plugin supports something similar.
- Make PHP code. You can use filters wpseo_sitemap_exclude_taxonomy and wpseo_robots (you need to set noindex, it doesn’t make sense to only exclude them). Maybe I can write some example.
- Very simple solution (I use it because I don’t need product archives for them): Uncheck ‘Enable Archives’ when you are creating new product attribute. I’m not sure that works for you, but I use them only as filters and it’s perfect solution for me.
Sasa