Together with facet api pretty paths (and its support for ordering facets) facet links are *very* valuable for SEO. However, if nofollow is not enabled crawlers might get lost crawling deep combinations of facet links. So in order to be able to leverage this for SEO, we must put nofollow on links with a certain depth.
Attached patch implements this feature by converting the nofollow checkbox in a select that allows one to configure depths in between1-10 in addition to the enabled/disabled status. The patch comes with a built-in BC to keep facets based on old settings working.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | hierarchical-2183757-10.patch | 535 bytes | borisson_ |
Comments
Comment #1
fagoSomehow the last patch misses a hunk, so updated it. Please review this one.
Comment #4
fagoFigured statically caching something based on per-object settings is dumb, fixed that.
Comment #5
giorgio79 commentedHey Fago,
Thx for the patch. Just installed it and I wonder how it would work. Lets say we have such a case:
1. Location hierarchy facet
US > Texas > Dallas
US > Texas > Houston
2. Color facet
Blue
White
3. Weight facet
Heavy
Easy
I believe the best way would be to specify which facet is allowed for robots on the first level, eg Weight, then the second level Color facet is allowed, and then Location.
So a robot would crawl and index like this:
1. Heavy - > Blue - > Dallas
or
2. Easy - > Blue - > Houston
but it couldn't index like this
Blue -> Houston -> Easy
Can the current patch achieve this? I am not sure I understand "the greater than x facets" setting.
Had a discussion a while ago on the same topic : #2018449: Ability to specify facet weight, so we can allow search engines to index facet pages There we discussed an idea of assigning a weight to a facet, and if the facet level matches the weight, nofollow would be removed.
Comment #6
fagoYeah, I see that it might be useful to have even more control, e.g. only add this facet after facet A, or B, etc. That results in more complex rules/settings though.
The setting as in the current patch does not really aim for per-facet control of the depth, it aims in having a control about the link depth in general, e.g. you can configure all your facets to show nofollow on links for 3x or more combinations.
It wouldn't work to configure several facets differently though. Assuming you have facet A and B and A has limit 1 while B has limit 3, it would still index AAB coombinations as B would show a suiting link when A-A is active (while A wouldn't).
Comment #7
giorgio79 commentedThx Fago for taking your time! What do you think of assigning a weight to a facet? That would still keep it simple, yet allow deep control. Eg,
1. add weight 1 to Facet 1, and make Facet 1 follow and everything else nofollow
2. add weight 2 to Facet 2, and if Facet 1 is active and followed, make Facet 2 followed as well.
etc.
Comment #8
cpliakas commentedHi all.
This is a great feature request, and thanks for working on it! Marking as needs work because I cannot seem to save the setting, in other words no matter what value I select the dropbox always says "disabled" and no links have the "rel" attribute set.
Thanks for the contribution and efforts on this issue,
Chris
Comment #9
giorgio79 commentedMaybe D8?
Such a solution would solve the concerns raised here #1376398: Validate SEO approach taken by Facet API and determine if it would be worth adding an item to the checklist
Comment #10
borisson_Attached is a patch that makes all links nofollow by default.
Comment #12
borisson_Committed.
Comment #14
lennart commentedI would like search engines to index my search tree - so is there any way to remove the nofollow attribute from the facet links?
See here for the site I am using facets on: https://tutoren.dk/
Comment #15
ankithashetty+1 to the request made by @lennart in #14, any way to remove the nofollow attribute from the facet links?
Thanks!