AI on the Internet

Bots on the Web: Good, Bad and AI

What web bots are, which ones help or harm, where AI crawlers and agents fit, and how site owners can identify and manage them.

Key takeaways

  • "Bot" describes how a request is made; whether it's welcome depends on purpose and behavior.
  • Search crawlers, monitors, feed readers and link previewers do work that most site owners want.
  • AI bots come in several kinds, including training crawlers, search crawlers and fetchers acting for a user.
  • A user-agent string is only a claim, so verify important bots by their published addresses or DNS names.
  • robots.txt is a request that polite bots honor; blocking the rest takes server-side controls.

A web bot is software that makes requests to websites without a person clicking each one. Some bots are why you can search the web at all. Others try stolen passwords, buy up tickets or flood servers. A growing share belongs to AI systems that collect text for training or fetch pages while answering someone's question.

If you run a website, bots are almost certainly a meaningful part of your traffic. The useful question is what each one is doing, what it costs you, what you get back and which control actually works on it.

What a bot is, technically

To your server, a bot looks like any other client. It resolves your domain, opens a connection and sends an HTTP request. The difference is that a program decided to send it. It might be a ten-line script on a laptop, a fleet of machines run by a search company or malware on thousands of infected devices.

Most requests carry a User-Agent header naming the software. Well-run bots identify themselves there, often with a link to a page explaining what they do. An illustrative example:

GET /pricing HTTP/1.1
Host: www.example.com
User-Agent: ExampleBot/1.0 (+https://example.com/bot)

The header can say anything, including a copy of a popular browser's string. How user-agent strings work explains why they're so messy, and the user-agent parser breaks one into its parts.

Bots most sites want

  • Search crawlers discover and index pages so people can find them. See how web crawlers work.
  • Uptime monitors request a page on a schedule and alert you when it fails.
  • Link previewers fetch a page when someone shares it, to show a title and image.
  • Feed readers poll your RSS or Atom feed for new items.
  • Archivers save copies of pages for the historical record.
  • Accessibility, security and quality scanners that you or a service you hired run against your own site.
  • Partner integrations that call your API under agreed terms.

Even welcome bots can misbehave. A monitor set to check every second, or a crawler stuck in an endless calendar of "next month" links, can load a small server heavily.

Bots that cause harm

Type What it does Typical sign
Credential stuffing Tries leaked username and password pairs Many failed logins from many addresses
Scraping Copies content, listings or prices at volume Systematic walks through catalog pages
Scalping Buys limited stock faster than people can Bursts at release time, repeated checkouts
Spam Fills forms and comments with junk Identical or link-heavy submissions
Card testing Tries many card numbers with small charges A spike in declined payments
Vulnerability scanning Probes for known weak software Requests for paths you don't have
Denial of service Floods the site to knock it offline Traffic far beyond normal, often distributed

Large attacks often come from botnets, networks of compromised routers, cameras and computers whose owners don't know. That's one reason blocking single addresses rarely settles anything. The mechanics of floods are covered in DDoS attacks explained.

Where AI bots fit

"AI bot" lumps together activities with different consequences.

  • Training crawlers collect pages that may be used to build future models.
  • AI search crawlers index pages so an answer engine can cite them.
  • User-triggered fetchers retrieve a page because a person asked an assistant about it.
  • Browser agents operate a real or automated browser to complete a task for someone, and may look much like a human visitor.
Four kinds of AI-related visitors
Training crawler Collects content at scale. Usually sends no readers back. AI search crawler Indexes pages that answers may link to. User-triggered fetcher Gets a page because someone asked about it right now. Browser agent Clicks and types through a site to finish a task. Training crawler Collects content at scale. Usually sends no readers back. AI search crawler Indexes pages that answers may link to. User-triggered fetcher Gets a page because someone asked about it right now. Browser agent Clicks and types through a site to finish a task.

Several AI companies publish separate user-agent tokens for these roles and describe how each treats robots.txt. Policies differ and change, and some user-initiated fetches are treated differently from automated crawling. Check each operator's current documentation. The disputes behind this are covered in AI crawlers and the fight over web content.

What bots cost a site

The price of automated traffic shows up in several places, and it helps to know which one is hurting before you act.

Capacity. Pages built from database queries are expensive. A crawler that walks every combination of filters on a product listing can request far more URLs than your site has real pages, and human visitors feel the slowdown. Internal search results are a common trap for the same reason.

Bandwidth and hosting bills. Large images, downloads and video fetched repeatedly add up, especially on plans that charge for transfer.

Money lost to fraud. Card testing brings payment fees and disputes. Hoarding bots leave real customers facing "sold out". Fake accounts abuse trials and sign-up offers.

Distorted decisions. Bot visits inflate page views, spoil experiments and can mislead advertising reports.

Staff time. Cleaning spam, answering locked-out customers and chasing false alerts all take hours.

A quiet blog may care only about spam. A shop with limited releases has a very different list. Write down the top two problems; they'll tell you which controls are worth their friction.

How to tell who is really visiting

Start with your server logs. Group requests by user agent and by source address, then look at what was requested and how fast.

Because names can be faked, verify any bot that gets special treatment. Many major crawler operators document one of two methods:

  1. Published address ranges. Check that the source address falls inside the operator's list.
  2. Reverse and forward DNS. Look up the hostname for the address, confirm it ends in a domain the operator documents, then resolve that hostname and confirm it returns the same address.

On Linux or macOS the second method looks like this, using a documentation address as a stand-in:

dig -x 203.0.113.25 +short
dig crawl-25.bot.example.com +short

On Windows, Resolve-DnsName in PowerShell does both lookups. Some operators and networks are also experimenting with cryptographically signed bot requests, which would give a stronger proof than a header.

For unnamed traffic, behavior is the clue: perfectly regular timing, no images or stylesheets loaded, alphabetical walks through URLs. How sites detect automated traffic explains the signals in more depth.

Choosing controls

What to do about a bot in your logs
Is it verified and useful to you? YES Allow it, and watch its request rate 1 NO Is it honest but unwanted or too eager? YES Add a robots.txt rule or rate limit and recheck later 2 NO Is it ignoring your rules or faking its identity? YES Block or challenge it at the server, CDN or firewall 3 NO Is it attacking logins, payments or availability? YES Add targeted protections and involve your host or provider 4 NO Keep observing Low-volume unknown traffic may not be worth chasing. Is it verified and useful to you? 1 IF YES Allow it, and watch its request rate NO Is it honest but unwanted or too eager? 2 IF YES Add a robots.txt rule or rate limit and recheck later NO Is it ignoring your rules or faking its identity? 3 IF YES Block or challenge it at the server, CDN or firewall NO Is it attacking logins, payments or availability? 4 IF YES Add targeted protections and involve your host or provider NO Keep observing Low-volume unknown traffic may not be worth chasing.

The tools, from gentlest to strongest:

  • robots.txt asks compliant crawlers to stay out of paths. It's standardized in RFC 9309. A rule for a hypothetical bot:

``text User-agent: ExampleBot Disallow: / ``

It protects nothing from a bot that ignores it, and listing secret paths there advertises them. You can test rules with the robots.txt matcher.

  • Rate limits cap requests per client and answer excess with status 429, ideally with a Retry-After header. See 429 and rate limiting.
  • Caching makes legitimate heavy crawling cheap to serve. A CDN absorbs much of it.
  • Authentication is the real barrier for anything private.
  • Firewall and bot-management rules block or challenge based on behavior. A web application firewall is the usual place.
  • Challenges such as CAPTCHAs add friction, with costs for real people.

Avoid collateral damage

Aggressive blocking hurts. You can accidentally shut out search crawlers and vanish from results, break link previews, lock out monitoring, or challenge people using assistive technology, privacy tools or shared mobile addresses.

Change one thing at a time. Run new rules in a log-only mode if your platform offers it, review what would have been blocked, and keep an allowlist for verified services you depend on. Revisit rules every few months, because bot names and address ranges move.

A first-week routine for a small site

You don't need a specialist product to get a handle on this.

  1. Collect a week of access logs.
  2. List the twenty busiest user agents and source networks.
  3. Verify any that claim to be major search or AI crawlers.
  4. Find the paths receiving unusual volume: login, search, forms, feeds.
  5. Publish a robots.txt that reflects your actual choices and excludes endless URL spaces.
  6. Add a rate limit to the login page and any expensive endpoint.
  7. Turn on whatever bot filtering your host or CDN already includes, starting in log-only mode if it offers one.
  8. Check search traffic and customer complaints for a couple of weeks afterward.

Write down what you changed and why. When a partner's integration breaks months later, that note will save you an afternoon.

If you write a bot yourself

Good manners are simple and keep you from being blocked:

  1. Identify your bot honestly, with a contact address or information page.
  2. Read and follow robots.txt and the site's terms.
  3. Prefer an official API or data download when one exists.
  4. Request slowly, back off on errors and honor Retry-After. The ideas in polite clients carry over.
  5. Cache what you fetch and use conditional requests so unchanged pages aren't resent.
  6. Don't collect personal data you have no right to hold.
  7. Stop when asked.

Common questions

Is all bot traffic bad for analytics?

It distorts numbers. Many analytics tools filter known bots, but not everything. A sudden jump in visits with no change in sales or sign-ups deserves a look at the logs.

Is scraping illegal?

It depends on where you are, what is collected, how it's accessed, the site's terms and what's done with the data. Court outcomes vary and the area is still developing, so get legal advice for a specific project.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in AI on the Internet →

Latest news on this topic