In short
A recommendations block on a product page offers two different things: complementary products, bought together with this one (the infuser for the teapot), and alternatives, bought instead of it (another green tea). This check means defining selection rules for each type, displaying these products as HTML links that crawlers can follow, and measuring how they are used. Once it is done, each product page points to a few genuinely related products that are in stock, and the catalog's internal linking benefits.
Why it matters
For the shopper, a well-chosen complement avoids forgetting something (“don't forget the matching infuser”) and an alternative avoids leaving the site when the product is not right. A block filled at random (unrelated “customers also viewed” items) does the opposite: it distracts and devalues the recommendation.
For search engines, these blocks are internal linking on a massive scale: across a catalog, they often provide more links to product pages than the categories do. Google discovers and crawls pages from the <a href> links present in the HTML. A block injected by a script after the page loads, or served from a URL blocked in robots.txt, passes nothing on. This is the case, for example, with Shopify recommendations loaded from the /recommendations/products endpoint, which the default robots.txt of Shopify stores disallows.
For AI assistants, explicit “pairs well with” or “cheaper alternative” links describe the relationships between products. This is contextual information, not a guaranteed lever for recommendations.
What it improves
- Average order value and conversion Add-on sales and alternatives instead of a departure. Measure it; the effect varies widely from one catalog to another.
- Crawling Deep product pages receive links from other product pages. See detect orphan pages (opens in a new tab).
- Distribution of internal links to strategic products.
- Experience An answer to “what else do I need?” and “do you have another one?”.
- Rankings An indirect effect, through crawling and internal linking.
How to check
- Presence in the HTML: fetch a product page without running JavaScript and count the links to other product pages.
curl -s https://example.com/produits/theiere-fonte/ | grep -o -E 'href="[^"]*/produits/[^"]+"' | sort -u
Expected result: the products in the block appear. If only the page itself shows up, the block is loaded with JavaScript.
- Google's rendering: in Search Console's URL Inspection tool, “Test live URL”, then “View tested page”: the block's links must appear in the rendered HTML.
- Robots.txt: if the block is loaded from a dedicated URL, test it in the robots.txt report.
- Relevance: on twenty product pages picked at random, note how many recommendations are genuinely related, and how many are out of stock.
- Usage: in Google Analytics, if the
view_item_listandselect_itemevents are sent with anitem_list_name, compare clicks per block.
How to implement
Step 1 — Define the rules
| Block | Placement | Selection rule | Number | Example for Thé des Lisières |
|---|---|---|---|---|
| Complementary | Product page, near the buy button; cart | Manual choice per product or per category, then frequently-bought-together data | 2 to 4 | Cast-iron teapot: stainless steel infuser, storage tin, sencha |
| Alternatives | Product page, below the description | Same category, same use, different price or profile | 3 to 6 | Organic sencha: genmaicha, bancha, gyokuro |
| Upsell | Product page | Same use, higher range | 1 to 2 | Sencha: gyokuro |
| Related guides | Product page | Category guide | 1 | “How to choose your green tea” |
Thé des Lisières is a fictional shop. Common rules:
- Exclude out-of-stock products from the blocks, except for announced pre-orders.
- Explicit headings: “Pairs well with”, “Complete your purchase”, “Not sure? Compare with”, rather than “You may also like”.
- No duplicates between blocks, and never the product itself.
- Variants: recommend the product, not three colors of the same one. See manage variants (opens in a new tab).
Step 2 — Make the blocks crawlable
<a href="/produits/...">links with the product name as anchor text, in the initial HTML. See use crawlable HTML links (opens in a new tab).- A carousel is fine if all its items are in the HTML; it is not if it loads the next ones on click.
- Personalized recommendations (based on the visitor's history) can stay in JavaScript, provided a fixed block, identical for everyone, also exists.
WordPress
Versions WordPress 6.8 and later (including 7.x), WooCommerce 10 and 11.
With WooCommerce, open the product, Product data > Linked Products:
- Upsells: shown on the product page;
- Cross-sells: shown in the cart, provided the cart includes a cross-sells section (with the Cart block, a “Product Collection” block set to the Cross-Sells collection). Filling in the products does not add this section.
The “Related products” at the bottom of the product page are chosen automatically from the same categories and tags; they cannot be picked in the Linked Products tab. To influence them, put the products in the same category or give them the same tags.
To exclude out-of-stock products from the blocks, enable the “Out of stock visibility” option (“Hide out of stock items from the catalog”) under WooCommerce > Settings > Products > Inventory, bearing in mind its effect on categories, or filter in the template. WooCommerce blocks are rendered on the server.
Block theme
In Appearance > Editor > Templates, open the “Single Product” template: related products and upsells are “Product Collection” blocks there (Related Products and Upsells collections). Set the number of products and the layout in each block's settings. The PHP filter used by classic themes has no effect on these blocks.
Classic theme
To set the number of related products and columns, in a child theme's functions.php:
add_filter('woocommerce_output_related_products_args', function (array $args): array {
$args['posts_per_page'] = 4;
$args['columns'] = 4;
return $args;
});
Shopify
Versions Shopify admin, Search & Discovery app and Online Store 2.0 themes, all plans, November 2026.
Shopify distinguishes related products (substitutes) from complementary products (bought in addition). In the Search & Discovery app, Product recommendations > Add recommendations, choose the product, then up to 10 complementary products; you can also choose up to 10 related products, shown on their own or before the automatically generated recommendations. The theme must include the corresponding sections on the Product template.
These recommendations are loaded with JavaScript from /recommendations/products, a URL disallowed by the default robots.txt: they serve visitors, not crawling. For a crawlable block, add a product metafield of the product reference list type (for example custom.complementaires) and display it in Liquid:
{%- assign complements = product.metafields.custom.complementaires.value -%}
{%- if complements != blank -%}
<section class="complements">
<h2>Pairs well with</h2>
<ul>
{%- for item in complements -%}
{%- if item.available -%}
<li><a href="{{ item.url }}">{{ item.title }}</a> · {{ item.price | money }}</li>
{%- endif -%}
{%- endfor -%}
</ul>
</section>
{%- endif -%}
PrestaShop
Versions PrestaShop 8 and 9, Classic theme.
On the product page, fill in the related products (accessories): the Description tab of the new product page (PrestaShop 8.1 and 9), the Basic settings tab of the old one. The theme displays them on the product page under a heading such as “You might also like”. The “Products in the same category” module adds a block of alternatives. Check in the source code that both blocks are rendered as HTML with links.
Magento
Versions Magento Open Source and Adobe Commerce 2.4.
On the product page, in the Related Products, Up-Sells, and Cross-Sells section:
- Related Products: on the product page, often with an add-to-cart checkbox;
- Up-Sells: on the product page, higher range;
- Cross-Sells: in the cart.
Automatic recommendation rules depend on the edition (Adobe Commerce offers rules and data-driven recommendations). Native blocks are rendered on the server; check those added by extensions.
Laravel
Versions Laravel 11 to 13.
Store the relationships in a typed pivot table and render them in the view:
public function complements(): BelongsToMany
{
return $this->belongsToMany(Product::class, 'product_relations', 'product_id', 'related_id')
->wherePivot('type', 'complement')
->where('in_stock', true)
->orderByPivot('position');
}
@if($product->complements->isNotEmpty())
<section>
<h2>Pairs well with</h2>
<ul>
@foreach($product->complements->take(4) as $complement)
<li><a href="{{ route('products.show', $complement) }}">{{ $complement->name }}</a></li>
@endforeach
</ul>
</section>
@endif
Next.js
Versions Next.js 15 and 16 (App Router).
Load the fixed recommendations in the product page's Server Component and render them with <Link href>; keep personalized recommendations for a client component loaded afterwards.
Step 3 — Measure and adjust
Send the view_item_list and select_item events to Google Analytics with one item_list_name per block (“complementaires”, “alternatives”). Every quarter, remove associations that are never clicked, and check that no block points to a discontinued or redirected product page. See fix links to redirects or non-canonical URLs (opens in a new tab).
Common mistakes
- Blocks entirely in JavaScript, or served from a blocked URL: invisible to crawling.
- Unrelated recommendations generated from “same brand” or “recently viewed”.
- Out-of-stock products given prominence.
- Twenty products per block: links and attention get diluted.
- Mixing complementary products and alternatives under one vague heading.
- Links with tracking parameters (
?ref=reco): they create duplicate URLs. Use analytics events instead. - Associations frozen for years, pointing to discontinued products.
Frequently asked questions
Do recommended product blocks help SEO?
Indirectly, yes, if they are rendered as HTML links in the page's code. They then create internal links between product pages, which help Google discover and crawl deep products and spread internal links. A block loaded only with JavaScript, or from a URL blocked by robots.txt, passes nothing on to crawling, even if it serves visitors.
Does Google see Shopify recommendations?
Shopify's native recommendations are loaded with JavaScript from the /recommendations/products address, which the stores' default robots.txt disallows: Google therefore does not see them as links on the product page. For a crawlable block, add a metafield listing products and display it in Liquid in the Product template. Keep the native recommendations for visitors.
How many products should you recommend on a product page?
Two to four complementary products and three to six alternatives are enough for most catalogs. These are practical benchmarks, not search engine rules. Beyond that, attention and links get diluted. Measure clicks per block with analytics events, remove associations that are never used and always exclude out-of-stock products.
Resources
- Google Search Central: make your links crawlabledevelopers.google.com
- Shopify Help: product recommendations with Search & Discoveryhelp.shopify.com
- Shopify Help: editing robots.txt.liquidhelp.shopify.com
- Google Analytics: measure ecommercedevelopers.google.com
- WooCommerce: documentationwoocommerce.com
Updated on
Topic checklist (PDF)