Orange Collar Media
Orange Collar Media
DOCS
OCMLABS/MODULE-SEO · ROBOTS & CANONICAL

Magento robots meta and canonical tags for products, filtered categories, and paginated pages

  • Magento
  • Adobe Commerce
  • Hyvä

Robots

For each page, the robots meta value is chosen in this order:

  1. The page’s own Robots override, set in the SEO panel or with the dashboard’s Set Robots mass action.
  2. The store-wide rule for the page type.
  3. Magento’s own default.

The per-page override offers Use Default, index, follow, noindex, follow, and noindex, nofollow. The store-wide rules are set in Stores > Configuration > OCM Labs > SEO > Robots:

RuleDefault
Catalog Search Resultsnoindex, follow
Filtered Category Pagesnoindex, follow
Paginated Category Pages (beyond page 1)Use Default (inherit)

What counts as a filtered category page

A category page counts as filtered when layered navigation filters are active. Tracking parameters such as utm_source do not count, and neither do sorting, paging, or view-mode parameters, so a category link shared with campaign tags is not treated as a filtered page.

Canonical tags

With Manage Canonical Tags on (the default), the module owns the canonical tag. It removes Magento’s canonical tag, including one added through layout by a theme or another module, before adding its own, so a page never carries two. With it off, Magento’s own canonical settings apply untouched.

How-to: set the canonical URL on any page, 1:07
SettingOptions
Product Canonical URLNo category path (the product’s own URL, default), Shortest category path, or Default (first) category path
Filtered Category CanonicalUnfiltered category URL (default) or Self (filter parameters kept)
Paginated Category CanonicalSelf (page parameter kept, default) or First page of the category

Per-page override

The Canonical URL field in the SEO panel overrides all of the settings above for that one product, category, or CMS page. It accepts:

  • An absolute http:// or https:// URL, for example to point a duplicate product at the one you want indexed.
  • A root-relative path starting with /, for example /gear/bags.html.

Anything else, such as a javascript: URL, a protocol-relative // address, or a path without a leading slash, is rejected. Like every module-only SEO value, the override can be set per store view, and an empty store-view value inherits the default.

Caching

Changes to the store-wide robots and canonical settings show on pages as they are generated. Flush the full page cache after changing them to see the change on cached pages.

Changes to a single page do not need a flush. When a save, or the dashboard’s Set Robots mass action, changes a robots or canonical value, the module cleans that page’s own cache tag, so the full page cache and Varnish serve the new value on the next request.

Other SEO extensions

Extensions such as Amasty or MageWorx SEO that also set canonical tags or robots values will fight this module for the same tags. Switch off the overlapping feature in one of the two, or turn off Manage Canonical Tags here to hand the canonical tag back.