Age Verification on an Online Store: What It Actually Protects (and What It Doesn't)

by Luca Cavallini Technical guides
Age Verification on an Online Store: What It Actually Protects (and What It Doesn't)

What the question actually asks

A lot of stores that sell alcohol, tobacco, e-liquids, knives or other age-restricted goods add a gate at the front door: a full-screen overlay asking the visitor to confirm they are old enough, sometimes with a simple yes/no button, sometimes asking for a date of birth. It looks reassuring, both to the merchant and to the visitor. The honest question worth asking before relying on one is simple: what does clicking "Yes, I am 18" actually verify?

The answer is: nothing about the person on the other side of the screen. It verifies that a browser sent a click. Anyone, of any age, can click "Yes". Anyone can type a date of birth that makes the math work. There is no identity behind that click, and a gate built entirely client-side, in the browser, cannot create one.

What a client-side gate is actually good for

None of that means the gate is worthless. It does a few real things:

  • It stops accidental exposure. A visitor who lands on a product page by mistake, a search result, a shared link, a curious click, sees a deliberate stop instead of the product straight away. That is a real, if modest, protective effect, especially against a minor who is not specifically trying to get around anything.
  • It is a documented diligence step. Showing that the store asks the question, records the answer where relevant, and blocks or warns on a "no" or an underage date of birth, is evidence of a process, which matters in some regulatory and marketplace contexts even though the check itself is not strong.
  • It sets an explicit expectation. A shopper who deliberately lies to get past the gate is doing something different, in intent, from one who was never asked at all. The gate does not stop that shopper, but it does put the question on record before the sale.
  • Done well, it does not have to break the experience for everyone else. The gate can remember an answer via a cookie so a returning visitor is not asked again and again, and it can be scoped narrowly (only the flagged products or categories, or only cart/checkout) instead of blocking the entire storefront for a visitor who never even looks at the restricted goods.

What it does not do, and cannot do

  • It does not verify identity. No document, no third-party check, no cross-reference against anything. It is a self-reported claim with no verification behind it.
  • It is trivially bypassed. Clear the cookie, open a private window, or simply lie: all three defeat the gate in seconds, and none of them requires any technical skill.
  • It does not satisfy a legal age-of-sale requirement on its own. Where the law requires a real check, for example ID verification at delivery for certain goods in certain jurisdictions, a browser pop-up does not replace that requirement. It sits alongside it, if anything, not instead of it.

Being honest about this distinction is not a weakness to hide. A merchant who tells a supplier, a marketplace, or a compliance reviewer "this is a UX-level diligence measure, not a strong legal age check" is giving an accurate answer that holds up to scrutiny. A merchant who implies the opposite is one question away from a problem, the moment someone actually checks what the gate does.

What "done properly" looks like, technically

Assuming you have accepted the gate for what it is, a few implementation details separate a gate that works from one that quietly fails or annoys people for nothing:

  • Scope it to what actually needs it. Gating the entire site because three products are age-restricted asks every visitor, forever, a question that applies to almost none of them. Gating just the flagged products, categories, or the cart when a flagged product is inside it, asks the question only when it is relevant.
  • Remember the answer. Once a visitor has answered, a cookie should carry that answer for a reasonable period so the same person is not re-asked on every page load. Re-asking constantly trains people to click through without reading, which defeats even the modest protective value the gate has.
  • Make it a real modal, not a suggestion. If the gate can be dismissed by pressing Escape, clicking outside it, or scrolling past it, it stops being a gate. A proper implementation traps focus inside the dialog and requires an explicit choice.
  • Keep it accessible. A blocking overlay that is not reachable by keyboard, or that a screen reader cannot describe as a dialog, is a barrier for people with disabilities while doing nothing extra for the age question it was built for. An ARIA-compliant modal with visible focus and a live-region error message costs little and avoids that trap.
  • Say what it is, in the text itself. A short disclaimer near the gate, stating plainly that this is a diligence check and not a legally binding age verification, costs one sentence and removes any doubt about what the merchant is claiming.

Where the real check has to live, if you need one

If a product genuinely requires a legally binding age check, that check does not belong in a browser pop-up. It belongs in the sale process itself: verification at delivery, a licensed third-party identity check, or whatever the specific regulation for that product and jurisdiction requires. A client-side gate can sit in front of that process as a first, cheap filter against accidental and casual exposure. It cannot replace the process.

In short

An age gate answers a UX question, not a legal one: does this visitor understand they are about to see age-restricted content, and are they given a deliberate stop before seeing it. That is a real and worthwhile thing to build well, accessible, correctly scoped, and honest in its own wording about what it is. It is not, and cannot be, a substitute for an actual age check where the law requires one. We build ours, Age Verification Gate for PrestaShop, with exactly that distinction stated in the settings screen itself, because saying it plainly is more useful to a merchant than pretending otherwise.

Age Verification Gate (18+ / configurable)Configurable age-verification gate for age-restricted goods: whole-site or per product/category targeting…View product

Leave a comment

Comments are moderated before publication.

← Blog

Loading...
Back to top