How to add "no index" code to a duplicate product page

Topic summary

Goal: Duplicate a product page in Shopify, share via direct links, and prevent search engines from indexing it to avoid duplicate-content issues.

Suggested approach: Add a “noindex” directive in theme.liquid near the closing tag, scoped only to the duplicate product.

Implementation detail: Use a Liquid conditional checking the product’s ID (product.id == ID) and target the duplicate product’s ID. The provided snippet shows the conditional structure, and the noindex code is intended to be placed inside it. “Noindex” is a directive telling search engines not to index a page.

Code snippet provided: {% if product.id == ID %}{% endif %}. Replace ID with the duplicate product’s ID. Note: The actual noindex meta tag is not shown in the snippet and would need to be inserted within the conditional.

Status: The original poster plans to try this solution. No confirmation of results yet; discussion remains open.

Summarized with AI on January 2. AI used: gpt-5.

Hi, appreciate your help in advance. I need to duplicate a product so I have 2 product pages for the same product. There will be some very minor changes and this page will only be provided via direct links and won’t be visible on the main site. However, in order to do this I would want to add “no index” code so that the search engines don’t index this page or penalize me for duplicate content. Is there any way to add the necessary “no index” code to a page in shopify? Thank you for the help! David

Hello @davidv42

Welcome to Shopify community.

Yes it is possible to add noindex in theme.liquid file.

Open code editor > theme.liquid.

Search for tag.

Add the below code.

{% if product.id == ID %}

{% endif %}

Please replace the ID with your duplicate product id.

Thanks

1 Like

Thank you for your help! Really appreciate it. I will give this a try!