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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
Consolidate URLs on Wordpress?
Hi Guys, On a WordPress site, we are working with currently has multiple different versions of each URL per page. See screenshot: https://d.pr/i/ZC8bZt Data example: https://tinyurl.com/y8suzh6c Right now the non-https version redirects to the equivalent https versions while some of the https versions don't redirect and are status code 200. We all want all of them to redirect to the highlighted blue version (row a).Is this easily doable in wordpress and how would one go about it? Cheers.
Intermediate & Advanced SEO | | wickstar1 -
Replace dynamic paramenter URLs with static Landing Page URL - faceted navigation
Hi there, got a quick question regarding faceted navigation. If a specific filter (facet) seems to be quite popular for visitors. Does it make sense to replace a dynamic URL e.x http://www.domain.com/pants.html?a_type=239 by a static, more SEO friendly URL e.x http://www.domain.com/pants/levis-pants.html by creating a proper landing page for it. I know, that it is nearly impossible to replace all variations of this parameter URLs by static ones but does it generally make sense to do this for the most popular facets choose by visitors. Or does this cause any issues? Any help is much appreciated. Thanks a lot in advance
Intermediate & Advanced SEO | | ennovators0 -
Canonical URL availability
Hi We have a website selling cellphones. They are available in different colors and with various data capacity, which slightly changes the URL. For instance: Black iphone, 16GB: www.site.com/iphone(black,16,000000000010204783).html White iphone, 16GB: www.site.com/iphone(white,16,000000000010204783).html White iphone, 24GB: www.site.com/iphone(white,24,000000000010204783).html Now, the canonical URL indicates a standard URL: But this URL is never physically available. Instead, a user gets 301 redirected to one of the above URLs. Is this a problem? Does a URL have to be "physically" available if it is indicated as canonical?
Intermediate & Advanced SEO | | zeepartner0 -
HTML for URL markup
Hi, We are changing our URLs to be more SEO friendly. Is there any negative impact or pitfall of using <base> HTML-tag? Our developers are considering it as a possible solution for relative URLs inside HTML-markup in the Friendly URL context.
Intermediate & Advanced SEO | | theLotter0 -
301 redirect with /? in URL
For a Wordpress site that has the ending / in the URL with a ? after it... how can you do a 301 redirect to strip off anything after the / For example how to take this URL domain.com/article-name/?utm_source=feedburner and 301 to this URL domain.com/article-name/ Thank you for the help
Intermediate & Advanced SEO | | COEDMediaGroup0 -
Overly-Dynamic URLs & Changing URL Structure w Web Redesign
I have a client that has multiple apartment complexes in different states and metro areas. They get good traffic and pretty good conversions but the site needs a lot of updating, including the architecture, to implement SEO standards. Right now they rank for " <brand_name>apartments" on every place but not " <city_name>apartments".</city_name></brand_name> There current architecture displays their URLs like: http://www.<client_apartments>.com/index.php?mainLevelCurrent=communities&communityID=28&secLevelCurrent=overview</client_apartments> http://www.<client_apartments>.com/index.php?mainLevelCurrent=communities&communityID=28&secLevelCurrent=floorplans&floorPlanID=121</client_apartments> I know it is said to never change the URL structure but what about this site? I see this URL structure being bad for SEO, bad for users, and basically forces us to keep the current architecture. They don't have many links built to their community pages so will creating a new URL structure and doing 301 redirects to the new URLs drastically drop rankings? Is this something that we should bite the bullet on now for future rankings, traffic, and a better architecture?
Intermediate & Advanced SEO | | JaredDetroit0 -
URL stucture like Zappos?
Hi, My site structure looks like this. domainname.com/nl/holidayhouses/villa-costa
Intermediate & Advanced SEO | | remcozwaan
domainname.com/nl/apartments/apartment-caifem ect. I just went to zappos to research the site and het notice me that zappos.com has no directories. If i implement this my structure looks like this. domainname.com/nl/holidayhouse-villa-costa
domainname.com/nl/apartments-apartment-caifem Is this a better approach? Ciao, Remco0 -
Does Google index url with hashtags?
We are setting up some Jquery tabs in a page that will produce the same url with hashtags. For example: index.php#aboutus, index.php#ourguarantee, etc. We don't want that content to be crawled as we'd like to prevent duplicate content. Does Google normally crawl such urls or does it just ignore them? Thanks in advance.
Intermediate & Advanced SEO | | seoppc20120