Skip to main content
The online Trailblazer Community becomes read-only Oct 30, 2026, as we move new community conversations to Slack. Read the FAQ

Explore SEO Meta Tag Rules

Learning Objectives

After completing this unit, you'll be able to:

  • Explain how meta tags help with Search Engine Optimization (SEO).
  • Explain the difference between meta title and meta description tags.
  • List four types of meta tags that help with SEO.
  • Describe how JSON-LD structured data supports SEO and AI discoverability.
  • Explain rule inheritance.

Optimize Your Storefront for External Search Engines

Optimizing a storefront for external search engines involves the strategic use of meta tags. These snippets of text, which describe a page's content, reside in the HTML code and are not visible on the rendered page. Meta tags provide essential information to search engines and help them understand the purpose of a page, which is vital for effective SEO. Search engine crawlers use these elements for ranking purposes and to generate the snippets displayed in search results.

As you work through this badge you learn how to optimize your site's meta tags so they highlight the most important parts of your content and make your storefront stand out in search results. Let’s start with the basics.

What's in a Meta Tag?

Page meta tags provide structured data about a web page, and they go in the <head> section of an HTML document. Here's an example of some meta tags for an e-commerce storefront that sells wedding guest dresses.

<title>Our dresses make you look stunning.</title>
<meta name="keywords" content="dress,stunning,elegant,party-dress,wedding-guest">
<meta name="description" content="Official wedding guest dresser.">

Common meta tags come in four types.

  • Title: Describes the page's content. The meta title, or page title, and the meta description are especially important because they appear on the Search Engine Results Page (SERP).
  • Description: Provides a brief description of the page that appears on the SERP as a snippet beneath the link.
  • Robots: Control how an individual page gets indexed and served to users in search results.
  • Social tags (such as open graph tags): Optimize your site for sharing products and content on Facebook, Twitter, and Pinterest.

A few other elements support SEO but aren't meta tags. A canonical URL tag is a link element in the page header that points to the preferred version of a page when similar content has different URLs. Headings (h1, h2, h3, and so on) and image alt text are page elements that search engines read to understand your content.

Compare Meta Title and Meta Description

Meta Title

This is text that customers see at the top of their browsers. It's important because search engine algorithms set a value on its keyword, which can attract search engine users to the website. A unique meta title can significantly improve a page's ranking.

Here are some tips for meta titles.

  • Give every URL a page title, and make each title unique.
  • Include the primary keywords of the page.
  • Keep the page title to 70–71 characters or less.
  • Optimize the page title for the user.

Meta Description

The meta description provides a brief description of the page that appears on the SERP each time a user runs a search. This short snippet draws attention to the content and prompts users to click the link. Meta descriptions no longer impact website rankings, but they serve as snippets for users and influence the click-through rate and traffic when customers click the links.

Here are some tips for meta descriptions.

  • Write a unique description that's relevant and specific to the page content.
  • Include some keywords, but don't overuse them.
  • Keep the description to 156 characters or less.
  • Optimize the description for the user with the Attention, Interest, Desire, Action (AIDA) principle.

Guide Crawlers with the Robots Meta Tag

The robot’s meta tag gives you a page-specific way to control how an individual page gets indexed and served to users in search results. The robot’s meta tag instructs search engines not to show a page in search results. Place it in the <head> section of a page, as shown here.

<!DOCTYPE html>
<html>
<head> <meta name="robots" content="noindex" /> (…) </head>
<body>(…)</body>
</html>

By default, Google bot indexes a page and follows links to it, so don't tag pages with content values of INDEX or FOLLOW. The robots meta tag can also instruct search engine crawlers which links to avoid following. Too many outgoing links can reduce your site's rating and lower its page rank.

Support AI Discoverability with JSON-LD

JSON-LD (JSON for Linked Data) embeds structured product and page data in a page. Search engines and AI answer engines, such as ChatGPT and Perplexity, then accurately read facts such as product name, price, and availability instead of inferring them from the page's HTML. Structured data improves organic discoverability and powers rich results, such as product cards and breadcrumbs.

Structured data appears in the page's <head> as a <script type="application/ld+json"> block. B2C Commerce supports a JSON-LD page meta tag type that you define and populate with rules, just as you do for other meta tags.

Target Pages with Meta Tag Rules

Now that you know the meta tag basics, let’s see how to use B2C Commerce to generate them on your storefront pages. B2C Commerce provides a rule-based solution that generates and manages meta tag content for your storefront. Here are the page types you target.

  • Home page
  • Product detail page (PDP)
  • Product listing page (PLP): A category or product listing page
  • Content detail page (CDP)
  • Content listing page (CLP): A content folder or content listing page

You can use the B2C Commerce Script API to generate and manage rules on the Page Meta Tag Rules page in Business Manager.

Explain Rule Inheritance

You can map all your products, categories, folders, and content, but it’s not necessary. Page meta tag rule lookup follows an inheritance scheme that cuts down the number of rule configurations you create and maintain. Rules on your root category (or folder) are visible within all child categories (or folders) and assigned products (or content). Rules inherit within the current locale context first, before the locale fallback, as defined in language settings.

Think about how this plays out. A B2C Commerce orderable product is typically a standard product that's a variation of a main product. Think of one dress style in a range of fabrics and sizes, sold across several countries, so locales are part of the equation. B2C Commerce looks first at the current locale's data to generate a meta tag. When it doesn't find data in that locale, it moves to the next set of data in the locale fallback scheme.

When B2C Commerce generates a meta tag for a product detail page, it pulls product data in this order.

  • Current product
  • Variation groups
  • Main product
  • Primary category assigned to the site for which the request is processed
  • Parent categories, up to root
  • Locale fallback, starting at the current product in the new locale

Here are the lookup rules for all the page types.

Page Type

Fallback

Product Detail Page (PDP)

  1. Current product
  2. Variation groups
  3. Main product
  4. Primary category assigned to the site for which the request is processed
  5. Parent categories, up to root
  6. Locale fallback, starting at current product in new locale

Content Detail Page (CDP)

  1. Current content
  2. Primary folder
  3. Parent folders, up to root
  4. Locale fallback, starting at current content in new locale

Product List Page (PLP)

  1. Current category
  2. Parent categories, up to root
  3. Locale fallback, starting at current category in new locale

Content List Page (CLP)

  1. Current folder
  2. Parent folders, up to root
  3. Locale fallback, starting at current folder in new locale

Next

In this unit, you learned what meta tags are and how they help with SEO. You learned that you can support both search engines and AI answer engines with JSON-LD structured data. You also learned how rule inheritance pulls data across products, categories, folders, and locales, so you configure fewer rules. Next, you learn how to create meta tag rules.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback