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.

CommentFileSizeAuthor
#10 hierarchical-2183757-10.patch535 bytesborisson_
#4 d7_facetapi_nofollow_depth.patch4.01 KBfago
PASSED: [[SimpleTest]]: [MySQL] 566 pass(es). View
#1 d7_facetapi_nofollow_depth.patch3.81 KBfago
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch d7_facetapi_nofollow_depth_0.patch. Unable to apply patch. See the log in the details link for more information. View
d7_facetapi_nofollow_depth.patch3.34 KBfago
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch d7_facetapi_nofollow_depth.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

fago’s picture

FileSize
3.81 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch d7_facetapi_nofollow_depth_0.patch. Unable to apply patch. See the log in the details link for more information. View

Somehow the last patch misses a hunk, so updated it. Please review this one.

The last submitted patch, d7_facetapi_nofollow_depth.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 1: d7_facetapi_nofollow_depth.patch, failed testing.

fago’s picture

Status: Needs work » Needs review
FileSize
4.01 KB
PASSED: [[SimpleTest]]: [MySQL] 566 pass(es). View

Figured statically caching something based on per-object settings is dumb, fixed that.

giorgio79’s picture

Hey 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.

fago’s picture

Yeah, 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).

giorgio79’s picture

Thx 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.

cpliakas’s picture

Category: Task » Feature request
Status: Needs review » Needs work

Hi 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

giorgio79’s picture

Title: Support putting rel-nofollow on links with high depth only » Hierarchical rel-nofollow on links for search engines
Project: Facet API » Facets
Version: 7.x-1.x-dev »
borisson_’s picture

Version: » 8.x-1.x-dev
Status: Needs work » Needs review
Issue tags: +Needs committer feedback
FileSize
535 bytes

Attached is a patch that makes all links nofollow by default.

  • borisson_ committed a18b362 on 8.x-1.x
    Issue #2183757 by fago, borisson_: Hierarchical rel-nofollow on links...
borisson_’s picture

Status: Needs review » Fixed
Issue tags: -Needs committer feedback

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.