Urgent.News

What's breaking now, across thousands of outlets.

AI

Is that really GPTBot? How to verify AI crawlers in your logs

Open any access log today and you'll see GPTBot, ClaudeBot, PerplexityBot and friends. The problem: a user agent is just a string. Anyone can send User-Agent: GPTBot from a $5 VPS, and scrapers do it on purpose, because many sites whitelist "good bots". So before you celebrate ("ChatGPT reads my site!") or panic ("AI bots are hammering my server!"), check whether the traffic is real. Here's how,…

Open any access log and you'll encounter user agents such as GPTBot, ClaudeBot, and PerplexityBot. However, these user agents are merely strings that anyone can send from a cheap virtual private server, often to circumvent bot filters. To determine if a bot's traffic is genuine, there are a few techniques to employ.

First, compare the IP address of the bot against the IP ranges published by the bot's creators. For example, OpenAI provides a JSON file with CIDR ranges for GPTBot and other bots. You can write a Node.js function to convert IPv4 addresses and CIDR ranges to integers, and then check if the IP falls within any of the published ranges. This method should be used with caution, as fake bots may also use these published IP ranges.

Another method is to utilize DNS reverse and forward lookups. Certain crawlers, like Googlebot and Bingbot, are verified through DNS records. First, reverse lookup the IP to see if it resolves to a hostname on the bot's domain. Then, perform a forward lookup to confirm that the hostname resolves back to the original IP address. This method relies on the bot's domain controlling the IP block, as they cannot manipulate DNS records for the real bot's IP address.

To implement these methods in a log file analysis script, you can use regular expressions to identify bot user agents, then apply the IP range or DNS checks accordingly. Always ensure the bot's official documentation is consulted for the most accurate and up-to-date information on their verification methods. Remember, these techniques should be used to ensure accurate data collection and proper bot blocking, rather than fearmongering or celebrating undeserved attention.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Google Tabletop AI: Build Custom Collaboration Apps by Describing Them

Google Tabletop AI: Describe the App, Skip the Spreadsheet Google just admitted something the productivity industry has been dancing around for years: nobody actually wants to configure a…

  • Tabletop AI tool creates custom collaboration apps based on user descriptions.
  • Users can generate interactive tools like trip itineraries or expense splitters.
  • Currently an experimental service for adults in one country with age limit 18+.

How to review an AI-written pull request: a 10-point checklist

AI-written pull requests have a particular look. The code is tidy, the names are sensible, the description is confident, and the tests are green.

  • Read the task description to understand original intent
  • Compare diff against task to avoid extra changes
  • Examine tests to validate new functionality

Query fan-out: why AI search never answers the question you typed

When you ask an AI assistant with web search something like "best CRM for a 5-person agency", it usually doesn't run that exact search.

  • AI search breaks down queries into smaller parts
  • Generates answer from amalgamation of results
  • Focus on concise sections answering sub-questions

More from Friday 13 November →