You have the possibility to define exclusions for the sitemap via config.php or add your own URLs.
You can find the config.php in the Shopware main directory on the web server.
Please note that due to incorrect entries in the config.php your shop may not be able to be accessed (correctly). Therefore we recommend that only experienced users carry out the adjustments described below.
To integrate an additional URL into the sitemap, an entry of the type custom_urls is added.
The following information is required:
The URL "myUrl.de" should be integrated for all shops. As priority 0.4 is deposited and the change is to take place weekly.
'sitemap' => [
'custom_urls' => [
[
'url' => 'myUrl.com',
'priority' => 0.4,
'changeFreq' => 'weekly',
'lastMod' => '2019-01-01 12:00:12',
'shopId' => 0
]
]
],
If certain pages should not be listed in the sitemap, this can be defined in more detail using excluded_urls.
The following information is required for this:
Product
The product with ID 123 should not be included in the sitemap of the shop with ID 2.
'sitemap' => [
'excluded_urls' => [
[
'resource' => \Shopware\Models\Article\Article::class,
'identifier' => '123',
'shopId' => 2
],
]
],
Shopping world
The shopping world with the ID 21 is to be removed from the sitemap for all shops.
'sitemap' => [
'excluded_urls' => [
[
'resource' => \Shopware\Models\Emotion\Emotion::class,
'identifier' => '21',
'shopId' => 0
],
]
],
Category and shop pages combined
The category with the ID 246 and all shop pages should be removed from the sitemap for all shops.
'sitemap' => [
'excluded_urls' => [
[
'resource' => \Shopware\Models\Category\Category::class,
'identifier' => '246',
'shopId' => 0
],
[
'resource' => \Shopware\Models\Site\Site::class,
'identifier' => '0',
'shopId' => 0
],
]
],