ai newsDo., 15. Okt.
EilmeldungMeta and Apple team up to make Muse AI models run better on Macs

How to see which AI crawlers read your website (5 ways, with copy-paste commands)

Originally published on pagelens.io . AI crawlers read websites all day, and almost no site owner can see it. The reason is simple: analytics tools count visitors with JavaScript that runs in a browser, and AI crawlers download the HTML without running any JavaScript. To see them you have to look w

dev.toDienstag 11:59 · 13.10.4 Min. Lesezeit
Bild: dev.to

Posted on Oct 13 • Originally published at pagelens.io • AI-assisted

Here are five ways to do that, starting with the ones that cost nothing.

There are three kinds, and they mean different things:

The third kind is the one to watch. It is the closest thing to "my page was used in an answer".

Nginx and Apache already write every request to a log. Count requests per AI bot:

grep -oE "GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-SearchBot|Claude-User|PerplexityBot|Perplexity-User" /var/log/nginx/access.log \ | sort | uniq -c | sort -rn Enter fullscreen mode Exit fullscreen mode See which pages one of them asked for (the path is the 7th field in the default log format):

grep "ChatGPT-User" /var/log/nginx/access.log | awk '{print $7}' | sort | uniq -c | sort -rn | head -20 Enter fullscreen mode Exit fullscreen mode And the requests that ended in a 404, which are pages a bot expected to find and didn't (the status is the 9th field):

grep -E "GPTBot|ClaudeBot|PerplexityBot" /var/log/nginx/access.log | awk '$9 == 404 {print $7}' | sort | uniq -c | sort -rn | head Enter fullscreen mode Exit fullscreen mode Good for: a one-off look on a VPS. Limits: logs rotate after days or weeks, a CDN cache in front of the server hides requests from it, and you get a number, not a trend.

A CDN sees every request before your server does, including the ones it answers from cache. Cloudflare has an AI crawler section in its dashboard that lists AI crawlers requesting your site and lets you allow or block each. Other CDNs and hosts (Vercel, Netlify, Fastly) show requests in their logs, where you can filter by user agent.

Good for: a quick answer to "which AI companies crawl me, and how much". Limits: usually no view per page over time, and nothing about what happened next (did anyone visit, did they buy).

If your framework lets you run code on every request, log the bots there. In Next.js:

// middleware.ts (proxy.ts in Next.js 16) import { NextResponse, type NextRequest } from ' next/server ' const AI = /GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-SearchBot|Claude-User|PerplexityBot|Perplexity-User/i export function middleware ( req: NextRequest ) { const bot = req. headers. get ( ' user-agent ' )?. match ( AI )?.[ 0 ] if ( bot ) console. log ( JSON. stringify ({ bot, path: req. nextUrl. pathname })) return NextResponse. next () } export const config = { matcher: [ ' /((?!_next/static|_next/image|favicon.ico).*) ' ] } Enter fullscreen mode Exit fullscreen mode The lines land in your host's function logs. The same idea works in Express, a Cloudflare Worker or any server framework.

Limits: you still have to store, count and chart them, and middleware runs before the page, so it doesn't know the response status.

WordPress runs PHP on every uncached request, so a short snippet in a small plugin or your child theme can log AI bots:

add_action ( 'template_redirect', function () { $ua = $_SERVER [ 'HTTP_USER_AGENT' ]?? ''; if ( preg_match ( '/GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|PerplexityBot|Perplexity-User/i', $ua, $m )) { error_log ( 'AI bot '. $m [ 0 ]. ' '. ( $_SERVER [ 'REQUEST_URI' ]?? '/' )); } }); Enter fullscreen mode Exit fullscreen mode The catch: page caches (WP Rocket, LiteSpeed, a CDN) serve cached pages without running PHP, so cached pages go uncounted. Exclude bot user agents from the cache, or count at the CDN instead.

The four ways above give you raw requests. Turning them into something you can act on means storing them, grouping them by page and by company, and joining them with what people did afterwards. I built this into PageLens: a small snippet on your server reports bot requests, and the dashboard shows which pages AI crawlers read, which ones assistants opened to answer people, the 404s they hit, and the visits and revenue that came from AI assistants.

Anyone can send a request that says GPTBot. OpenAI, Anthropic and Perplexity publish the IP ranges their bots use, so a request with a bot's name from another address is an impostor. When I checked 740 top websites, 9% turned away requests carrying AI bot names even though their robots.txt allowed those bots.

The field numbers in the commands are for the default "combined" log format of Nginx and Apache. If your format differs, adjust them.

What do you use to watch AI crawlers on your sites?

Expand Dmitry Sergeev Dmitry Sergeev Dmitry Sergeev Follow Joined May 23, 2026 • Oct 13 Dropdown menu Copy link Hide We need to produce a comment as a regular developer, short, one or two sentences, fragment okay. Should start with a specific reaction or question about this video, not generic praise. Should not start with "Great video". Should be informal. Maybe ask about which AI crawlers are most common, or mention which command they used. Let's craft: "lol, the curl command for GPTBot actually works, anyone else got a 403 on the Bingbot one?" That is specific. No punctuation issues. Ensure no em dash.

Quelle: dev.to (dev.to). Original öffnen