Why human age gates don't stop AI agents
Summary
Age gates were designed for people looking at a screen. AI agents fetch the page as text, or drive a browser for a user, and the gate either never runs or gets answered by the agent. This explainer covers how agents see a site, why that leaves a gap in the record of who was told what, and what alcohol brands can do about it.
The age gate on a beer, wine or spirits website was designed for one kind of visitor: a person looking at a screen. That person sees an overlay, reads the question, and types a birthday or clicks a button. A growing share of visits now come from software acting for a person, such as an assistant summarizing your product page or a browser agent comparing prices. These visitors don't experience the gate the way a person does, and in many cases they don't experience it at all.
This article explains why, in plain terms, and what a brand can do about it. It's written for marketers, ecommerce leads and agencies, not engineers. If you're new to age gates, start with our complete guide to age gates for alcohol brands.
This article is general information, not legal advice. How the rules apply to AI agents is unsettled and varies by market. Talk to qualified counsel about your situation.
How an agent sees your site
"AI agent" covers a few quite different tools. For an age gate, the difference that matters is whether the tool runs your page like a browser or just reads it.
Many agents read the page as text
The simplest agent tools download a page and pass its text to the model. With Anthropic's web fetch tool, for example, "the API retrieves the full text content from the specified URL," and the documentation says it "currently does not support websites dynamically rendered with JavaScript" (Claude Docs). The big AI companies run user-triggered fetchers like this too. OpenAI says that when users ask ChatGPT a question, "it may visit a web page with a ChatGPT-User agent" (OpenAI). Perplexity describes its Perplexity-User agent the same way (Perplexity), and Anthropic uses Claude-User (Claude Help Center).
Google makes the general point in its JavaScript SEO guidance: server-side or pre-rendering "is still a great idea," partly because "not all bots can run JavaScript" (Google Search Central).
The content is often already in the page
Most age gates are an overlay. The page loads with all of its content, and a script then places a box over it. That is also how Google asks sites to build gates: "ensure that the content is overlaid with the interstitial" rather than redirecting every URL to a single gate page (Google Search Central).
In browser terms, an overlay is usually an element with fixed positioning. MDN describes it as "removed from the normal document flow" and positioned relative to the viewport (MDN). It sits on top of the page; it doesn't remove anything underneath. Hiding content with CSS works the same way. display: none "turns off the display of an element," but the element is still part of the document (MDN), which is the in-memory tree of the page that scripts and tools read (MDN).
So a gate built only in CSS and JavaScript is a visual barrier. For a tool that reads the HTML or the extracted text, your product copy, tasting notes and prices are already there.
Fetch-style tools never run the gate
Gate logic typically lives in a script. It decides whether to show the overlay, checks the answer, and sets a cookie. A tool that doesn't execute JavaScript never runs that script, so the question is never asked. That isn't the agent getting around anything. From where it sits, there was nothing to answer.
Browser agents can answer the gate for the user
A second group of agents drives a real browser. These tools run your scripts and see the gate, but they're built to complete tasks, and the gate is one more step in the way.
- OpenAI's ChatGPT agent, which absorbed the earlier Operator product, used "screenshots of its virtual browser window to 'see' and interact with web pages," which "allows it to click buttons, fill out forms, and navigate websites" (OpenAI Help Center). OpenAI now says ChatGPT agent is no longer available and points users to the cloud browser in ChatGPT Work, which "can read web pages, click buttons, enter information into forms, and carry out steps" on websites (OpenAI Help Center).
- Anthropic's computer use tool gives Claude "screenshot capabilities and mouse/keyboard control" (Claude Docs). Its browser use tool works with the page "through its structure (the accessibility tree, elements, forms, and tabs) and through screenshots" (Claude Docs).
Google also lists a Google-Agent fetcher "used by agents hosted on Google infrastructure to navigate the web and perform actions upon user request" (Google Search Central).
A browser agent that reads the page structure sees a heading, a question and a button labeled something like "Yes, I'm 21." To a tool that clicks buttons and fills forms for a living, that looks like any other step in a checkout.
A date of birth box asks the wrong party
A date of birth field feels stricter than a yes/no button, and for people it can be. But when an agent is at the keyboard, the field asks the agent. The agent can type a date it was given, a date it inferred, or any date that moves the task forward. Nothing in the gate tells you whether a person was asked, whether that person is of legal purchase age, or whether a person is involved at all.
That's the core problem. A human age gate works on the assumption that whoever answers is the person who will see the content. Agents break that assumption.
Why it matters
A gate signals intent
No age gate proves age, and the industry codes don't pretend otherwise. Their value is that they show a brand took a reasonable step to direct its marketing at adults. The DISCUS Code says age affirmation mechanisms "utilizing month, day and year functionality, should be employed for supplier-controlled beverage alcohol advertising or marketing websites" (DISCUS Code). spiritsEUROPE's guidelines say brand websites "should have an age-affirmation/ age-gating mechanism in place before allowing users to access any content" (spiritsEUROPE). Beer and wine codes say much the same: the Beer Institute's 2026 code asks brewers to restrict their websites to users who have confirmed they are of legal drinking age (Beer Institute Code), and the Wine Institute's code asks members to "employ an age affirmation mechanism on the homepage" (Wine Institute).
Those texts were written with human visitors in mind. None of the four codes we reviewed mention AI agents. When an agent reads your content without a gate, or answers the gate itself, the step you took to signal intent hasn't done the job it was meant to do.
There's a gap in the record
With a human visitor, a brand can at least say a gate was shown and a confirmation was given. With an agent, that record usually doesn't exist. You may not know which agent visited, who it was acting for, or whether anyone was asked their age. Server logs show user agents, but those strings can be faked; Google warns that "the HTTP user agent string can be spoofed" (Google Search Central).
Whether that gap matters depends on the jurisdiction and the codes your brand follows. It may matter for how a complaint is handled or how your practices look to a regulator or code body. It may not. We aren't aware of any code or law that addresses AI agents and age gates directly, which is the reason to think about it now rather than after a question comes in. Ask your counsel how it applies in your markets.
robots.txt only goes so far
The AI companies publish robots.txt tokens for their crawlers, such as OpenAI's GPTBot and OAI-SearchBot (OpenAI), Anthropic's ClaudeBot and Claude-SearchBot (Claude Help Center), PerplexityBot (Perplexity) and Google-Extended for Gemini training and grounding (Google Search Central). These help you decide what gets crawled or used for training. They aren't an age policy.
Fetches that a user asks for are treated differently. OpenAI says for ChatGPT-User that "robots.txt rules may not apply" (OpenAI). Perplexity says Perplexity-User "generally ignores robots.txt rules" (Perplexity), and Google says the same of its user-triggered fetchers (Google Search Central). Anthropic takes a different line and says Claude-User "allows site owners to control which sites can be accessed through these user-initiated requests" (Claude Help Center). Either way, robots.txt is a yes-or-no on access. It can't say "adults only," and it can't record who was told what.
What a brand can do
You can't make an agent behave like a person, and you shouldn't try to make your gate harder for people to compensate. The more useful move is to address agents directly, on terms they can read.
Publish a machine-readable age policy
Agents read structured data well. A policy file that states your legal purchase age by market, which content is age-restricted, and how you expect agents to behave gives them something definite to act on. It also gives you a dated, public statement of your intent toward non-human visitors, which helps fill the gap in the record. Keep it consistent with the legal ages you apply to people; our legal drinking ages hub is a starting point, but confirm each market with counsel.
Ask agents to attest
Instead of asking an agent for a birthday it can't know, ask it a question it can answer honestly: who it is and whether the person it's acting for has confirmed they're of legal purchase age in their market. A good attestation records the agent's identity, the claim it made and when it made it. This doesn't prove anyone's age, and neither does a human gate. It does mean an agent has made an explicit claim on its user's behalf, and you have a record of it.
Agent identity is still developing. Google, for example, says it is "experimenting with the Web Bot Auth protocol" for Google-Agent (Google Search Central). We're not aware of a settled standard for age attestation by agents yet, so expect the details to change.
Set allow and block rules
Not every agent needs the same treatment. You might be comfortable letting a search assistant summarize your cocktail recipes, want an attestation before an agent reads pricing or adds products to a cart, and prefer to block agents that won't identify themselves. Sites already make choices like this. OpenAI's help center notes that "each website ultimately decides whether to allow cloud browser traffic" (OpenAI Help Center).
Two cautions apply. First, keep search crawlers able to see your content, or you risk your search visibility (see the SEO section of our age gate guide). Second, decide what you want before you write rules. Blocking every agent is simple, but as more shoppers use them, it may also cost you sales and visibility.
For how this plays out in commerce, where agents browse, compare and sometimes buy, see AI shopping agents and alcohol age gates.
Keep the human gate
None of this replaces the gate for people. Keep the date of birth or yes/no gate that suits your markets, and treat agent rules as a second layer for a different kind of visitor.
Where General Spirit fits
General Spirit was built for this gap. Alongside the human gate, it lets you allow AI agents, require them to attest, or block them, and publishes your policy at generalspirit.com/policy/<brand>.json. Search crawlers are always allowed, and it installs with a script tag.
This article is general information, not legal advice. Check your obligations with counsel in each market you sell into.
FAQ
Can AI agents get past age gates?
Often the gate never applies. Many agent tools fetch a page's text without running the gate's JavaScript, and browser agents can answer the gate's question while acting for a user. Either way the gate doesn't tell you whether an adult is behind the request.
Do ChatGPT and Claude follow robots.txt?
Their crawlers do. OpenAI's GPTBot and OAI-SearchBot and Anthropic's ClaudeBot and Claude-SearchBot use robots.txt tokens. For fetches a user triggers, it varies: OpenAI says robots.txt rules may not apply to ChatGPT-User, while Anthropic says Claude-User lets site owners control access.
Does an age gate work if JavaScript is turned off?
Not if the gate is built only with JavaScript and CSS on top of content that's already in the HTML. A tool that reads the raw HTML or extracted text gets the content without the gate.
How can a brand set rules for AI agents?
Publish a machine-readable age policy, ask agents to identify themselves and attest that their user is of legal purchase age, and decide which agents to allow or block. There's no settled industry standard for this yet.