Exploring Shopware: SEO Settings in Shopware 6

By default, Shopware 6 offers several useful settings that dramatically improve the visibility of your e-commerce website from the perspective of search engines. Below, we explore the SEO settings of Shopware 6. You will learn how to find the corresponding configuration page and what optimizations it contains. We shed light on SEO-URL templates, describe other SEO settings, and explore how to rebuild the SEO index in Shopware 6

Note that we provide Shopware integration with external platforms. Contact our support for further information or try our Improved Import & Export Extension for Shopware.

SEO Settings in Shopware 6 Admin

Let’s see how to find the SEO Settings screen in the Shopware 6 administration:

  • Go to your Shopware 6 administration;
  • Open its main menu;
  • Proceed to the Settings section;
  • Open the Shop subsection;
  • Hit the SEO icon.

Shopware 6 SEO settings

Here, Shopware 6 offers tools that let you define the structure of optimized URLs for your product and category pages. The system offers numerous variables for implementation.

SEO URL Templates in Shopware 6

While creating SEO URL templates in Shopware 6, you can generate individual schemas per sales channel. Use the Sales channel section to select what you need. At the same time, you can apply the configuration globally for all sales channels.

Shopware 6 SEO settings

Product page

The Product detail page section lets you specify a template for product pages, optimizing their URLs in bulk. Specify variables in Twig format as follows:

Pay heed to a symbol situated next to the field. It indicates whether the variables stored in the SEO template are valid by displaying a green tick. If you see a red X, it means that at least one variable unsupported or incorrect. 

Choose variables from the field on the right. It lets you select designations and add them to the SEO-URL template.

Also, note that there is a preview below.

Shopware 6 SEO settings

However, things get complicated when you need to add a multi-level variable. They always require manual adjustments in the SEO template field. You can find the complete variables in the list below.

Take a look at the following variable:

In the selection on the right, it displays as follows: 

Since we deal with a multi-level variable, it requires the complete specification of the further level. Otherwise, your SEO URL template won’t work. You need to manually adjust it with the following snippet:

Below, you can see a few variables used in product page SEO URL templates:

Order number – {{ product.productNumber }} 

  • ID – {{ product.id }}
  • Name – {{ product.name }}
  • Description – {{ product.description }}
  • Manufacturer name – {{ product.manufacturer.name }}
  • Manufacturer ID – {{ product.manufacturerId }}
  • Breadcrumb – {% for part in product.mainCategory.breadcrumb %}{{ part }}/{% endfor %}
  • Price – {{ product.price }}
  • Available stock – {{ product.availableStock }}
  • Weight – {{ product.weight }}
  • Width – {{ product.width }}
  • Height – {{ product.height }}
  • Length – {{ product.length }}
  • Assigned category ID – {{ product.categoryTree }}
  • Meta Title – {{ product.metaTitle }}
  • Meta description – {{ product.metaDescription }}
  • Meta title – {{ product.metaTitle }}

Proceed to the official documentation to see the full list of variables.

Category page

This section provides the ability to adjust the category page SEO URL template. Since Shopware 6 relies on breadcrumb, you have to deal with the default category structure. However, it is possible to adjust the template for categories. You can use the following variables: 

  • Breadcrumb – {% for part in category.seoBreadcrumb %}{{ part }}/{% endfor %}
  • ID – {{ category.id }}
  • Name – {{ category.translated.name }}
  • Description – {{ category.description }}
  • Meta Title – {{ category.translated.metaTitle }} 
  • Meta Description {{ category.translated.description }} 
  • Category – {{ category }}
  • Parent category ID – {{ category.parentId }}
  • Category level – {{ category.level }}
  • Parent category – {{ category.parent }}
  • Subcategory – {{ category.children }}
  • Keywords – {{ category.translated.keywords }}
  • SEO Urls – {{ category.seoUrls }} 

Proceed to the official documentation to see the full list of variables.

Filtering

In addition to the SEO enhancements mentioned above, Shopware 6 also lets you integrate filters into the SEO template. As a result, you can create URLs in lower case only. So, how to add filters to SEO URL templates in Shopware 6? 

Use “|” to create filters.

Place filters behind the variable within “{{}}”.

Let’s assume that you have the following SEO URL template:

You can add a filter to it as follows:

Things get more interesting when the FOR loop enters the game. You can add it to the {{ part|lower }}. For instance, your category SEO URL template looks as follows:

When you add a filter to it, the template gets the following appearance:

Shopware 6 provides the ability to use the Twig filters

Forwarding behavior

Shopware 6 provides the ability to output an HTTP 301 redirect when URLs are changed. You can use this feature instead of setting Canonical URL redirects to the most recent URL. If the function is disabled, store visitors don’t get a redirection note.

Shopware 6 SEO settings

Updating SEO index in Shopware 6

After you’ve applied changes to the Shopware 6 settings, it is necessary to update your SEO index. When the new SEO template is ready, go to the console and use the following command:

How to import SEO templates to Shopware 6

Importing SEO templates to Shopware 6 doesn’t make any sense, since they are individual per each store. However, you may need to transfer other SEO optimizations, such as product and category metadata. If you need to do that, you’ve come to the right place. With the help of our team, there is no need to recreate things manually. You can simplify and automate this process with the proper import procedure. Contact our support for more details and try our Improved Import & Export Extension for Shopware. You can use it to import any entity to Shopware 6, including products and categories that already include metadata.

Shopware 6 SEO Settings FAQ

How to find SEO settings in Shopware 6?

The Shopware 6 SEO settings are situated under Settings -> Shop -> SEO.

How to add SEO URL templates for product pages in Shopware 6?

Go to Settings -> Shop -> SEO to add new SEO URL templates for product pages there, using variables. Follow the instructions provided in this article.

How to add SEO URL templates for category pages in Shopware 6?

Go to Settings -> Shop -> SEO to add new SEO URL templates for category pages there, using variables. Follow the instructions provided in this article.

How to enable HTTP 301 redirects in Shopware 6?

You can enable HTTP 301 redirects in Shopware 6 under Settings -> Shop -> SEO.

How to update the SEO index in Shopware 6?

After you’ve applied changes to the SEO settings, it is necessary to reindex them. You can update your SEO index in Shopware 6 with this command: php bin/console dal:refresh:index

Related posts

Discover more from WHO WILL CARE eCommerce

Subscribe now to keep reading and get access to the full archive.

Continue reading