Repository navigation
Use nofollow for Discovery search facet links - #4785
Conversation
Use `rel="nofollow"` on Discovery search facet links to signal to well-behaved bots that they should not crawl facets. Faceted search results are derivative content of primary DSpace objects and cause excessive load on the server and even exhaust your crawl budget on crawlers like Google. See: https://developers.google.com/search/blog/2024/12/crawling-december-faceted-nav See: https://developers.google.com/search/docs/crawling-indexing/crawling-managing-faceted-navigation
|
FWIW, I agree that sites shouldn't want crawlers to get "stuck" in search filters. So, adding As a sidenote, by default, the entire This means that crawlers likely won't be able to crawl the search pages/components anyways (as most major crawlers still rely on SSR, to my knowledge). So, this |
Good point. I think Googlebot is the biggest bot most sites are worried about, and they do execute JavaScript if I recall correctly. But they also follow robots.txt and we disallow search by default. So maybe adding |
|
@alanorth : Yes, I honestly don't know that So, overall, I'm not against adding this PR simply because it's a good best practice. |
|
Hi @tdonohue. I agree that it's a best practice and worth pursuing (Google themselves recommend this after all). I've deployed this to production and will monitor changes to my server load, Google search console, etc. |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-4785-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-4785-to-dspace-7_x
git switch --create backport-4785-to-dspace-7_x
git cherry-pick -x f1e4bf55e961e943eb70447bd99762822e951004 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-8_x
git worktree add -d .worktree/backport-4785-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-4785-to-dspace-8_x
git switch --create backport-4785-to-dspace-8_x
git cherry-pick -x f1e4bf55e961e943eb70447bd99762822e951004 |
|
Successfully created backport PR for |
|
@alanorth : this was only possible to auto-backport to 9.x. But, if you wanted to manually backport it to 8.x and 7.6.x, then we could merge it there as well. |
|
@nwoodward to get back to your question, after having this deployed on production for several weeks I don't see any change in my Google Search Console. No warnings either. Search performance:
Indexing:
|
DSC-2820 fixed the views wording in the downloads tab of the statistics Approved-by: Andrea Barbasso


References
Description
Use
rel="nofollow"on Discovery search facet links to signal to well-behaved bots that they should not crawl facets. Faceted search results are derivative content of primary DSpace objects and cause excessive load on the server and even exhaust your crawl budget on crawlers like Google.Should this be configurable? How? Is there a case where a site would want bots to crawl the exponential combinations of search facets?
See: https://developers.google.com/search/blog/2024/12/crawling-december-faceted-nav
See: https://developers.google.com/search/docs/crawling-indexing/crawling-managing-faceted-navigation
Instructions for Reviewers
Please add a more detailed description of the changes made by your PR. At a minimum, providing a bulleted list of changes in your PR is helpful to reviewers.
List of changes in this PR:
rel="nofollow"to facet links on Discovery search pagesInclude guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.
Inspect facet links on Discovery search, entity, community, and collection pages to see if they have the
rel="nofollow"tag.Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.