Shopify Product that is invisible to the public but available via link

by Alfredo Pantoja

I would like to have a product which is not accessible via store navigation or listing, but can be seen (and buyable) via a private link I give out. How do I enable this in Shopify?

Products can be hidden from search engines and your store's search results using the seo.hidden metafield.

How to create the seo.hidden metafield

To create the metafield:

  1. In your admin select "Settings"
  2. Scroll down to "Custom data" in your left sidebar
  3. Click on "Products"
  4. In the top right click on "Add definition"
  5. In the "Name" field you can give it whatever name you like. Enter something like, "Hide from search engines"
  6. In the "Namespace and key" field, replace what's there with seo.hidden
  7. You can add a helpful description in the "Description" field if you like. Enter something like, "Hides the product from search engines when value is 1"
  8. Click on the "Select type" button and select "Integer"
  9. Make sure the "One value" option is selected
  10. In the "Validations" section set the "Maximum value" to 1
  11. Click the "Save" button

Enable it for any product you would like

You can now enable the metafield for any product you like - just as long as you're sure that you don't want it to appear in search engines, or your store's search results.

To hide a product:

  1. Go to the admin page of the product
  2. Scroll all the way down to the "Metafields" section
  3. You will see a field with the name you used for your seo.hidden metafield that you created
  4. Enter a value of 1
  5. Click the "Save" button

To verify that the product has been successfully hidden, you can view the product page of your online store, and select "View Source" from your browser.

You should see the following code in the source of your product page:
<meta name="robots" content="noindex,nofollow">

To have your product re-appear, simply remove the 1 from the seo.hidden metafield.

What about collections?

For most collections, you can simply not include the product you wish to hide, or create a condition that excludes the product or products you wish to hide.

However, there is one collection to watch out for. By default Shopify creates a your_shop.com/collections/all collection that includes all of your products.

In order to hide a product from the "All" collection, you will have to override this collection.

How do you override it? By creating your own collection with the same "/collections/all" URL.

Override the "All" products collection

To create your own "/collections/all" collection:

  1. In your admin go to "Collections"
  2. Click on "Create collection"
  3. Name your collection whatever you like. Example: "Shop All"
  4. Add all the products of your choice using whatever conditions you like.
  5. Scroll all the way down to the "Search engine listing" section and click on the edit button
  6. Change the value in the "URL handle" field to collections/all
  7. Click the "Save" button

Now if you go to the your_shop.com/collections/all url you will only see the products you would like to be on there.

In conclusion

Using the seo.hidden metafield, and your own overridden "collections/all" collection, you can make it so that any shopify product can be invisible to the public, but available via link to anyone who you would like to share it with.