# Canonical and/or SEO url:s for variants?

**URL:** https://forum.shopware.com/t/canonical-and-or-seo-url-s-for-variants/105779
**Category:** General Questions (EN)
**Created:** [7. November 2024 um 10:35 UTC](https://forum.shopware.com/t/canonical-and-or-seo-url-s-for-variants/105779 "2024-11-07T10:35:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![magnus](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/magnus/32/13222_2.png) [@magnus](https://forum.shopware.com/u/magnus)
#### Post date: [7. November 2024 um 10:35 UTC](https://forum.shopware.com/t/canonical-and-or-seo-url-s-for-variants/105779/1 "2024-11-07T10:35:24Z")

</div>

Hey  
What do you use and which one is „best“?  
For my products with different colors, I have set Canonical url:s to „on“ and selected one of the colors. But checking the site with Ahref gives a lot of error about „Canonical URL has no incoming internal links“

The URL looks like this:  
`https://bytadiskbank.se/detail/018d36047047727ca296b1b28cd0fd39`

The selected variant for canonical URL have this URL:  
`https://bytadiskbank.se/Dalago-45-F-Silgranit-8-faerger`

- Is it not bad for SEO having an URL like the first one with some random numbers?
- Should I set the SEO Url for each variant? (To avoid the random numbers)
- How does Canonical URL and SEO URL „works together“ in Shopware? Do I need to set both of them (for the main product)?

Sorry for the unstructured questions - but I’m so confused 🤪

// Magnus

---

<div class="post-metadata">

### Author: ![aleximi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/aleximi/32/13313_2.png) [@aleximi](https://forum.shopware.com/u/aleximi)
#### Post date: [13. März 2025 um 15:17 UTC](https://forum.shopware.com/t/canonical-and-or-seo-url-s-for-variants/105779/2 "2025-03-13T15:17:34Z")

</div>

HI Magnus,

We see a similar phenomena in 6.5.8.7  
How is your URL template configured?

My current assumption is that product names might have duplicates among variants and so cause the seoUrl() in twig not to get a speaking URL.

 ![URL template](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/8/a/8a38194730fd7cae25a3fc8dacb738d9f0872ea0.png)

But that’s just a wild guess.  
Alex

---

<div class="post-metadata">

### Author: ![aleximi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/aleximi/32/13313_2.png) [@aleximi](https://forum.shopware.com/u/aleximi)
#### Post date: [13. März 2025 um 15:18 UTC](https://forum.shopware.com/t/canonical-and-or-seo-url-s-for-variants/105779/3 "2025-03-13T15:18:30Z")

</div>

I just checked `https://bytadiskbank.se/Dalago-45-F-Silgranit-8-faerger` and you might have solved it?

---

<div class="post-metadata">

### Author: ![magnus](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/magnus/32/13222_2.png) [@magnus](https://forum.shopware.com/u/magnus)
#### Post date: [14. März 2025 um 07:23 UTC](https://forum.shopware.com/t/canonical-and-or-seo-url-s-for-variants/105779/4 "2025-03-14T07:23:04Z")

</div>

Hi Aleximi  
Thanks!  
Yes, I set the URL for product detail page to:  
{{ product.translated.name|lower }}-{{ product.productNumber }}

Instead of a slash before the product number, I used a double hyphen. I imagen (!?) that the last segment of the URL should contain the product name (or targeted keywords) for SEO purpose. So the product variants have almost the same URL as the main product (without the random numbers).

I might be wrong 🤪 but the URL is nicer this way. 😀

 ![Screenshot 2025-03-14 at 08.16.00](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/1/b/1b1052070061207f6a9a48470adbe8d3f488b41c.png)
