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:
- In your admin select "Settings"
- Scroll down to "Custom data" in your left sidebar
- Click on "Products"
- In the top right click on "Add definition"
- In the "Name" field you can give it whatever name you like. Enter something like, "Hide from search engines"
- In the "Namespace and key" field, replace what's there with
seo.hidden
- 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"
- Click on the "Select type" button and select "Integer"
- Make sure the "One value" option is selected
- In the "Validations" section set the "Maximum value" to
1
- 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:
- Go to the admin page of the product
- Scroll all the way down to the "Metafields" section
- You will see a field with the name you used for your
seo.hidden
metafield that you created - Enter a value of
1
- 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:
- In your admin go to "Collections"
- Click on "Create collection"
- Name your collection whatever you like. Example: "Shop All"
- Add all the products of your choice using whatever conditions you like.
- Scroll all the way down to the "Search engine listing" section and click on the edit button
- Change the value in the "URL handle" field to
collections/all
- 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.