Which AI Crawlers Visit Your Site? Find Out with CloudFront Logs and Athena A new AWS builder guide shows how to use CloudFront access logs and Amazon Athena queries to determine whether AI crawlers such as OAI-SearchBot, ChatGPT-User, GPTBot and PerplexityBot reach a site, which pages they fetch, and which requests fail with 403 or 404 errors. The guide instructs operators to enable CloudFront standard logging (v2), which can deliver to Amazon S3, CloudWatch Logs or Data Firehose in JSON, W3C or Parquet formats, and notes that logging changes can take up to 12 hours to take effect and that CloudFront never deletes log files, so an S3 lifecycle rule is needed. It follows an earlier article on the three layers — robots.txt, AWS WAF rules and page rendering — that decide whether AI crawlers can reach a site on Amazon S3 and CloudFront. Which AI Crawlers Visit Your Site? Find Out with CloudFront Logs and Athena Use CloudFront access logs and a few Amazon Athena queries to see whether OAI-SearchBot, PerplexityBot and other crawlers reach your site, which pages they fetch, which requests fail with 403 or 404, and whether AI answers send you visitors. SEO, Technical SEO & AI Search Optimization In an earlier article, Is Your AWS Setup Blocking AI Search Crawlers? https://builder.aws.com/content/37s1LBw7NKxCpxcsJKQwWM1qTjV/is-your-aws-setup-blocking-ai-search-crawlers , we covered the three layers that decide whether AI crawlers can reach a site on Amazon S3 and CloudFront: robots.txt, AWS WAF rules and page rendering. This article answers the next question: are they actually visiting, what are they fetching, and are any of those requests failing? You can answer all three with data you may already have: CloudFront access logs and a few Amazon Athena queries. 1. Turn on CloudFront standard logging If logging isn't on yet, enable it on your distribution. CloudFront now offers standard logging v2 https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/standard-logging.html , which can deliver to Amazon S3, CloudWatch Logs or Data Firehose, in formats including JSON, W3C and Parquet. The original tab-delimited logging now called "legacy" still works, and you can run both on one distribution as long as they write to different buckets or prefixes. A few practical notes from the documentation: - CloudFront doesn't charge for enabling standard logs. You pay for the destination: S3 storage and requests, or CloudWatch/Firehose ingestion. - Logging changes can take up to 12 hours to take effect. - CloudFront never deletes log files, so add an S3 lifecycle rule to expire old ones. The queries below use the legacy tab-delimited format delivered to S3, because it's the most common setup. If you use v2 with JSON or Parquet, the column names are the same idea. Athena has matching table definitions for JSON https://docs.aws.amazon.com/athena/latest/ug/create-cloudfront-table-manual-json.html and Parquet with partition projection https://docs.aws.amazon.com/athena/latest/ug/create-cloudfront-table-partition-parquet.html . 2. Create the Athena table This is the table definition from the Athena documentation for CloudFront standard logs https://docs.aws.amazon.com/athena/latest/ug/create-cloudfront-table-standard-logs.html . Replace the bucket path with yours: CREATE EXTERNAL TABLE IF NOT EXISTS cloudfront standard logs date DATE, time STRING, x edge location STRING, sc bytes BIGINT, c ip STRING, cs method STRING, cs host STRING, cs uri stem STRING, sc status INT, cs referrer STRING, cs user agent STRING, cs uri query STRING, cs cookie STRING, x edge result type STRING, x edge request id STRING, x host header STRING, cs protocol STRING, cs bytes BIGINT, time taken FLOAT, x forwarded for STRING, ssl protocol STRING, ssl cipher STRING, x edge response result type STRING, cs protocol version STRING, fle status STRING, fle encrypted fields INT, c port INT, time to first byte FLOAT, x edge detailed result type STRING, sc content type STRING, sc content len BIGINT, sc range start BIGINT, sc range end BIGINT ROW FORMAT DELIMITEDFIELDS TERMINATED BY '\t'LOCATION 's3://your-log-bucket/cloudfront/'TBLPROPERTIES 'skip.header.line.count'='2' ; date is a reserved word in Athena, so put it in double quotes in your queries. 3. See which crawlers visit and how their requests end This query groups the last 30 days of requests by crawler and shows how many succeeded, were blocked or hit a missing page: WITH bots AS SELECT cs uri stem, sc status, CASE WHEN cs user agent LIKE '%OAI-SearchBot%' THEN 'OAI-SearchBot' WHEN cs user agent LIKE '%ChatGPT-User%' THEN 'ChatGPT-User' WHEN cs user agent LIKE '%GPTBot%' THEN 'GPTBot' WHEN cs user agent LIKE '%PerplexityBot%' THEN 'PerplexityBot' WHEN cs user agent LIKE '%ClaudeBot%' THEN 'ClaudeBot' WHEN cs user agent LIKE '%Googlebot%' THEN 'Googlebot' WHEN cs user agent LIKE '%bingbot%' THEN 'bingbot' WHEN cs user agent LIKE '%Applebot%' THEN 'Applebot' END AS bot FROM cloudfront standard logs WHERE "date" = current date - INTERVAL '30' DAY SELECT bot, COUNT AS requests, COUNT DISTINCT cs uri stem AS unique paths, SUM CASE WHEN sc status = 200 THEN 1 ELSE 0 END AS ok 200, SUM CASE WHEN sc status = 403 THEN 1 ELSE 0 END AS forbidden 403, SUM CASE WHEN sc status = 404 THEN 1 ELSE 0 END AS not found 404FROM botsWHERE bot IS NOT NULLGROUP BY botORDER BY requests DESC; How to read the result: - No rows for OAI-SearchBot or PerplexityBot at all. The crawler either isn't finding your site or is being turned away before it gets far. Check robots.txt and WAF, as covered in the previous article https://builder.aws.com/content/37s1LBw7NKxCpxcsJKQwWM1qTjV/is-your-aws-setup-blocking-ai-search-crawlers . - Many 403s. When AWS WAF blocks a request, CloudFront returns 403 by default. Compare the timestamps with your WAF logs to find the rule responsible. - Many 404s. The crawler is following old or broken URLs. Fix the links or add redirects for pages that moved. - Mostly 200s. Access is working. If you still don't appear in AI answers, the issue is your content, not your infrastructure see section 6 . The CASE order matters: ChatGPT-User and OAI-SearchBot are checked before GPTBot , so each request lands in exactly one bucket. Add other crawlers you care about the same way. 4. See which pages AI search crawlers fetch SELECT cs uri stem, COUNT AS requests, MAX "date" AS last seenFROM cloudfront standard logsWHERE "date" = current date - INTERVAL '30' DAY AND cs user agent LIKE '%OAI-SearchBot%' AND sc status = 200GROUP BY cs uri stemORDER BY requests DESCLIMIT 50; Compare the list with the pages that matter most to your business: service pages, pricing and contact. If the crawler spends its visits on tag archives, search pages or old campaign URLs, tighten your internal links and sitemap so the important pages are easy to reach. Swap in PerplexityBot or any other user agent to run the same check. It's also worth confirming crawlers can read robots.txt itself: SELECT "date", time, sc status, cs user agentFROM cloudfront standard logsWHERE cs uri stem = '/robots.txt' AND "date" = current date - INTERVAL '7' DAYORDER BY "date" DESC, time DESCLIMIT 100; Anything other than 200 here especially a 403 or a 200 that returns your HTML homepage means crawlers can't read your rules. 5. Make sure the visitor is really the crawler User-agent strings are easy to fake, and scrapers often pretend to be well-known bots. Before you add an allow rule because of what you see in logs, check the c ip values against the IP ranges each company publishes. OpenAI lists the ranges for OAI-SearchBot, GPTBot and ChatGPT-User on its crawler overview page https://developers.openai.com/api/docs/bots , and Google, Microsoft, Apple and Perplexity publish theirs in their crawler documentation. If you use AWS WAF Bot Control, it already does this verification for its "verified bot" labels, and the AWS WAF AI activity dashboard https://aws.amazon.com/about-aws/whats-new/2026/02/aws-waf-ai-activity-dashboard gives a quick view of AI bot traffic without writing queries. The Athena approach is still useful when WAF isn't in front of your site or you want history beyond what the dashboard shows. 6. Check whether AI answers send you visitors Crawler visits are only half the picture. The other half is people clicking through from AI answers. This query counts HTML page views referred by ChatGPT or Perplexity: SELECT "date", COUNT AS visitsFROM cloudfront standard logsWHERE "date" = current date - INTERVAL '30' DAY AND sc content type LIKE 'text/html%' AND cs referrer LIKE '%chatgpt.com%' OR cs referrer LIKE '%perplexity.ai%' OR cs uri query LIKE '%utm source=chatgpt.com%' GROUP BY "date"ORDER BY "date"; Treat the result as a minimum. Some apps don't pass a referrer, and the way AI tools tag their links has changed more than once, so part of this traffic shows up as "direct" in any analytics tool. If crawlers fetch your pages successfully but you rarely see referrals or mentions, the next step is content and reputation rather than infrastructure: clear service pages, consistent business listings and trusted mentions on other sites. We wrote a step-by-step guide on that side of the work: How to Rank in ChatGPT: Get Your Business Recommended https://losangelesseoinc.com/how-to-rank-in-chatgpt/ . 7. Keep Athena costs low Athena charges by the amount of data each query scans. The legacy table above isn't partitioned, so every query reads every log file in the bucket. To keep costs down: - Always filter by "date" and add LIMIT while exploring. - Expire old logs with an S3 lifecycle rule. - For busy sites, switch to standard logging v2 with Parquet output and a partitioned Athena table https://docs.aws.amazon.com/athena/latest/ug/create-cloudfront-table-partition-parquet.html , so queries read only the days they need. Quick checklist 1. CloudFront standard logging is on, with a lifecycle rule for old files. 1. The Athena table points at your log bucket. 1. OAI-SearchBot, PerplexityBot and the search engine crawlers appear in your logs. 1. Their requests are mostly 200s, not 403s or 404s. 1. /robots.txt returns 200 to crawlers. 1. The pages crawlers fetch match the pages that matter to your business. 1. Suspicious "bot" traffic is checked against published IP ranges before you allow it. 1. Referrals from AI answers are tracked, even if the numbers are a floor. Written by Los Angeles SEO Inc, an AI search and growth marketing agency in Los Angeles. Founded in 2013 by Sasan Raeisi. Enjoyed reading this content? Let the author know Your likes, comments, shares, and saves help creators reach more builders. Loading recommendations