Repository navigation
Hotfix: neutralize UGC link spam and deindex user pages - #24
Merged
Merged
Conversation
Anonymous public docs are being used as a dofollow link farm (~11.8k docs, ~9.7k gambling-related, ramping since late July). Hotfix: - Render markdown and comment links with rel="nofollow ugc noopener noreferrer" so user content can never pass link equity. - Send X-Robots-Tag: noindex, nofollow on /explore, /public/*, /share/* and /c/*; set the same in page metadata. - Drop user docs and /explore from the sitemap; only verified-owner docs are submitted. - Limit the explore page + API to account-owned docs while the spam backlog is cleaned up. Tests cover the robots header and the explore ownership filter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Incident
/exploreand/public/*are being farmed as a dofollow link network:Root causes: anonymous public creation, docs in the sitemap, indexable
/public/*+/explore, and dofollow links rendered from user markdown.This PR (hotfix)
MarkdownPreview+CommentMarkdown: external links getrel="nofollow ugc noopener noreferrer"andtarget="_blank"; in-page anchors unchanged.X-Robots-Tag: noindex, nofollowon/explore,/public/*,/share/*,/c/*(header + page metadata)./exploreand all user docs except verified-owner docs.Not in this PR (required follow-ups)
POST /api/v1/docsand comments.seoSlug, 404/410).Verification
npm run lint/npm run typecheckcleannpm run buildsucceeds