On any resource in the Online Store, you can create an integer metafield with namespace:seo, key:hidden, and value:1 to hide a page by removing it from the sitemap.xml and automatically adding the tag <meta name="robots" content="noindex, nofollow"> in the head. (Source: Optimize storefront SEO)
However, is it possible to do this for a published metaobject entry? You can’t create a metaobject with a namespace and key like you would for a standard metafield in any other resource, so how can you hide only one published metaobject entry from web search results? Which should be the approach here for doing the same? For SEO purposes, you may need to have metaobject pages enabled but not indexed by web crawlers.
It’s not currently possible to use the seo.hidden metafield on metaobject pages.
You’d want to modify your theme.liquid template if you have access to it to call out specific rules (like when the metaobject is defined on that page).
This means you can’t remove from the sitemap, like with the seo.hidden metafield, but you can at least throw the noindex, nofollow tag in there. It’s a curent sore spot for metaobject pages for sure.
Yeah, thanks @taylor! I’m already doing that, but still, as it appears in the metaobjects sitemap, it is not perfect, and Google lost resources by reading it there and, after that, finding a noindex, nofollow tag.
Hope the Shopify product team solve this in the future. Thanks!
For sure! Yeah, definitely not a perfect solution at the moment and because of it hard to embrace metaobject pages for all the use-cases I’d like to use them for (as they are so handy!).
Hopefully we get this ability soon in the near future.