About
Globo is the company specializing in website design and development in Vietnam.
18 Khuc Thua Du Street, HN
globosoftware
[email protected]
Follow Us

Hide add-on products from SEO and from the Shopify frontend search with metafield

You are here:
Estimated reading time: 1 min

Use product metafields to hide addon products from SEO engine

As you know, our app provides an add-on function to increase the main product price when choosing a specific option value – of course – these add-on products are not for sale.

In this guideline, we will help you to hide these add-on items from:

  • SEO
  • Shopify predictive search
  • Shopify search page

There are two main steps to achieve that:

  • Step 1: Create a custom definition
  • Step 2: Bulk add meta field to add on products
Create a custom definition

Steps to manage

  1. From your Shopify admin, go to Settings > Custom data.
  2. Select Product
  3. Click Add Definition.
  4. In the Name field, enter a name for your definition, and then select the name that you entered from the list. For example, “SEO Hidden”.
  5. In the Namespace and key field, edit the default identifier for your metafield. For example, “seo.hidden”.
  6. In the Access option, select Storefronts.
  7. Click Select type, and then select “Integer”.
  8. Click Save to finish.
Bulk add metafield to add on products

Steps to manage

  1. From your Shopify admin, go to Products – or go to https://admin.shopify.com/store/example_store/products?selectedView=all&tag=globo-product-options
  2. Select all add-on products in the list.
  3. Click Bulk edit.
  4. Click Columns
  5. Scroll down to the bottom of the Metafields group, and select SEO Hidden.
  6. In the SEO Hidden column, enter the “1” value for each Add-on product.
  7. Click Save to finish.

Hide add-on product pages from search engines

Steps to manage

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code.
  3. Click the theme.liquid layout file.
  4. To exclude the add-on product page, paste the following code in the <head> section.
    {% if product.tags contains 'globo-product-options' %}
    <meta name="robots" content="noindex">
    {% endif %}
  5. Click Save.
Was this article helpful?
Dislike 7
Views: 1109