<p>My two cents:</p>

<ul>
<li>I wouldn't use different url's for the same product, that's considered bad seo. Instead use something like <code>domain.com/product/slug</code>. That way you can change product categories while keeping the links intact, and it'll be easier to get the url of entries.</li>
<li>If there is no specific reason for using structures, use <a href="http://buildwithcraft.com/docs/categories">native categories</a>.</li>
<li>Instead of reverse-relations for seo-information, a simpler solution like <a href="http://sprout.barrelstrengthdesign.com/craft-plugins/seo/">Sprout SEO</a> might be better.</li>
</ul>

<p><strong>tl;dr</strong>: keep it simple</p>

CC BY-SA 3.0
2014-06-19T16:02:22.760Z
You can use duplicate URLs as long as they both declare the same canonical URL in the meta:  http://moz.com/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps
Steve Adams
CC BY-SA 3.0
2014-06-19T16:09:03.327Z
Didn't know that, but is it a good idea from a usability point of view?
Victor
CC BY-SA 3.0
2014-06-19T19:18:37.630Z
It would not matter that much, as in the case where a detail page was under two or more category URLs. You could code it to always pull the first category as the canonical URL in the meta. That might be less work than ensuring each detail page had only one unique URL.
Steve Adams
CC BY-SA 3.0
2014-06-19T21:00:33.470Z
You are correct regarding canonical, and yes it will be the same url always. Actually the approach you suggested here @VictorIn is what I started out with. But the client is a brand selling their own product on their site, so it is quite CMS heavy (a lot of content on a category page). That's why I switched to a structure, to have an entry pr category with better CMS editing like this: [Screen](https://www.dropbox.com/s/h7v4m2ceea4mnlx/Screenshot%202014-06-19%2022.51.57.png) <-- as you can see in the screenshot we have some SEO going on, but will have a closer look at Sprout as well thanks :)
oyvind-redrabbits
CC BY-SA 3.0
2014-06-19T22:22:59.080Z
Just added some more details to the original post, describing more in detail why I have made certain choices.
oyvind-redrabbits
CC BY-SA 3.0
2014-06-19T23:07:31.667Z
@oyvind-redrabbits If I remember correctly there was some talk about tabs in category over on G+. Also there was a feature request to let the dev. decide if an element should use a popup or a dedicated edit page. -- You could ask P&T what the state on those features is, before diving into work-arounds. (If you do, please keep us posted)
Victor
CC BY-SA 3.0
2014-06-19T15:46:32.550Z
2014-06-19T15:46:32.550Z
Victor
<p>It looks to me as if you need to have multiple urls for one entry, because at least as far as the breadcrumbs go, you have different content.</p>

<p>Example for entry <code>boot1</code>: its data shows up at <code>/shop/boots/hiking/boot1</code> with breadcrumbs <em>boots > hiking</em> and at <code>/shop/boots/hunting/boot1</code> with breadcrumbs <em>boots > hunting</em></p>

<p>So if you really do need the multiple urls, not overkill. Make sure that <code>/shop/bad/path/boot1</code> gives a <code>404</code></p>

CC BY-SA 3.0
2014-06-20T07:43:33.880Z
2014-06-20T07:43:33.880Z
Marion Newlevant
<p>What would be the best approach to a webshop in Craft, for solving the possibility of having products on more that on URL. Is there a best practice for one entry being accessible from more than one url? We use canonical for SEO.</p>

<p>Here is a quick summary of the current approach that works, but may be totally overkill :)</p>

<ul>
<li>Products are stored in a Channel.</li>
<li>A product can be related to several entries in Structures > Product Categories.</li>
<li>The product uri is for example /shop/category/subcategory/product - meaning that one product can have more than one location (url). The SEO issue with this is handled with <a href="https://support.google.com/webmasters/answer/139066?hl=en" rel="nofollow">canonical URLs</a> (further down). The reason we want the product in several locations is that the store is for example selling a certain boot both as a "hiking boot" and a "hunting boot", so the context is different and it won't work as well going to domain.com/products/name without the category (keyword rich) structure in the url. Also having all product entries at the same base url like that (/products/name/) takes the user out of their current context in general (breadcrumb + section specific content/design) if they clicked the product at domain.com/shop/boots/hiking/high/.</li>
<li>3 routes are setup to send /shop/* (1-3 levels adding /* for each) to the ecommerce/_product template.</li>
<li>Entry is not found when entering a product in this way, so if entry is not defined, it is set to be the one matching the last segment of the current URL (matched by slug).</li>
<li>Now we're good to go to show the actual product entry.</li>
<li>The issue of SEO (penalty for duplicate content) is handled with "canonical". I get all entries from Product Categories with a relation to the product (reversed relation), and defining the first one in that loop to be the main location (random - could be set as a relation on product level for the user to decide, but that requires "manual control" and may be hard for the client to relate to), and all other URLs showing the product in a different category that the main location will get  in the header.</li>
<li>In product listings we find the uri to each product again with reversed relations to all categories that has a relation to that product, and we prioritize the product category we are currently in. If the product is listed outside any of its product categories (like on a product page as a related product) it ends up with the base url from the last reversed related product category.</li>
</ul>

<p>If you think this approach works well or if you have any other ideas.</p>

<hr>

<p>UPDATE:</p>

<p>I started out with native Categories for product categories. But the client is a brand selling their own product on their site, and each product category is a page with quite a bit more content than just the products, so I have a structure with an entry type for productCategory with several tabs (not possible for a Category).</p>

<url><routes>
Best approach for building a webshop with more than one URL to the same product (entry)
# Best approach for building a webshop with more than one URL to the same product (entry)

(Asked by: username_0 on 2014-06-19)

What would be the best approach to a webshop in Craft, for solving the possibility of having products on more that on URL. Is there a best practice for one entry being accessible from more than one url? We use canonical for SEO.

Here is a quick summary of the current approach that works, but may be totally overkill :)

* Products are stored in a Channel.
* A product can be related to several entries in Structures > Product Categories.
* The product uri is for example /shop/category/subcategory/product - meaning that one product can have more than one location (url). The SEO issue with this is handled with [canonical URLs](https://support.google.com/webmasters/answer/139066?hl=en) (further down). The reason we want the product in several locations is that the store is for example selling a certain boot both as a "hiking boot" and a "hunting boot", so the context is different and it won't work as well going to domain.com/products/name without the category (keyword rich) structure in the url. Also having all product entries at the same base url like that (/products/name/) takes the user out of their current context in general (breadcrumb + section specific content/design) if they clicked the product at domain.com/shop/boots/hiking/high/.
* 3 routes are setup to send /shop/\* (1-3 levels adding /\* for each) to the ecommerce/\_product template.
* Entry is not found when entering a product in this way, so if entry is not defined, it is set to be the one matching the last segment of the current URL (matched by slug).
* Now we're good to go to show the actual product entry.
* The issue of SEO (penalty for duplicate content) is handled with "canonical". I get all entries from Product Categories with a relation to the product (reversed relation), and defining the first one in that loop to be the main location (random - could be set as a relation on product level for the user to decide, but that requires "manual control" and may be hard for the client to relate to), and all other URLs showing the product in a different category that the main location will get in the header.
* In product listings we find the uri to each product again with reversed relations to all categories that has a relation to that product, and we prioritize the product category we are currently in. If the product is listed outside any of its product categories (like on a product page as a related product) it ends up with the base url from the last reversed related product category.

If you think this approach works well or if you have any other ideas.

---

UPDATE:

I started out with native Categories for product categories. But the client is a brand selling their own product on their site, and each product category is a page with quite a bit more content than just the products, so I have a structure with an entry type for productCategory with several tabs (not possible for a Category).

**Tags:** url, routes

---

## 2 answers

### Answer by username_1 on 2014-06-19. Score: 6

My two cents:

* I wouldn't use different url's for the same product, that's considered bad seo. Instead use something like `domain.com/product/slug`. That way you can change product categories while keeping the links intact, and it'll be easier to get the url of entries.
* If there is no specific reason for using structures, use [native categories](http://buildwithcraft.com/docs/categories).
* Instead of reverse-relations for seo-information, a simpler solution like [Sprout SEO](http://sprout.barrelstrengthdesign.com/craft-plugins/seo/) might be better.

**tl;dr**: keep it simple

> **Comments:**
> **username_2**: You can use duplicate URLs as long as they both declare the same canonical URL in the meta:  http://moz.com/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps  
> **username_1**: Didn't know that, but is it a good idea from a usability point of view?  
> **username_2**: It would not matter that much, as in the case where a detail page was under two or more category URLs. You could code it to always pull the first category as the canonical URL in the meta. That might be less work than ensuring each detail page had only one unique URL.  
> **username_0**: You are correct regarding canonical, and yes it will be the same url always. Actually the approach you suggested here @VictorIn is what I started out with. But the client is a brand selling their own product on their site, so it is quite CMS heavy (a lot of content on a category page). That's why I switched to a structure, to have an entry pr category with better CMS editing like this: [Screen](https://www.dropbox.com/s/h7v4m2ceea4mnlx/Screenshot%202014-06-19%2022.51.57.png) <-- as you can see in the screenshot we have some SEO going on, but will have a closer look at Sprout as well thanks :)  
> **username_0**: Just added some more details to the original post, describing more in detail why I have made certain choices.  
> **username_1**: @oyvind-redrabbits If I remember correctly there was some talk about tabs in category over on G+. Also there was a feature request to let the dev. decide if an element should use a popup or a dedicated edit page. -- You could ask P&T what the state on those features is, before diving into work-arounds. (If you do, please keep us posted)  

---

### Answer by username_3 on 2014-06-20. Score: 2

It looks to me as if you need to have multiple urls for one entry, because at least as far as the breadcrumbs go, you have different content.

Example for entry `boot1`: its data shows up at `/shop/boots/hiking/boot1` with breadcrumbs *boots > hiking* and at `/shop/boots/hunting/boot1` with breadcrumbs *boots > hunting*

So if you really do need the multiple urls, not overkill. Make sure that `/shop/bad/path/boot1` gives a `404`


---

