Altering Breadcrumbs based on User Path to Product URL
-
Hi,
Our products are listed in multiple categories, and as the URLs are path dependent (example.com/fruit/apples/granny-smith/, example.com/fruit/green-fruit/granny-smith/ and so forth) we canonicalise to the 'default' URL (in this case example.com/fruit/apples/granny-smith/).
For mainly crawling bandwidth issues I'm looking to change all product URL's to path neutral so there is only ever one URL per product (example.com/granny-smith/), but still list the product in multiple categories.
If a user comes directly to example.com/granny-smith/ then the breadcrumbs will use the default path "Fruit > Apples", however if the user navigated to the product via another category then I'd like the breadcrumbs to reflect this. I'm not worried about cloaking as it's not based on user-agent and it's very logical why it's being done so I don't expect a penalty.
My question is - how do you recommend this is achieved from a technical standpoint? Many sites use path neutral product URL's (Ikea, PCWorld etc) but none alter the breadcrumbs depending upon path.
Our site is mostly behind a CDN so it has to be a client side solution. I currently view the options as:
- Store Path to product in a cookie and/or browsers local-cache
- Attach the Path details after a # in the URL and use Javascript to alter breadcrumbs onload with JQuery
- When a user clicks to a product from a listing page, use AJAX to pull in the product info but leave the rest of the page (including the breadcrumbs) as-is, updating the URL accordingly
Do you think any of these wouldn't work? Do you have a preference on which one is best? Is there another method you'd recommend?
We also have "Next/Previous" functionality (links to the previous and next product URLs) on the page so I suspect we'd need to attach the path after a # and make another round trip to the server onload to update the previous and next links.
Finally, does anyone know of any sites that do update the breadcrumbs depending upon path?
Thanks in advance for your time
FashionLux
-
Further update to this. Ran into a problem with option 3... this solution works really well when navigating the site internally, however a user landing on one of these URL's directly (bookmark, social share etc) would have a slow loading page as (for non-default product variations) the page will load after the 1st request, then a 2nd request to the server is needed to pull in the image via AJAX.
Loading the other images, stock information, prices, copy etc into an array and doing the work on the client side wasn't an option as the page would get too heavy. So option 3 ruled out.
Ultimately the goal was to reduce duplicate content of product pages and none of the 3 options above do this whilst not affecting page loading times. I did look to fall back on using canonical tags however I've just now found that Facebook are using this tag, so if a user wanted to share a 'red apple' when the canonical is 'green apple' - Facebook would show an image of the 'green apple'.... so at the moment that is ruled out also.
I'll start a new thread on product page duplicates and the best solution - but if anyone has any ideas then please do let me know.
Thanks
Dean
-
Thanks for the response Dana. Option 3 did feel like the best option and that is the one I'm choosing to go with.
Point 2 (with the hash) provides the desired result of Search Engines only seeing the clean URL as the parameters behind the hash will never be seen, but the browser will use them to power the breadcrumbs. In the end it was a toss-up between 2 & 3 but 3 is the most maintainable and quickest for users.
Thanks again
Dean
-
Dean,
This is a great, great question and I am eager to find out what my fellow technical SEOs think because I have faced very similar situations on one of my sites. Thanks for asking this question.
My gut instinct is to select #3 of your options. But not really being a developer, it's hard for me to articulate as to why I think this is the best option. I am really only thinking of it from a user-end standpoint in that I want to know where, in the hierarchy of the site this page lives so that if I need to find it again, I can.
I disagree with your option #2 from an SEO standpoint because anything after a "#" or hashtag in a URL is ignored by search engines....so putting it there isn't going to benefit your SEO in any way.
Interested to hear what others think,
Dana
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Product URL Optimisation
Hi guys, We are currently trying to add new products to our site but we are in a quandary on what type of URL structure to pursue. For example:
Intermediate & Advanced SEO | | michel_8
Product Name: Aspect Exfoliating Cleanser 240ml https://www.example.com.au/aspect-exfoliating-cleanser-240ml (including the size)
VS
https://www.example.com.au/aspect-exfoliating-cleanser 1.) Which is a better URL structure based on SEO 2018 and why?
2.) Is there any merit in removing the size from the URL key with the aim of attracting more traffic? Keen to hear from you guys! Cheers,0 -
Why is a canonicalized URL still in index?
Hi Mozers, We recently canonicalized a few thousand URLs but when I search for these pages using the site: operator I can see that they are all still in Google's index. Why is that? Is it reasonable to expect that they would be taken out of the index? Or should we only expect that they won't rank as high as the canonical URLs? Thanks!
Intermediate & Advanced SEO | | yaelslater0 -
How should you determine the preferred URL structure?
Hi Guys, When migrating to a new CMS which include new pages how should you determine the URL structure, specifically: So should we include www. or without it? Should the URL have a trailing slash? How would you determine the answer to these questions? Cheers.
Intermediate & Advanced SEO | | kayl870 -
Pages with URL Too Long
I manage a number of Shopify stores for ecommerce clients. MOZ keeps kindly telling me the URLs are too long. However, this is largely due to the structure of Shopify, which has to include 'collections' and 'products'. For example: https://domain.com.au/collections/collection-name/products/colour-plus-six-to-seven-word-product-name MOZ recommends no more than 75 characters. This means we have 25-30 characters for both the collection name and product name. VERY challenging! Questions: Anyone know how big an issue URLs are as a ranking factor? I thought pretty low. If it's not an issue, how can we turn off this alert from MOZ? If it is an issue, anyone got any ideas how to fix it on Shopify sites?
Intermediate & Advanced SEO | | muzzmoz0 -
How To Organise my URLS - Which is Optimal?
Hi all, I am currently in the process of re-writing my companies website URL structure. Compared to the way the website is structured at the minute, there's going to be a lot more URL's as the previous structure has missed out on a lot of search avenues that i intend to include within the rebuild. one of my issues is basically deciding under which category certain URL's come under, I can think of reasons for both sides but can't quite decide on which is optimal. My company is an automotive/car dealer so we sell cars for certain manufactures as well as offering a number of other services. what I'm curious about is what makes more sense in terms of the category that comes first in the URL. Here's what I am torn between; /(car manufacturer)/servicing OR /servicing/(car-manufacturer) To give you some more info that might influence the decision; In terms of generic keyword targeting, the majority would search in the order of '(car manufacturer) service' as opposed to 'service for (car manufacturer)'. Currently on our site, the sections /(manufacturer) are some of the most authoritative pages that we have on the website, but we've done very little work on /service in the past. For me, this would suggest that naturally the pages flowing from that URL would get an advantage in terms of authority/ranking. With either URL structure, the URL's are eventually going to cross paths - I just need to decide which one is best and should therefore feature first. Hopefully this is somewhat clear. I'd appreciate any suggestions or if you don't quite understand what I'm asking for then general URL advice is also appreciated. Many thanks Sam
Intermediate & Advanced SEO | | Sandicliffe0 -
Breadcrumb wording and keywords
This is real estate website related. For every neighborhood I have a "condos" and "houses" page. In the breadcrumb structure I may have: "home > island condos > city condos > region condos > neighborhood condos". Questions: Some breadrumb structures have 5-6 different breadcrumb link and repeating the word "condos" in each link seems redundant. Would it be better just to list "island", "city", "region", "neighborhood" and never use the word "condos" or "houses" in the breadcrumbs? For users this would be better. If I implement what I suggest in 1) - deleting "condos" or "houses" wording from breadcrumb links, then on a condos page the word "region" (as an example) will lead to the "region condos" page whereas the exact same word "region" on a house page will lead to the "region houses" page. This means I will have a situation where the anchor text in breadcrumbs become 100% identical for my "condos" and "houses" pages, however, the they lead to different pages. Is this OK? I have in past been told that when I use internal anchor text, that the link should always leads to the same page. Having same anchor leading to different pages would not be good….is that so? thank you
Intermediate & Advanced SEO | | khi50 -
Two homepage urls
We have two different homepages for our website. One is designed for daytime users (i.e. businesses), whereas the second night version is designed with home consumers in mind. Is this hurting our SEO by having two homepage urls, instead of just building a strong presence around one? We have set up canonical meta on each one: On the night version: domain.com/indexnight.html we have a On the day version: domain.com/index.html we have a It seems to me that we should just choose one of them and set up a permanent 301 redirect from one to the other. Any assistance would be greatly appreciated, thank you!
Intermediate & Advanced SEO | | JessieT0 -
How to 301 redirect all URLs with /? in?
I want to redirect all URLs that have /? in it. Indexed in Google is a bunch of urls lik: mysite.com/?674764 mysite.com/?rtf8y78 I want all these URLs to be redirected to my home page. Any ideas?
Intermediate & Advanced SEO | | JohnPeters0