# robots.txt의 일반 규칙이 Googlebot에 반영되지 않음

**URL:** https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706
**Category:** Support
**Created:** [3월 1, 2022, 2:07오후 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706 "2022-03-01T14:07:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [3월 1, 2022, 2:07오후 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706/1 "2022-03-01T14:07:02Z")

</div>

Discourse 팀에,

먼저, Discourse를 구상하고 유지보수하는 데 보여주신 정신과 끈기에 경의를 표합니다. 저희와 커뮤니티 멤버 모두에게 Discourse를 사용하는 것은 항상 기쁨입니다.

오늘 발견한 몇 가지 미묘한 관찰 사항을 정리하여 공유드리며, 이 내용들이 유용하시길 바랍니다. 한편, 저희 측에서 오해하고 있는 부분이 있다면 이에 대한 피드백도 환영합니다.

정중히,  
Andreas

* * *

### 서론

호스팅된 Discourse 인스턴스([https://community.crate.io/](https://community.crate.io/))의 `robots.txt` 정의 파일\[1\]에 대해 조사하던 중, Googlebot이 의도한 대로 설정을 준수하지 않을 수 있음을 발견했습니다.

### 평가

> [@codinghorror](#):
>
> 유저 프로필은 기본적으로 인덱싱이 허용되지 않습니다.

Meta의 `robots.txt`\[2\]를 대신하여 테스트해 보겠습니다. 제 프로필 URL은 `https://meta.discourse.org/u/amotl/`입니다.

다음 무료 `robots.txt` 검증 도구의 결과를 비교하면 차이를 쉽게 확인할 수 있습니다:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/6/e6b8ab45dc6e58924e61f81e89046e3ea8bd3a7d.png)  
– [Googlebot으로 평가](https://en.ryte.com/free-tools/robots-txt/?refresh=1&url=https%3A%2F%2Fmeta.discourse.org%2Fu%2Famotl%2F&useragent=Googlebot&submit=Evaluate)

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/c/1c0ecb55ddf33b64a25f4b719226094a77c1ea76.png)  
– [MSNBot으로 평가](https://en.ryte.com/free-tools/robots-txt/?refresh=1&url=https%3A%2F%2Fmeta.discourse.org%2Fu%2Famotl%2F&useragent=MSNBot&submit=Evaluate)

### 조사

이 주제에 대해 우리는 이미 답을 찾았다고 생각합니다:

> [@](#):
>
> 크롤러는 가장 구체적인 사용자 에이전트 이름과 일치하는 그룹을 찾으며, 나머지는 무시합니다.
> 
> – [An SEO's Guide to Robots.txt, Wildcards, the X-Robots-Tag and Noindex](https://builtvisible.com/wildcards-in-robots-txt/#robots.txt)

### 의견

따라서 우리는 Googlebot이 현재 `User-agent: *` 섹션\[3\]에 정의된 규칙을 완전히 무시하고, `User-agent: Googlebot` 섹션\[4\]의 규칙만 _준수_한다고 추정합니다.

* * *

1. [https://community.crate.io/robots.txt](https://community.crate.io/robots.txt) 

2. [https://meta.discourse.org/robots.txt](https://meta.discourse.org/robots.txt) 

3. `robots.txt`, `User-agent: *` 섹션

4. `robots.txt`, `User-agent: Googlebot` 섹션

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [3월 1, 2022, 2:13오후 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706/2 "2022-03-01T14:13:19Z")

</div>

제가 잘 이해했다면, 답은 그렇게 간단하지 않습니다. 단일 사용자가 Gmail을 통해 링크를 보냈다면, googlebot은 robots.txt를 준수하지 않습니다. 링크가 어딘가(백링크)에 공유되어 googlebot의 관점에서 일반적인 일상 링크처럼 보이는 경우에도 마찬가지입니다.

다시 말하지만, robots.txt는 단순히 요청일 뿐입니다.

또 다른 문제도 있습니다만… 꽤 많은 봇들이 자신을 googlebot이라고 식별합니다. 실제 상황을 확인하려면 IP를 통해만 알 수 있습니다.

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [3월 1, 2022, 3:43오후 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706/3 "2022-03-01T15:43:48Z")

</div>

> [@amotl](#):
>
> ### 생각
> 
> 즉, Googlebot이 현재 `User-agent: *` 섹션에 정의된 규칙을 [[3]](#footnote-1066966-3)  
> 완전히 무시하고 `User-agent: Googlebot` 섹션 내의 규칙만 _고려_하는 것으로 추정됩니다. [[4]](#footnote-1066966-4)

이것은 정확하며, 의도적으로 이렇게 구현되었습니다.

> [@Jagster](#):
>
> 다시 강조하지만 — robots.txt는 단순히 요청일 뿐입니다.

따라서 실제로 인덱싱되지 않아야 하는 페이지에는 추가적인 http 헤더 `X-Robots-Tag: noindex`가 Googlebot에 전송됩니다. 관련 링크:

> <https://github.com/discourse/discourse/commit/758e1608626ce78566dd39004a4a6251d3bbfc60>
>
> Googlebot handles no-index headers very elegantly. It advises to leave as many r…outes as possible open and uses headers for high fidelity rules regarding indexes.
> 
> Discourse adds special \`x-robot-tags\` noindex headers to users, badges, groups, search and tag routes.
> 
> Following up on b52143feff8c32f2 we now have it so Googlebot gets special handling.
> 
> Rest of the crawlers get a far more aggressive disallow list to protect against excessive crawling.

* * *

귀하의 도메인의 경우 Google Search Console → [URL 검사](https://search.google.com/search-console/inspect)를 사용할 수 있습니다.

그런 다음 인덱싱할 사용자 프로필 URL을 추가해 보세요. 예: `https://www.example.com/u/jacob`

 ![grafik](https://global.discourse-cdn.com/meta/original/3X/c/0/c039f1e8e1a36fafa479038827c37ae4bd8f0223.png)

---

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [3월 1, 2022, 3:50오후 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706/4 "2022-03-01T15:50:45Z")

</div>

Ayke 님,

> [@rrit](#):
>
> 따라서 실제로 인덱싱되지 않아야 하는 페이지에 Googlebot은 추가적인 http 헤더 `X-Robots-Tag: noindex`를 받게 됩니다.

확인했습니다.

```shell
$ http https://meta.discourse.org/u/amotl --print hH | grep -i robot
X-Robots-Tag: noindex

```

> [@rrit](#):
>
> 이것은 정확하며 의도적으로 이렇게 구현되었습니다.

빠른 답변과 설명, 그리고 해당 패치에 대한 참고를 제공해 주셔서 정말 감사합니다.

감사합니다.  
Andreas.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [3월 2, 2022, 10:11오후 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706/5 "2022-03-02T22:11:36Z")

</div>

이 내용을 #support로 이동했습니다. 여기에서 이렇게 기막히게 잘 작성된 버그 리포트를 올려주셔서 감사합니다.

구글을 만족시키기 위해 규칙을 세밀하게 조정하는 데 정말 오랜 시간이 걸렸습니다. x-robots-tag noindex는 업계 표준이지만, 지원이 고르지 않기 때문입니다. 크롤링을 단순히 금지했을 때의 문제는, 특정 조건에서 페이지가 구글 인덱스에 등록될 수 있었는데, 크롤링이 금지되어 있어 이를 쉽게 제거할 방법이 없었기 때문입니다. 일종의 계란이 먼저냐, 닭이 먼저냐는 문제였죠.

---

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [3월 3, 2022, 8:45오전 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706/6 "2022-03-03T08:45:21Z")

</div>

Sam님,

이 사안에 대해 더 자세한 정보를 공유해 주셔서 진심으로 감사드립니다. 언제나처럼, Discourse의 모든 세부 사항에 쏟아붓고 계신 놀라운 수준에 감탄을 금치 못합니다.

> [@sam](#):
>
> x-robots-tag noindex는 브라우저별 지원이 균일하지는 않지만, 이는 업계 표준입니다.

솔직히 말하자면, 저는 이 사실을 지금까지 인지하지 못했습니다. 그래서 다시 한번 감사드립니다!

> [@rrit](#):
>
> [이것을 확인하려면] Google Search Console을 사용할 수 있습니다.

![image](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/optimized/3X/7/0/7050de2775f73606fb0f0d36d17ed9f677936dc8_2_517x32.png)

좋습니다. 감사합니다. 이것이 이제 널리 받아들여지는 표준이 되었다면, 일부 무료 `robots.txt` 검증 도구가 미래에 이 헤더도 존중하기 시작할 희망이 있을까요?

오늘 현재, Google Search Console의 _URL 검사_처럼 `robots.txt`를 읽는 것 외에도 해당 추가 헤더 검사를 이미 구현하고 있는 도구가 있는지 알고 계신가요? 그런 도구가 있다면, 우리가 겪었던 같은 혼란을 사람들이 피하는 데 도움이 될 것입니다.

감사합니다.  
Andreas 드림.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [4월 2, 2022, 8:46오전 UTC](https://meta.discourse.org/t/generic-rules-in-robots-txt-not-picked-up-by-googlebot/219706/7 "2022-04-02T08:46:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
