Mastering BigCommerce Product Page Indexing: A Guide to Conditional Noindex Tags

Mastering BigCommerce Product Page Indexing: A Guide to Conditional Noindex Tags

As e-commerce experts, we often encounter scenarios where not every product page should be indexed by search engines like Google. This could be for various reasons: managing duplicate content, temporarily hiding products, showcasing internal-only items, or dealing with product variations that don't warrant individual search visibility. The ability to apply a noindex tag conditionally is a powerful SEO tool, and BigCommerce provides a robust way to achieve this through Stencil theme customization.

A recent discussion on the BigCommerce forum highlighted this exact need: "Can the functionality be added to enable having the ability to make Products Pages with a Non-Index Tag for Google?" The community quickly provided an elegant and actionable solution, demonstrating the flexibility of the BigCommerce platform for advanced SEO control.

The BigCommerce Solution: Custom Fields & Stencil Theme Customization

The core of the solution lies in combining BigCommerce's product custom fields with Stencil theme modifications. This allows merchants to flag specific products for no-indexing directly within the control panel, and then have the theme dynamically render the appropriate meta tag.

Step-by-Step Implementation Guide:

Here's how to implement conditional noindex tags on your BigCommerce product pages:

  1. Create a Product Custom Field:

    For each product you wish to exclude from search engine indexing, add a custom field. The name of this field is flexible, but it must match what your theme will check for. A common and descriptive choice is seo_noindex with a value of true. For example:

    • Field Name: seo_noindex
    • Field Value: true

    This field will act as your toggle for the noindex directive.

  2. Modify Your Stencil Theme (product.html):

    Access your theme files (typically via WebDAV or the BigCommerce Theme Editor). Navigate to templates/pages/product.html. Inside the existing {{#partial "head"}} block, you will add a conditional statement using Stencil's Handlebars syntax:

    {{#any product.custom_fields name='seo_noindex' value='true'}}
        
    {{/any}}

    This code snippet checks if the current product has a custom field named seo_noindex with a value of true. If it does, it injects the tag into the page's section.

    Why "noindex, follow"? Using follow instead of nofollow is crucial. It tells search engines not to index the specific page but still allows them to crawl and pass link equity through any links on that page to other parts of your catalog. This helps maintain your site's overall link structure and SEO value.

  3. Hide Custom Fields from the Storefront (Important Caveat):

    By default, custom fields often render on the storefront, which means your "seo_noindex: true" might appear on product pages. To prevent this, you'll need to adjust how custom fields are displayed in your theme. A common pattern involves wrapping the custom field display logic with a conditional check:

    {{#if name '!==' 'seo_noindex'}}
        
    {{/if}}

    This ensures that the seo_noindex field is used for its intended purpose (SEO control) without cluttering your product page content for customers.

  4. Crucial SEO Best Practice: Do NOT Block in robots.txt:

    A critical point emphasized by the community is to never block these URLs in your robots.txt file. For Google (and other search engines) to discover and respect the tag, it must be able to crawl the page. If you block the page in robots.txt, Google can't read the noindex directive, and the URL might still appear in search results, often as a bare title without a description.

Key Takeaways for BigCommerce Merchants & Developers

  • Granular Control: This method provides precise, product-level control over indexing, a significant advantage for complex catalogs.
  • SEO Integrity: Using noindex, follow preserves link equity, ensuring your internal linking structure remains robust.
  • Theme Customization: While it requires a small Stencil theme modification, it's a straightforward process for anyone familiar with BigCommerce theme development.
  • Avoid robots.txt Pitfalls: Always remember that noindex requires crawling, not blocking.

This community insight demonstrates how BigCommerce's flexible architecture, combined with Stencil's powerful templating, empowers merchants and developers to implement advanced SEO strategies effectively. For businesses migrating to BigCommerce or optimizing their existing stores, understanding these customization capabilities is key to unlocking full e-commerce potential.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools