How to hide a product on Shopify but keep it buyable

Jul 18, 2024

In this tutorial we will update our store to hide products from users and search engines, but still keep them purchasable or buyable.

This is useful for hiding products that appear as components inside a bundle - that shouldn’t be purchased separately - or for hidden products that your customer support team will link directly to users (like shipping labels).

Our example for this guide is hiding the component products associated with a Bento Box Bundle Product. These products are $0 and we don't want to sell them to customers without being included in our bento box bundle.

In this guide:

  • We will create and set a SEO Hidden metafield on products we want hidden from search engines, and on-site search.
  • (Optional) We will create a new template for "not-purchasable" products and hide the add to cart button so users can’t add the product if they do manage to find the product page through a direct link.
  • You will also need to ensure the products you want to hide are not in any collections.

Step 1 - Hide the product from search with the SEO Hidden metafield

We’ll create a metafield that Shopify uses to hide products from on-site search, search engines, and sitemaps.

  1. Open your Shopify Admin Settings page and go to "Custom Data" then click "Products".
  2. Click "add definition"
  3. Then copy the following settings into the form. (Make sure to update the default "custom.seo_hidden" to be "seo.hidden" instead.)
    1. Name: SEO Hidden
    2. Namespace and key: seo.hidden
    3. Description: 1 = true (hidden), 0 = false (not hidden)
    4. Type: Integer
    5. One Value
  4. Click save

This will create a metafield with the namespace "seo" and the key "hidden" which is a standard shopify metafield for hiding products from search on your storefront and from google.

We recommend providing yourself with a description explaining the integer field, Shopify treats this metafield as boolean (true/false). With 1 equaling true and 0 equaling false.

You’ll now be able to set this metafield on your products.

Navigate to Settings > Custom Data > Metafield Definitions > Products
Create a product metafield definition with these settings to hide the product from search engines, on-site search, and sitemaps.

Step 2 - Update your new SEO Hidden metafield on your products

  1. Navigate to a product you’d like hidden from on-site search, search engines, and sitemaps.
  2. Scroll down the page to product metafields. You should now see a field for SEO Hidden.
  3. Update this field to equal 1 (true) meaning we would like this product to be hidden from our sites search and search engines.
  4. Confirm it worked by opening your stores theme. (Wait 3 mins or so for Shopify to update with this change) Then refresh and try to search for your product.
  5. You should see no results for the product you have just hidden.

You do not need to update all products to have this value. If the field is empty it is considered ‘0’ or ‘false’ and will not be hidden.

On your product settings page, at the bottom, you'll see the new SEO Hidden metafield, which you can set to '1'
Confirm the product no longer appears in on-site search results after waiting a few minutes after setting the metafield

Step 3A - Remove the buy buttons from your product template

Now we will create a template with the add to cart button removed and assign this template to our hidden product.

This step is optional, and will prevent users from adding the product to cart if they land on the page directly.

If you just want products hidden from site, but still want users to purchase them individually, you can skip this step and link users directly to the product page.

  1. Navigate to Online Store > Themes and then open your theme editor by clicking "customise" on the live theme.
  2. Inside the theme editor, open the dropdown in the middle of the header and select products, then click "Create template"
  3. Name the new template to "not-purchasable" so it is clear when we assign it to hidden products and click create.
  4. For ‘Based on’ choose your default product template, or the template you want to copy for this process.
  5. Now we can remove the block in our theme called "buy buttons". If you can't see one by this name it may be called "add to cart button" or something similar.
    1. Some themes may also have this inside a block called “form”.
    2. All themes are different so it may take some investigation to see where your theme has this setting.
  6. For extra measure we can add a text block to mention "This product is not for individual sale".
  7. Save your new "not-purchasable" template.
Create a new product template in your theme. Make sure you are in the 'Products' templates menu.
Name the template and base it on your default template (or another if you prefer)
Look for the 'Buy buttons' block in your template. It may be named something different, or may a setting inside a block called 'form'. Remove/Hide the block or disable the setting.
For good measure - try adding a text block to let the user know the product cannot be purchased individually or directly from this page.

Step 3B - Assign the hidden product to the new product template.

  1. Navigate to the product you want to hide inside Shopify Admin area under Products.
  2. Scroll down to the "Theme template" setting in the sidebar of the edit product page.
  3. Change ‘Default product’ to ‘not-purchasable’ and click save.
    1. Note - only templates in your live theme appear on this list. Templates in unpublished themes will not appear.
  4. Confirm it worked by opening your stores theme, and navigating to the product.
    1. If you just completed the SEO Hidden step then you will need to copy the products url from the ‘Search engine listing’ card as your product is hidden from your themes search now.
On your product settings page, set the theme template to 'not-purchaseable'. This setting only includes templates from your live theme.
You can find your products direct URL in the 'Search engine listing card' at the bottom of your product settings page.
Take a look at the front end of your store and you should no longer see a buy button on this product!

Further work - Grid items and Quick Add To Carts

We have just covered 90% of the possible ways for customers to find and add a hidden product to cart.

However there is one more way... product grid items - especially in automatic recommended products that have Quick Add To Cart buttons.

You can turn off the Quick Add To Cart setting in your theme, or follow along in our future guide for hiding quick add to cart buttons for products with a specific tag.

CREATE BEAUTIFUL BUNDLES.

BUNDLES AND KITS
ON SHOPIFY

Maximise your average order value with mix-and-match bundles and kits.

  • Create mix and match packs, build-a-set bundles and more
  • Discount options for fixed price, sum of selections, or amount/percentage off.
  • Customise the look inside the theme editor with advanced options for developers
  • Discounts applied to line items, so you can still use discount codes at checkout