SW Shopware 6 Beginner

Automatic Internal Linking for Shopware 6

Install and configure automatic internal linking on Shopware 6: keyword rules, SEO silos and the orphan page report.

Updated Module version 1.0.0

Overview

DfInternalLinking automates internal linking on your Shopware 6 store. You define rules that map a keyword to a target page (product, category or custom URL), and the plugin turns occurrences of that keyword into contextual links inside your product descriptions and CMS content blocks.

Non-destructive injection: links are added only when the page is rendered. Your database content is never modified. Disabling the plugin removes every link without leaving a trace.

Compatibility

  • Shopware 6.5.x, 6.6.x and 6.7.x
  • PHP 8.1 or higher, according to your Shopware version requirements
  • Multi-channel: independent configuration per sales channel
  • Administration translated into English, German, French, Spanish and Italian

Installation

From the administration

  1. Go to Extensions > My extensions.
  2. Click Upload extension and select the plugin ZIP file.
  3. Click Install, then activate the extension with the toggle.

From the command line

Extract the plugin folder into custom/plugins/, then run:

bin/console plugin:refresh
bin/console plugin:install --activate DfInternalLinking
bin/console cache:clear

If you install from source rather than from a pre-built ZIP, rebuild the administration:

./bin/build-administration.sh

General configuration

Open Settings > System > Extensions, then the DfInternalLinking settings. Every option can be set globally or per sales channel.

  • Enable linking — turns link injection on or off. Default: enabled.
  • Maximum links per page — global budget of links injected on a single page, across all rules. Default: 5.
  • Silo mode — only applies a rule when its target shares a category branch with the current page. Default: disabled.
  • Add nofollow — adds the rel nofollow attribute to generated links. Default: disabled.
  • Link CSS class — class applied to every generated link so you can style it in your theme. Default: df-internal-link.

Creating a keyword rule

The plugin adds an Internal Linking entry to the Marketing menu in the administration. Click Add keyword rule to open the form.

  • Keyword — the phrase to detect in your content. Detection is case-insensitive and respects word boundaries.
  • Target type — Product, Category or Custom URL.
  • Target product / category — the selector shown depends on the chosen type. The canonical SEO URL is generated automatically by Shopware for the current channel.
  • Target URL — field shown only for the Custom URL type. Accepts an absolute URL or a relative path.
  • Maximum links per page — a cap specific to this rule, applied on top of the global budget.
  • Priority — rules are processed by ascending priority. At equal priority, the longer keyword is applied first.
  • Language — restricts the rule to a single language. Leave empty to apply it to all.
  • Sales channel — restricts the rule to a single channel. Leave empty to apply it to all.
  • Active — temporarily disable a rule without deleting it.

Start with a small number of tightly focused rules, using two- or three-word keywords. Overly generic keywords create noise and dilute your internal linking.

The plugin processes the following content:

  • The product description on product pages
  • Text and HTML content blocks on product pages, navigation (category) pages and landing pages

Parsing is performed on the HTML tree and only text nodes are processed. The following areas are always skipped:

  • The inside of existing links
  • Headings from level 1 to 6
  • Script and style tags
  • Buttons

Two safeguards complete this behaviour: Unicode word boundaries prevent any replacement inside a word, and a page never links to itself.

Silo mode

Silo mode is designed for catalogues structured into thematic universes. When enabled, a rule is only applied if its target shares at least one category branch with the page being rendered.

In practice, on a product page filed under the Hiking branch, only rules pointing to other products or categories in that branch are applied. Rules pointing to another branch are skipped. This concentrates link equity inside each silo and reinforces the thematic consistency perceived by search engines.

Custom URL rules are not subject to silo filtering, since they have no category attachment.

The orphan page report

From the rules list, click Orphan page report. The report lists:

  • Active products that no active rule targets
  • Active page-type categories that no active rule targets

Three statistics accompany each table: the total number of active items, the number of linked items and the number of orphans. Use this report as a roadmap: every orphan page is a page receiving no internal link from your catalogue.

Cache and going live

Because links are injected at render time, creating or changing a rule only appears in the storefront after the HTTP cache is invalidated.

Clear the cache after a rule editing session:

bin/console cache:clear

You can also use the cache clearing button available in the Shopware administration.

Troubleshooting

  • Check that linking is enabled in the configuration for the relevant sales channel.
  • Check that the rule is active and that its language and channel match the page being viewed.
  • Clear the storefront cache.
  • Make sure the keyword is actually present in the description, outside a link or a heading.

The global per-page budget has been reached. Raise the value in the configuration, or lower the cap on the least important rules.

A rule is skipped on some pages

Silo mode is probably active and the rule target belongs to another category branch. Disable silo mode or attach the target to the right branch.

Two competing rules target the same text. Adjust the priority: the lowest value is processed first.

Uninstalling

On uninstall, if you do not tick the keep-user-data option, the rules table is dropped. Your product descriptions and CMS content stay intact, since they were never modified.

Was this page helpful?

Still stuck? Contact support