사용자 프로필 / robots.txt 또는 x-robots-tag 헤더의 사용자 디렉터리

EDIT this turns out to be a bug, see post #3

If “Hide user profiles from public” is checked, shouldn’t /u be disallowed in robots.txt ?
Otherwise search engines will hit a 403 which might affect ranking and visibility.

This was supposedly implemented in 2014 Excluding user profiles in robots.txt (or allow edit of file) - #2 by neil Disallow /users/ in robots.txt · discourse/discourse@8267a45 · GitHub

The only Discourse forum I could find that has Disallow: /u is Meta :thinking:

1개의 좋아요

Maybe Meta was customized so the migration in FIX: Remove /u/ from robots by nattsw · Pull Request #30782 · discourse/discourse · GitHub was skipped

좋은 지적입니다 @Moin

현재 /u 경로에 noindex를 이미 추가하고 있습니다. 그러나 robots.txt가 이를 차단하고 있기 때문에 검색 엔진이 해당 헤더를 볼 수 없습니다.

그러면 이전 변경 사항 FIX: Always noindex /u routes - Pull Request #27712 - discourse/discourse - GitHub 으로 연결됩니다.

해당 PR에서는 다음과 같이 설명하고 있습니다.

두 번째로, SiteSetting.hide_user_profiles_from_publicForbidden을 발생시켜 after_action: add no index header가 트리거되지 못합니다.

이 PR은 before_action을 통해 no index 헤더가 추가되도록 보장합니다. /u를

discourse/app/controllers/robots_txt_controller.rb

2900cbe의 24번째 줄에서 제거하는 것을 고려할 수 있습니다.

DISALLOWED_WITH_HEADER_PATHS = %w[/badges /u/ /my /search /tag//l /g /t//.rss /c/.rss]

불행히도, 이는 항상 작동하지 않습니다. /u/rgj에는 x-robots-tag: noindex 헤더가 있지만, /u/rgj/summary에는 없으므로, 가장 최근 변경 사항이 원치 않는 부작용을 일으키고 있는 것으로 보입니다.

(Contribute > Bug 로 이동)

1개의 좋아요