When must Shopware's SEO URL index be rebuilt?

The Citead team, updated

In short. Rebuild Shopware's SEO URL index after changing an SEO URL template with dal:refresh:index.

Definition: Shopware's SEO URL index must be rebuilt after changes to an SEO URL template so that the generated URLs are updated. The documented command is php bin/console dal:refresh:index.

Key facts

  • Shopware's SEO settings documentation says that a template change requires an index rebuild so the URLs are updated.
  • The same documentation gives php bin/console dal:refresh:index as the console command for the rebuild.
  • The SEO template settings cover product detail pages, landing pages and category pages. The page also documents Twig filters, including lower for writing a URL in lower case.
  • Shopware's development environment documentation shows shopware-cli project console as a way to run bin/console commands from the host.

What change triggers the rebuild?

The trigger is a change to an SEO URL template. Shopware's settings page describes templates for product detail pages and categories, with a separate landing page template area. It also says that filters can be integrated into the SEO template. A change from an unfiltered product name to a lower-case form is therefore a template change covered by the same rebuild instruction.

The relevant setting is the template that produces the SEO URL. Changes to unrelated metadata are outside the instruction quoted above. The documentation's reason is specific: the index is rebuilt so that the URLs are updated.

Which command rebuilds the index?

Run the command from the Shopware project directory in the environment that has access to the Shopware application and its data:

php bin/console dal:refresh:index

The command is the direct form shown in the SEO settings documentation. Shopware's developer documentation also states that shopware-cli project console runs bin/console commands from the host, so the equivalent Shopware CLI form is:

shopware-cli project console dal:refresh:index

In the documented Docker-based development environment, commands run inside the web container through docker compose exec. The same page lists dal:refresh:index alongside cache:clear and plugin:refresh as a command that can be run through the project console.

What does the index refresh apply to?

The settings documentation connects the rebuild to the URLs produced by the configured SEO templates. Shopware's developer documentation for app routes uses the same command for SEO URLs declared by apps and states that bin/console dal:refresh:index rebuilds them. This gives the command a documented role beyond the settings page while keeping the trigger in this entry limited to SEO template changes.

The command is an index refresh operation. It does not replace the template configuration itself. The template remains the place where the URL structure and available variables are defined, including the category breadcrumb loop and product fields described in the settings documentation.

FAQ

When should you run the command?

Run it after you have changed an SEO URL template. Shopware ties the rebuild to the point after the template change, when the URLs need to be updated.

Can you run the refresh through Shopware CLI?

Yes. The documented host-side form is shopware-cli project console dal:refresh:index; in a Docker-based development environment, the project console runs commands inside the web container.

Does changing a Twig filter require a rebuild?

Yes. Shopware documents filters as part of the SEO template and says that changes to the SEO template require the index to be rebuilt. The page uses lower-case URL output as a filter example.

Sources

  1. Shopware, "Shopware 6 - Settings - SEO-settings", undated
  2. Shopware Documentation, "Development Environment", undated
  3. Shopware Documentation, "SEO URLs for App Routes", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark