How to Hide Collections in Shopify to Avoid Soft 404 Errors

Empty Shopify collections often show up in Google Search Console as soft 404s: pages with no useful content that still return 200 OK. A seo.hidden metafield removes them from the XML sitemap and adds a noindex robots tag, without deleting the collection.

Key takeaways: hiding empty Shopify collections

  • Empty collections that return 200 OK are often reported as soft 404s in Google Search Console.
  • A seo.hidden metafield set to 1 removes a collection from the XML sitemap and outputs a noindex, nofollow robots tag.
  • It also hides the collection from your storefront search.
  • If a collection will never be restocked, delete it and redirect its URL instead.

Empty collections in a Shopify store are a common source of soft 404 reports in Google Search Console. A soft 404 is a page that has no useful content but still returns a 200 OK status code. According to Search Engine Journal, soft 404 errors can harm your SEO.

The fix is to hide empty collections from the XML sitemap, so search engines stop being pointed at them. On a store that is already live, the empty collections are probably indexed too. The metafield below handles both: it removes the collection from the sitemap and adds a noindex robots tag to its page.

Before you hide a collection, check two things. The metafield also removes the collection from your storefront search, so customers will not find it there either. And if a collection will never have products again, delete it and redirect its URL to the closest live collection instead of hiding it.

Go to Settings, then Custom data (#1), then Collections (#2). You can also add the same metafield to products (#3):

Shopify Settings, Custom data metafield definitions with Collections and Products marked

Name the field (for example, SEO Hidden), set Namespace and key to seo.hidden (#1), and add a description for your staff (#2). The description shows in the admin, not on the storefront. Choose type Integer with One value (#3), and set the minimum to 0 and the maximum to 1 (#4):

Shopify collection metafield SEO Hidden: namespace seo.hidden, integer, one value, min 0 and max 1

Here is how it looks when editing a collection. Set the value to 1 to hide that collection:

Shopify collection editor with the SEO Hidden metafield set to 1 to hide that collection

The page <head> then includes the robots meta tag:

Shopify page head showing meta robots noindex, nofollow output for a hidden collection
CLIENTS WE HAVE WORKED WITH
Tower London
Out and Out
Bedstar
Hunter Boots
Care Fertility
Aroma Zone
Interflora
Unbiased
Vera John
Bubble
Mint Outdoor
EsportsJunkie
Magna Valor

Ready to Improve Your SEO?

Contact us for a free assessment—no commitment required.

Built with ssg