Creating Promotional Products that are not visible without a unique URL

Highlighted
Tourist
6 0 5

Hay, Everyone. 

I want to run a promotion for a product that a highly discounted rate, (maybe free). I do not want this product to show up anywhere where a user can browse to it or search it. (either on the site or on Google etc.) I want to have a url that is unpublished, (Sort of) 

Any idea how to do it. 

Thanks. 

Jason

rabbitholehay.com

<script src="safari-extension://com.ebay.safari.myebaymanager-QYHMMGCMJR/ee0f628e/background/helpers/prefilterHelper.js" type="text/javascript"></script>
0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
400 0 68

Hi Jason,

Britton here with the Shopify support team.

You can get a product which can't be found via Google in this way by following two steps:

  1. Set up an alternate product template
  2. Including a "nofollow" meta tag to tell Google not to index that page

Meta tags should in general go into the <head> section of your theme.liquid file. This template will influence all of the pages for your store though. This means we need some conditional formatting to ensure that your meta tag only affects your new product template. Here is an example of the code that I used: 

{% if template == 'product.test-product' %}
  	<meta name="robots" content="noindex">
{% endif %}

The name of my new product template in this case was product.test-product.liquid. Make sure that you update the code to reflect the name of your custom template. This code can go anywhere you like inside the <head> tag of theme.liquid.

The last step is to set up your product to use the new template. You can do that right on the product page. As long as you don't feature your new product in any collections or link to it anywhere then it will not be easily findable on your store. The only method that would be able to find this product now would be directly searching for it on your store search bar. If you want it to be hidden from that as well you could use this code.

I hope that helps!

-Britton

Britton Shopify Guru
1 Like
Highlighted
Shopify Expert
9928 104 1765

As a sidenote, if you're also looking to remove the product from the sitemap, take a peek at this doc:
https://docs.shopify.com/api/tutorials/hide-from-search-engines-and-sitemaps

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
1 Like
Highlighted
Navigator
1137 0 121

You might also want to update your site search results page to skip showing those items in the result.

http://www.StandoutDesigns.com ::: Solid Wood TV Furniture for Enthusiasts. Made in USA.
0 Likes
Highlighted
Tourist
6 0 5

Thanks everyone. This was super helpful. 

I got everything done except removing from the sitemap per Jason's suggestion. 

It seems pretty clear what code needs to be put in, I'm just not positeve where I am to put it. 

In one of the .JSON files? 

In the new template.liquid file that was created in Brittons instructions. 

 

Thanks for any help. I appreciate you guys! 

Jason

 

0 Likes