# robots.txt examples

> Twelve real robots.txt files from Google, GitHub, The New York Times, Wikipedia and more, fetched on a date, with what each one does and what to copy.

Canonical: https://scaplet.com/examples/robots-txt

Examples Examples · Crawling

Twelve real robots.txt files from Google, GitHub, The New York Times, Wikipedia and more, fetched on a date, with what each one does and what to copy.

12

real examples

Nov 1, 2026

captured

4

templates

Scaplet Editorial Team

editor

In one line

A robots.txt file sits at the root of a site and tells crawlers which paths they may request. The twelve files below were fetched from the live sites: some block AI crawlers by name, some only point to a sitemap, and one blocks everything for unknown bots. Copy the group pattern you need, then test it before you publish.

## Across 12 captures

Counted from the captured files

10 of 12

Lists a sitemap

10 of 12

Uses wildcards

6 of 12

Blocks AI crawlers

6 of 12

No AI crawler rules

12 examples

## Real robots.txt examples, _fetched_.

Each one was fetched from the live site on the date shown, with a link to the source. Filter by pattern or industry.

Apple [apple.com/robots.txt ↗](https://www.apple.com/robots.txt) captured Nov 1, 2026

Excerpt
apple.com/robots.txt · excerpt

```
User-agent: * Disallow: /*shop/browse/overlay/* Disallow: /*shop/iphone/payments/overlay/* Disallow: /cn/*/aow/* Disallow: /tmall* Allow: /ac/globalnav/2.0/*/images/ac-globalnav/globalnav/search/*
```

Numbers

Rule lines

33

User-agent groups

6

AI crawlers named

0

Sitemaps

5

- Has no group for any AI crawler; they follow the * group
- Lists 5 sitemaps
- Uses * or $ patterns in 22 rules

**Why it works.** Lists five sitemaps and uses wildcard rules to keep shop overlays and payment fragments out of crawls.

**Copy this.** Use * inside paths to match fragments that appear under many locales or product folders.

- Consumer
- Medium length
- No AI crawler rules
- Lists a sitemap

BBC [bbc.co.uk/robots.txt ↗](https://www.bbc.co.uk/robots.txt) captured Nov 1, 2026

Excerpt
bbc.co.uk/robots.txt · excerpt

```
User-agent: Amazonbot Disallow: / User-agent: CCBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: anthropic-ai Disallow: /
```

Numbers

Rule lines

149

User-agent groups

40

AI crawlers named

13

Sitemaps

13

- Blocks GPTBot, ChatGPT-User, OAI-SearchBot and ClaudeBot and 9 more AI crawlers from the whole site
- Lists 13 sitemaps
- Uses * or $ patterns in 18 rules

**Why it works.** Blocks 13 named AI crawlers in their own groups and lists 13 sitemaps covering news, sport, food and video.

**Copy this.** Give each AI crawler its own group so you can later allow one without touching the rest.

- Media
- Medium length
- Blocks AI crawlers
- Lists a sitemap

GitHub [github.com/robots.txt ↗](https://github.com/robots.txt) captured Nov 1, 2026

Excerpt
github.com/robots.txt · excerpt

```
User-agent: Bytespider Disallow: /
```

Numbers

Rule lines

517

User-agent groups

6

AI crawlers named

6

Sitemaps

1

- Blocks Bytespider from the whole site
- Gives GPTBot, OAI-SearchBot and ClaudeBot path-level rules
- Lists 1 sitemap

**Why it works.** Puts GPTBot, OAI-SearchBot, ClaudeBot, anthropic-ai and PerplexityBot in one group, so one set of path rules covers every AI crawler it names.

**Copy this.** List several user-agent lines above one shared rule block instead of repeating the rules per bot.

- Developer
- Long
- Blocks AI crawlers
- Lists a sitemap

Google [google.com/robots.txt ↗](https://www.google.com/robots.txt) captured Nov 1, 2026

Excerpt
google.com/robots.txt · excerpt

```
User-agent: * User-agent: Yandex Disallow: /search Allow: /search/about Allow: /search/howsearchworks Disallow: /sdch Disallow: /groups Disallow: /index.html? Disallow: /? Disallow: /goto? Allow: /?hl= Disallow: /?hl=*& Allow: /?hl=*&gws_rd=ssl$ Disallow: /?hl=*&*&gws_rd=ssl
```

Numbers

Rule lines

253

User-agent groups

4

AI crawlers named

0

Sitemaps

1

- Has no group for any AI crawler; they follow the * group
- Lists 1 sitemap
- Uses * or $ patterns in 29 rules

**Why it works.** A long file built from many specific Disallow and Allow pairs, so whole sections stay closed while chosen subpaths stay open.

**Copy this.** Pair a broad Disallow with narrower Allow lines for the subpaths you still want crawled.

- Search engine
- Long
- No AI crawler rules
- Lists a sitemap

IKEA [ikea.com/robots.txt ↗](https://www.ikea.com/robots.txt) captured Nov 1, 2026

Excerpt
ikea.com/robots.txt · excerpt

```
User-agent: Amazonbot Disallow: /
```

Numbers

Rule lines

113

User-agent groups

5

AI crawlers named

1

Sitemaps

1

- Blocks Amazonbot from the whole site
- Lists 1 sitemap
- Uses * or $ patterns in 96 rules

**Why it works.** Blocks Amazonbot entirely, gives Google's ad crawlers their own groups, and uses wildcard Allow lines to open fragment and filter URLs.

**Copy this.** Put crawlers that need different access in their own groups, even when most of their rules match the * group.

- Retail
- Medium length
- Blocks AI crawlers
- Lists a sitemap

Medium [medium.com/robots.txt ↗](https://medium.com/robots.txt) captured Nov 1, 2026

Excerpt
medium.com/robots.txt · excerpt

```
User-Agent: Amazonbot User-Agent: Applebot-Extended User-Agent: Bytespider User-Agent: ClaudeBot User-Agent: FacebookBot User-Agent: GoogleOther User-Agent: GPTBot User-Agent: meta-externalagent Disallow: / Allow: /about Allow: /business Allow: /earn Allow: /gift Allow: /membership
```

Numbers

Rule lines

39

User-agent groups

2

AI crawlers named

6

Sitemaps

1

- Blocks GPTBot, ClaudeBot, Applebot-Extended and Bytespider and 2 more AI crawlers from the whole site
- Lists 1 sitemap
- Uses * or $ patterns in 13 rules

**Why it works.** A short file that blocks six AI crawlers by name and still lists its sitemap for search engines.

**Copy this.** Block AI crawlers by token and keep the Sitemap line so search crawlers still find every page.

- Publishing
- Medium length
- Blocks AI crawlers
- Lists a sitemap

Reddit [reddit.com/robots.txt ↗](https://www.reddit.com/robots.txt) captured Nov 1, 2026

Excerpt
reddit.com/robots.txt · excerpt

```
User-agent: * Disallow: /
```

Numbers

Rule lines

2

User-agent groups

1

AI crawlers named

0

Sitemaps

0

- Has no group for any AI crawler; they follow the * group
- One group for every crawler

**Why it works.** The file served to our crawler disallows the whole site, which is how a site turns away crawlers it hasn't approved.

**Copy this.** User-agent: * with Disallow: / closes the site to every crawler that follows robots.txt; add named groups for the ones you allow.

- Community
- Short
- No AI crawler rules

Shopify [shopify.com/robots.txt ↗](https://shopify.com/robots.txt) captured Nov 1, 2026

Excerpt
shopify.com/robots.txt · excerpt

```
User-agent: * Disallow: /authentication/ Disallow: /*/account
```

Numbers

Rule lines

3

User-agent groups

1

AI crawlers named

0

Sitemaps

0

- Has no group for any AI crawler; they follow the * group
- Uses * or $ patterns in 1 rule
- One group for every crawler

**Why it works.** Three rules: account and authentication paths stay out, everything else is open. Nothing more to maintain.

**Copy this.** Start with the few private paths you never want crawled, and stop there.

- Ecommerce
- Short
- No AI crawler rules
- Uses wildcards

Stripe [stripe.com/robots.txt ↗](https://stripe.com/robots.txt) captured Nov 1, 2026

Excerpt
stripe.com/robots.txt · excerpt

```
User-agent: ia_archiver Allow: /docs/api Allow: /docs/api$ Disallow: /docs Disallow: /docs$ Disallow: /bitcoin/refund Disallow: /sources/refund Disallow: /sources/sepa_mandate Disallow: /sources/test_source Disallow: /sources/test_klarna Disallow: /handoff-healthcheck Disallow: /handoff
```

Numbers

Rule lines

26

User-agent groups

3

AI crawlers named

0

Sitemaps

1

- Has no group for any AI crawler; they follow the * group
- Lists 1 sitemap
- Uses * or $ patterns in 3 rules

**Why it works.** Gives the Internet Archive crawler (ia_archiver) its own group that keeps /docs out except the API reference, while the * group allows /docs.

**Copy this.** Use a trailing $ to match one exact URL, and a separate group when one crawler needs different access.

- SaaS
- Medium length
- No AI crawler rules
- Lists a sitemap

The Guardian [theguardian.com/robots.txt ↗](https://www.theguardian.com/robots.txt) captured Nov 1, 2026

Excerpt
theguardian.com/robots.txt · excerpt

```
User-agent: NewsNow User-agent: CCBot User-agent: TurnitinBot User-agent: PetalBot User-agent: MoodleBot User-agent: FacebookBot User-agent: Bytespider User-agent: Mojeek User-agent: JenkersBot User-agent: Seekr User-agent: YouBot User-agent: Arquivo-web-crawler User-agent: coccocbot-web User-agent: SeznamBot
```

Numbers

Rule lines

92

User-agent groups

3

AI crawlers named

10

Sitemaps

2

- Blocks ClaudeBot, Claude-User, Claude-SearchBot and anthropic-ai and 6 more AI crawlers from the whole site
- Lists 2 sitemaps
- Uses * or $ patterns in 22 rules

**Why it works.** Blocks a long list of AI and scraping crawlers in a single group, which keeps a 92-line file easy to read.

**Copy this.** Stack every crawler you block in one group with a single Disallow: / under it.

- Media
- Medium length
- Blocks AI crawlers
- Lists a sitemap

The New York Times [nytimes.com/robots.txt ↗](https://www.nytimes.com/robots.txt) captured Nov 1, 2026

Excerpt
nytimes.com/robots.txt · excerpt

```
User-agent: anthropic-ai Disallow: / User-agent: Applebot-Extended Disallow: / User-agent: Bytespider Disallow: / User-agent: CCBot Disallow: /
```

Numbers

Rule lines

273

User-agent groups

63

AI crawlers named

15

Sitemaps

25

- Blocks GPTBot, ChatGPT-User, OAI-SearchBot and ClaudeBot and 10 more AI crawlers from the whole site
- Gives Amazonbot path-level rules
- Lists 25 sitemaps

**Why it works.** Names 15 AI crawlers and blocks most of them from the whole site, with 25 sitemaps listed for the crawlers it does allow.

**Copy this.** One group per crawler you want to stop, each ending in Disallow: /, then your Sitemap lines.

- Media
- Long
- Blocks AI crawlers
- Lists a sitemap

Wikipedia [en.wikipedia.org/robots.txt ↗](https://en.wikipedia.org/robots.txt) captured Nov 1, 2026

Excerpt
en.wikipedia.org/robots.txt · excerpt

```
User-agent: MJ12bot Disallow: /
```

Numbers

Rule lines

500

User-agent groups

34

AI crawlers named

0

Sitemaps

1

- Has no group for any AI crawler; they follow the * group
- Lists 1 sitemap
- Sets Crawl-delay for 1 group (Google ignores it)

**Why it works.** Blocks 30 crawlers by name with Disallow: / in their own groups, while the * group keeps the encyclopedia itself open.

**Copy this.** Block misbehaving crawlers by name in their own groups and keep the * group for everyone else.

- Reference
- Long
- No AI crawler rules
- Lists a sitemap

Side by side

## The New York Times vs GitHub.

Two captures that solve the same job differently. Numbers come from the captures.

The New York Times nytimes.com

```
User-agent: anthropic-ai Disallow: / User-agent: Applebot-Extended Disallow: / User-agent: Bytespider Disallow: /
```

- Blocks GPTBot, ChatGPT-User, OAI-SearchBot and ClaudeBot and 10 more AI crawlers from the whole site
- Gives Amazonbot path-level rules
- Lists 25 sitemaps

GitHub github.com

```
User-agent: Bytespider Disallow: /
```

- Blocks Bytespider from the whole site
- Gives GPTBot, OAI-SearchBot and ClaudeBot path-level rules
- Lists 1 sitemap

| The New York Times | GitHub |
| Rule lines | 273 | 517 |
| User-agent groups | 63 | 6 |
| AI crawlers named | 15 | 6 |
| Sitemaps | 25 | 1 |

Pattern library

## 4 patterns to _copy_.

Templates we wrote from what the examples have in common. Replace the placeholders in braces.

01

### Open site with a sitemap

Most small sites: nothing to hide, and you want crawlers to find every page quickly.

Our template

```
User-agent: * Disallow: Sitemap: https://{your-domain}/sitemap.xml
```

02

### Keep private paths out

Account, cart, search and admin URLs that waste crawl requests and shouldn't appear in results.

Our template

```
User-agent: * Disallow: /account/ Disallow: /cart Disallow: /search Disallow: /admin/ Sitemap: https://{your-domain}/sitemap.xml
```

03

### Block AI training, keep AI search

You want to stay out of model training but still be fetched and cited by AI search tools.

Our template

```
User-agent: GPTBot User-agent: ClaudeBot User-agent: CCBot User-agent: Google-Extended Disallow: / User-agent: OAI-SearchBot User-agent: Claude-SearchBot User-agent: PerplexityBot Allow: / User-agent: * Disallow: /admin/ Sitemap: https://{your-domain}/sitemap.xml
```

04

### Close faceted URLs

Shops and listings where sort, filter and page parameters create endless near-duplicate URLs.

Our template

```
User-agent: * Disallow: /*?sort= Disallow: /*?filter= Disallow: /*&page= Allow: /*?page=1$ Sitemap: https://{your-domain}/sitemap.xml
```

_01_Checklist

## How a robots.txt file is read

The file lives at the root of the host, for example `https://example.com/robots.txt`, and its rules apply only to that host and protocol. Rules come in groups: one or more `User-agent` lines followed by `Allow` and `Disallow` lines. RFC 9309 says crawlers must use case-insensitive matching to find the group for their product token, and the most specific path match wins, meaning the rule with the most octets.

1. 01 **One group per crawler, or several crawlers per group.** GitHub stacks five AI crawlers above one rule block; the BBC gives each its own group.
2. 02 **Allow carves exceptions.** Stripe's group for the Internet Archive disallows `/docs` but allows `/docs/api`, and the longer match decides.
3. 03 **A trailing `$` anchors the end of the URL.** Use it to allow one exact path without opening everything below it.
4. 04 **`Sitemap` lines sit outside the groups** and use the full URL. The New York Times lists 25.

**Blocking a URL doesn't remove it from Google**Google's [robots.txt](/glossary/robots-txt) guide says the file is not a mechanism for keeping a web page out of Google. To keep a page out of results, use `noindex` or password protection, and let Google crawl the page so it can see the `noindex`.

_02_Fields in the examples above

## What Google supports and ignores

Google supports four fields: `user-agent`, `allow`, `disallow` and `sitemap`. Its documentation says other fields such as `crawl-delay` aren't supported, so the [Crawl-delay](/glossary/crawl-delay) lines in GitHub's and Stripe's files are read by other crawlers, not [Googlebot](/ai-crawlers/googlebot). Google enforces a size limit of 500 kibibytes and ignores content after it; RFC 9309 asks crawlers to parse at least that much.

Field

### user-agent

Google

Supported

Seen in

All twelve files

Field

### disallow / allow

Google

Supported

Seen in

All twelve files

Field

### sitemap

Google

Supported

Seen in

Ten of twelve files

Field

### crawl-delay

Google

Not supported

Seen in

GitHub, Wikipedia, Stripe

_03_Explained

## Naming AI crawlers

AI companies publish separate [tokens](/glossary/tokenization) for training and for search or user requests. [OpenAI](/ai-search/chatgpt/how-it-finds-sources)'s [GPTBot](/ai-crawlers/gptbot) collects training data while [OAI-SearchBot](/glossary/chatgpt-search) fetches pages for [ChatGPT](/ai-search/chatgpt) search; Anthropic's [ClaudeBot](/ai-crawlers/claudebot) is its training crawler. A group for one token doesn't cover the others, which is why the publishers above list them one by one.

Before you publish, run the file through a tester for each token you care about. Our [robots.txt tester](/tools/robots-txt-tester) checks any URL against a named crawler. For the file that points AI tools to your best pages, see the [llms.txt examples](/examples/llms-txt).

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ Where does the robots.txt file go?

At the root of each host: `https://example.com/robots.txt`. A file on `www.example.com` doesn't cover `blog.example.com`, and the http and [https](/glossary/https) versions are separate too.

_02_ Does robots.txt stop a page from appearing in Google?

No. Google says robots.txt is not a mechanism for keeping a page out of Google. Use a `noindex` rule or password protection, and leave the page crawlable so Google can see the `noindex`.

_03_ Does Google follow Crawl-delay?

No. Google's documentation lists the fields it supports as user-agent, allow, disallow and sitemap, and says fields such as crawl-delay aren't supported.

_04_ How big can a robots.txt file be?

Google reads the first 500 kibibytes and ignores the rest. RFC 9309 asks crawlers to parse at least 500 kibibytes.

Sources · 17

## Every fact, linked and dated.

Official docs first, then every capture with the date we fetched it.

- rfc-editor.org
- google.com
- openai.com
- claude.com
- apple.com
- co.uk
- github.com
- ikea.com

1. 01 [RFC 9309: Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309.html) rfc-editor.org · checked 2026-11-01
2. 02 [How Google interprets the robots.txt specification](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt) developers.google.com · checked 2026-11-01
3. 03 [Robots.txt introduction and guide](https://developers.google.com/search/docs/crawling-indexing/robots/intro) developers.google.com · checked 2026-11-01
4. 04 [Overview of OpenAI crawlers](https://platform.openai.com/docs/bots) platform.openai.com · checked 2026-11-01
5. 05 [Does Anthropic crawl data from the web, and how can site owners block the crawler?](https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler) support.claude.com · checked 2026-11-01
6. 06 [Apple robots.txt](https://www.apple.com/robots.txt) apple.com · checked 2026-11-01
7. 07 [BBC robots.txt](https://www.bbc.co.uk/robots.txt) bbc.co.uk · checked 2026-11-01
8. 08 [GitHub robots.txt](https://github.com/robots.txt) github.com · checked 2026-11-01
9. 09 [Google robots.txt](https://www.google.com/robots.txt) google.com · checked 2026-11-01
10. 10 [IKEA robots.txt](https://www.ikea.com/robots.txt) ikea.com · checked 2026-11-01
11. 11 [Medium robots.txt](https://medium.com/robots.txt) medium.com · checked 2026-11-01
12. 12 [Reddit robots.txt](https://www.reddit.com/robots.txt) reddit.com · checked 2026-11-01
13. 13 [Shopify robots.txt](https://shopify.com/robots.txt) shopify.com · checked 2026-11-01
14. 14 [Stripe robots.txt](https://stripe.com/robots.txt) stripe.com · checked 2026-11-01
15. 15 [The Guardian robots.txt](https://www.theguardian.com/robots.txt) theguardian.com · checked 2026-11-01
16. 16 [The New York Times robots.txt](https://www.nytimes.com/robots.txt) nytimes.com · checked 2026-11-01
17. 17 [Wikipedia robots.txt](https://en.wikipedia.org/robots.txt) en.wikipedia.org · checked 2026-11-01

## Keep learning

[All examples](/examples)

[Do Test your robots.txt Free tool, no sign-up](/tools/robots-txt-tester) [Examples 404 page examples](/examples/404-page) [Examples Alt text examples](/examples/alt-text) [Examples Breadcrumb schema examples](/examples/breadcrumb-schema)

Profiles of sites in this gallery
[Apple AI crawler access](/domains/apple.com) [Shopify AI crawler access](/domains/shopify.com)

More examples
[404 page examples](/examples/404-page) [Alt text examples](/examples/alt-text) [Breadcrumb schema examples](/examples/breadcrumb-schema) [Canonical tag examples](/examples/canonical-tag) [FAQ schema examples](/examples/faq-schema) [H1 tag examples](/examples/h1-tag) [Hreflang examples](/examples/hreflang) [llms.txt examples](/examples/llms-txt) [Meta description examples](/examples/meta-description) [Product schema examples](/examples/product-schema) [robots.txt examples](/examples/robots-txt) [Schema markup examples](/examples/schema-markup) [Sitemap examples](/examples/sitemap) [Title tag examples](/examples/title-tag)

Terms on this page
[robots.txt](/glossary/robots-txt) [Crawl-delay](/glossary/crawl-delay) [Tokenization](/glossary/tokenization) [ChatGPT search](/glossary/chatgpt-search) [HTTPS](/glossary/https)

Free · 2 minutes

## Seen the examples? _Now check your own site._

The free audit reads your robots.txt, title tags, meta descriptions, structured data and status codes, and lists what to fix.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
