The Wayback Machine - https://web.archive.org/web/20211031012639/https://github.com/go-gitea/gitea/issues/17341
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark most UI links & buttons as rel="nofollow" to avoid constant bot traffic #17341

Open
noerw opened this issue Oct 17, 2021 · 2 comments · May be fixed by #17345
Open

Mark most UI links & buttons as rel="nofollow" to avoid constant bot traffic #17341

noerw opened this issue Oct 17, 2021 · 2 comments · May be fixed by #17345

Comments

Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
@noerw
Copy link
Member

@noerw noerw commented Oct 17, 2021

Feature Description

Gitea is a magnet for search engines, which once they find an instance are very happy to follow all the links on the site, of which there are many, resulting in never ending indexer bot traffic. Among the links followed are UI buttons (star a page, sort by XYZ, select a UI language...), as well as pages that are expensive to render, but don't provide much value once indexed (blame, compare, commit, ...).
Ideally, these would not be (attempted to be) indexed.
I tried to accomplish this on my site via a robots.txt along the following lines, but was not exactly successful, probably because many bots don't understand the wildcard syntax:

User-agent: *
Disallow: /
Allow: /whitelisted-user
Disallow: /*/raw
Disallow: /*/commit
Disallow: /*/blame
Disallow: /*/src
Disallow: /*?lang=*

A better approach would be to render most links with the rel="nofollow" attribute. I'd argue this could be applied to all links, except for links to

  • landingpage
  • user / org
  • repo
  • issue(s) / pr(s) / release(s) / wiki / yougettheidea..

Screenshots

No response

@noerw noerw changed the title Mark most UI links & buttons as rel="nofollow" to avoid search engine Mark most UI links & buttons as rel="nofollow" to avoid constant bot traffic Oct 17, 2021
@raygervais
Copy link

@raygervais raygervais commented Oct 17, 2021

I'd like to take a crack at adding this in, may look for advice aside from the obvious ones incase there is a better approach.
🥂

@techknowlogick
Copy link
Member

@techknowlogick techknowlogick commented Oct 17, 2021

@raygervais that be awesome! If you have any Qs please feel free to ask, or hop in chat :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment