Skip to content
Stone & Water
Use Case

Shopware SEO URL patterns per shop: product URL structure with examples

With category path or short, with brand or product number, a URL of its own for every variant: in Shopware a pattern defines what product URLs look like. This page shows what makes a good product URL, which patterns suit which shop and how to set a pattern of its own per sales channel in the PIM.

5 min readFor Shopware 6.6 and 6.7

What the PIM does here
  • Patterns from variables: name, product number, manufacturer, EAN, category path, options, properties and more, inserted with a click.
  • A pattern of its own per shop: every sales channel can get its own pattern, all others use the default pattern.
  • Switch safely: preview with sample products, dry run, old URLs as 301 redirects.
  • Clean slugs: umlauts are converted, duplicate separators merged, every language gets its own URL.

What makes a good product URL

  • Readable: words instead of IDs, so customers and search engines see right away what it is about.
  • With the search term: the product name belongs in it, for spare parts often the product or manufacturer number too.
  • Stable: if the URL changes, a redirect is needed. A pattern that shifts with every range change costs rankings.
  • Unique: two products must not share a path in the same shop and language.

Whether the category path belongs in it is a trade-off: it gives context, but makes URLs longer and changes when categories are restructured. For large, stable catalogues it often works well, for shops that restructure often a short URL is more robust.

Six patterns for typical shops

GoalPattern (step 1)Result
With category path, typical for B2C{mainCategoryPath}/{name}grills/gas-grills/gas-grill-boston-3
Short and flat{name}gas-grill-boston-3
Brand in the path{manufacturer}/{name}grillmaster/gas-grill-boston-3
With product number, typical for B2B and spare parts{name}-{number}air-filter-premium-lf-2040
A URL of its own per variant{mainCategoryPath}/{name}-{options}shirts/basic-shirt-red-xl
With an extension as before{name}.htmlgas-grill-boston-3.html

The top category level, usually the home page or "Catalogue", stays out of the path as long as "Include top category level" is off. An empty {options} on the main product leaves no superfluous hyphen.

A pattern of its own per shop

If you run several shops in one installation, they often need different URLs: the consumer shop with category path, the B2B shop short with product number. With "Custom pattern per shop" every sales channel gets its own pattern:

  1. Config matrix, "SEO URLs" tab: set the default pattern, for example {mainCategoryPath}/{name}.
  2. "Add pattern for shop": choose the sales channel and enter its pattern, for example {name}-{number}.
  3. Same for step 2: the Twig pattern Shopware stores as the SEO URL template also exists per shop.

Shops without a pattern of their own use the default pattern. The PIM writes the path per shop into a custom field of its own, so the shops do not get in each other's way.

How to switch the URLs

  1. Step 1, "Generate URL in custom field": choose shops and languages. The pattern is resolved per product, variant and language.
  2. Step 2, "Generate SEO URLs": the Twig pattern reads the field and is stored as the Shopware template. A later reindex therefore produces the same URLs.
  3. Check the options: "Keep old URLs as 301" and "Only generate missing SEO URLs" are on by default.
  4. Dry run first: it shows written, unchanged and skipped URLs and conflicts without writing anything.
Migrated shops: for products with a migrated old URL, the Twig pattern can keep it and build only new products with the new pattern. The rankings of the old URLs are kept.

All variables and options: SEO URLs: guide. How Shopware builds URLs from templates: Shopware SEO URL template explained.

Frequently asked questions

Can I use a different URL pattern per sales channel in Shopware?

Yes, with "Custom pattern per shop" in the PIM. Shops without a pattern of their own use the default pattern.

Should the category path be in the product URL?

It is a trade-off. It gives context, but makes URLs longer and changes when categories are restructured. For frequent restructuring a short URL is more robust.

Does every variant get a URL of its own?

Yes, with {options} in the pattern, for example {mainCategoryPath}/{name}-{options}.

What happens to the old URLs?

With "Keep old URLs as 301" they stay as redirects. The option is on by default.

What if two products produce the same URL?

The first product gets the path, the second is reported as a conflict with its product number. A pattern with {number} avoids this.

Further reading