Sub topic 15
Checking crawler access and referral traffic
This chapter shows how to confirm that AI crawlers can reach your pages and how to see whether answer engines send visitors. It assumes you can read a web server access log, edit robots.txt, and use a command line. Earlier chapters covered crawler user agents and robots rules. Here you verify that those settings work in practice.
What you can and cannot measure
You can measure two things directly.
- Crawler access. Your server logs record every request, including the user-agent string, the URL, and the response status.
- Referral traffic. Your analytics or logs record visits that arrive from a link on an answer engine.
You cannot measure whether a page was retrieved and used inside an answer when no one clicked. A citation that nobody follows leaves no trace on your server. Treat log and referral data as partial evidence, not a full count of visibility.
Step 1: Check what your robots.txt actually says
Start with the file the crawlers read. Fetch it the way a crawler would and confirm that it returns a 200 status and plain text.
curl -s -o /dev/null -w "%{http_code} %{content_type}\n" https://www.example.com/robots.txt
curl -s https://www.example.com/robots.txtCommon errors at this step:
- The file returns a 404, a redirect to an HTML page, or a 5xx error. Crawlers may then treat the site as unrestricted, or as temporarily unavailable, depending on the crawler.
- A rule under
User-agent: *conflicts with a more specific group. A crawler follows the group that best matches its own name, so a specific group replaces the wildcard group for that crawler. - A CDN or firewall serves a different
robots.txtto bots than to browsers.
A policy that separates search from training looks like this:
# Allow the crawler that builds ChatGPT's search index
User-agent: OAI-SearchBot
Allow: /
# Opt out of model training use
User-agent: GPTBot
Disallow: /
# Allow Perplexity's search crawler
User-agent: PerplexityBot
Allow: /
# Allow Bing, whose index Copilot draws on
User-agent: bingbot
Allow: /Step 2: Count crawler requests in your logs
Search your access log for the user-agent names that matter. This loop counts requests per name.
for ua in OAI-SearchBot ChatGPT-User GPTBot PerplexityBot Perplexity-User bingbot; do
echo "$ua: $(grep -c "$ua" access.log)"
doneRead the counts by role:
| User agent | Role | What a nonzero count means |
|---|---|---|
| OAI-SearchBot | Builds the ChatGPT search index | Your pages are being considered for the index |
| ChatGPT-User | User-initiated fetch | A person or a session asked ChatGPT to open your page |
| GPTBot | Training crawler | Expected to be zero if you block it |
| PerplexityBot | Builds the Perplexity index | Your pages are being considered for the index |
| Perplexity-User | User-initiated fetch | A Perplexity user's query triggered a live fetch |
| bingbot | Bing index crawler | Your pages feed the index that Copilot draws on |
A count of zero does not prove a block. The crawler may simply not have visited yet, or your log may cover too short a period. A nonzero count for a crawler you disallowed points to a rules problem, a caching delay, or an impostor.
Look at status codes, not just counts
A crawler that visits and receives errors gains nothing. Break the requests down by response status. This example assumes the common combined log format, where the status code is the ninth field.
grep "OAI-SearchBot" access.log | awk '{print $9}' | sort | uniq -c | sort -rnInterpret the result:
- Mostly
200: access works. - Many
403or429: a firewall, bot-protection rule, or rate limit is rejecting the crawler. - Many
404: the crawler follows old URLs, perhaps from an outdated sitemap. 301or302chains: the crawler spends its requests on redirects.5xx: your server fails under crawl load.
Also check which URLs get requested. If the crawler only fetches /robots.txt and a few pages, a rule or an access control may be stopping it deeper in the site.
Step 3: Rule out impostors
A user-agent string is a self-reported label. Anyone can send GPTBot in a request header. Before you trust a count or write a firewall rule, confirm that the source is genuine.
Providers publish verification material, such as lists of IP ranges or reverse DNS patterns for their crawlers. Check each provider's current documentation, because ranges change. The general method has two parts.
- Take the client IP address from the log line for the suspect request.
- Compare it with the provider's published IP ranges, or run a reverse DNS lookup followed by a forward lookup to confirm both directions agree.
host 203.0.113.45If the address belongs to an unrelated hosting provider, the traffic is probably a scraper using a borrowed name. Do not count it as an answer-engine visit.
Step 4: Find referral traffic from answer engines
When a reader clicks a citation, the browser may send a Referer header naming the source site. Analytics tools group this as a referral. Look for source domains such as chatgpt.com, perplexity.ai, copilot.microsoft.com, and bing.com.
You can also check the logs. This command lists the most common referrer values that match those domains. It assumes the combined log format, where the referrer is the fourth quoted field.
grep -E "chatgpt\.com|perplexity\.ai|copilot\.microsoft\.com" access.log \
| awk -F'"' '{print $4}' | sort | uniq -c | sort -rn | headSome engines add a query parameter to outbound links, such as a utm_source value naming the engine. Look at the full landing URLs in your analytics to see whether any engine tags its links. Engines may change this behavior without notice, so check your own data rather than assuming a fixed pattern.
Why referral data undercounts
- Some browsers, apps, or privacy settings strip the
Refererheader. Those visits appear as "direct". - Copilot traffic may appear under Bing or Microsoft domains, which also carry ordinary search traffic. You may not be able to separate them.
- Many users read the answer and never click.
- Mobile apps may open links in an in-app browser that sends no referrer.
For these reasons, a small referral count does not mean few citations. Use the trend over weeks, not a single day.
Step 5: Connect the pieces
The pipeline you inspect has three observable points. A fetch in the logs shows access. A page in the index shows eligibility. A referral shows a click. Each can fail independently.
Use this to diagnose a problem by working from left to right.
| Symptom | Likely stage | First thing to check |
|---|---|---|
| No crawler requests at all | Access | `robots.txt` content and firewall rules |
| Requests but many 403 or 429 | Access | Bot protection and rate limits |
| Healthy 200 responses, no referrals | Index or citation | Content quality, freshness, query match |
| Referrals from one engine, none from another | Source differences | That engine's crawler and index source |
For Copilot, remember that it draws on the Bing index. Checking bingbot access and Bing's own webmaster tools is the most direct route, because you cannot inspect Copilot's retrieval itself.
Step 6: Build a repeatable check
Run the same checks on a schedule so you can compare results over time. This script reports counts and the status-code split for each crawler in one pass.
#!/usr/bin/env bash
# usage: ./crawler-report.sh access.log
log="$1"
for ua in OAI-SearchBot ChatGPT-User GPTBot PerplexityBot Perplexity-User bingbot; do
total=$(grep -c "$ua" "$log")
echo "== $ua: $total requests"
grep "$ua" "$log" | awk '{print $9}' | sort | uniq -c | sort -rn
doneSave the output with the date. After you change robots.txt or a firewall rule, compare the next report with the previous one.
Common mistakes
- Treating a zero count over one day as proof of a block.
- Trusting the user-agent string without checking the source address.
- Counting
GPTBotvisits as search visibility. It is the training crawler. - Expecting every citation to produce a referral.
- Changing several rules at once, so you cannot tell which change had an effect.
Exercise
Your log shows 400 requests from OAI-SearchBot in a week, and 380 of them returned 403. Your robots.txt allows OAI-SearchBot. What is the most likely cause, and how would you confirm the crawler is genuine before you change anything?
Show answer
The robots.txt rules are not the problem, because robots rules do not produce 403 responses. A firewall, CDN bot filter, or rate limit is most likely rejecting the requests. First confirm that the source IP addresses match the provider's published ranges (or pass a reverse and forward DNS check), so you do not open access to an impostor. Then add an exception for the verified addresses, and compare the next week's status-code split with this one.
Exercise
Perplexity-User appears in your logs 30 times this month, but your analytics show only 4 referral visits from perplexity.ai. Name two reasons the numbers can differ.
Show answer
Perplexity-User is a fetch made on behalf of a user query, and a fetch does not always lead to a click on your page. The referral count also misses visits where the Referer header is stripped, which analytics records as direct traffic. Readers may also read the answer without clicking, or open links in an app that sends no referrer.