No coding and design stress Create, customize & launch website widgets, all in one place Start Free Forever
Content

How to Add Age Verification to Websites: Full Guide

27 July 2024 26 June 2025 ~ 9 min read
6
116811 views
rate it
Claspo Blog How to Add Age Verification to Websites: Full Guide

Website age verification helps you comply with age restrictions and regulations regarding sensitive content or products in most countries. Whether you're running an online store for alcohol, tobacco, or adult-oriented material or simply want to protect minors from accessing inappropriate content, implementing age verification on your website is crucial. It can save your online business and reputation. 

In this article, we will explain the different types of age verification pop-ups and share information about how to add age verification pop-ups to websites, with and without coding knowledge. Let’s get started.

Create, customize & launch age verification widgets, free forever

What is age verification for a website?

An age verification popup is a full-screen widget for site that blocks access to content upon entry. It requires visitors to verify they are legally old enough to gain access.

Friday_Night
Try this template

The main reason for using website age verification pop-ups is to prevent children from accessing content or purchasing products meant for adults. You must comply with laws and regulations introduced by legal institutions within your region. By requiring users to confirm their age before accessing age-restricted content, you create a safer and more responsible online environment.

Smoky_Passion
Try this template

How to add age verification to sites

If you're wondering how to add age verification for website compliance, there are two primary ways of implementing it. One requires a grasp of coding, while the other uses Claspo’s templates and creates a pop-up in 5 minutes with no design or coding skills.

Way 1. Code-based method

This approach requires you to paste your code directly into your website. It’s not that big of a deal when you know programming and understand the basics. However, if you lack these skills, this will be a massive pain in your backside, especially if you plan on customizing the widget to your branding, unique needs, etc. Expect to either spend a lot of time getting everything to work right or hire a developer to help you implement this relatively simple feature.

Let’s look at sample HTML, CSS, and JavaScript codes in case you decide to go the manual route.

1. Free age verification HTML code

Free age verification HTML code examples are readily available in online communities for testers and discussion forums for programmers. Here is a small sample we came up with:

<div id="age-verify">

<div class="window">

2. Free age verification for CSS part

The free CSS age verification sample code will look something like this:

$font-stack: 'Source Sans Pro', sans-serif;

$transition: 500ms;

3. Free age verification for JavaScript

Finally, the JavaScript age verification popup requires a sample code like this:

overAge = function () {

  $('#age-verify').addClass('hidden');

Way 2. Adding age verification to a website with Claspo

If you are not familiar with coding, have no intention of involving developers in creating a pop-up, or don’t feel like doing the extra work, you can add website age verification with Claspo for free. It’s a super-simple process that you can complete in a few minutes to comply with all the laws and guidelines.

When setting up a free age verification for your website with Claspo, you can choose a ready-made template from the library or create a new widget from scratch.

Age_Verification_Template_Choice

Step 1. Log in and set up the filters

To get started, auto-login to the site using your email. Then click on the New Widget button. We will now turn to the choice of templates. 

Use the filters to make the right choice. The very first filter is the use case. For our purpose, we need the “Verify Age” use case. When you select it, the system automatically selects free age verification widget templates that meet your requirements. These popup templates are pre-configured to comply with age-restricted content regulations, helping you quickly set up a compliant gate without designing from scratch.

You don’t need to bother with the rest of the filters since age verification widgets have the same layout (content-blocker) and are not associated with a specific holiday or occasion.

Verify-Age-Templates

Step 2. Edit the template

Select the template you like and proceed to the builder. Here, the only limit is your imagination. You can customize your template to suit your needs and branding.

Age_Verification_Chosen_Template

After that, make any necessary adjustments, preview the widget on desktop and mobile platforms, and proceed to the next steps.

Claspo_Age_Verification_Edit_template

Step 3. Choose the widget display rules

For your convenience, we’ve set up display rules that fit your goal. In particular, your age verification widget immediately appears when users visit your website and disappears only when they verify their age. You can always customize these settings and also choose display frequency:

  • Do not limit. The widget appears every time the user visits your website or its specific pages.
  • Once per session. The widget reappears with each new session (a session ends after 30 minutes of user inactivity on the website).
  • Only once. The widget appears once and doesn't reappear as long as the user's cookies are stored on the website.
  • One time per {period}. The widget updates the user's age data at the frequency you select.

Triggering

For example, you can use geotargeting to only display your pop-up to people in specific locations. Different countries and administrative regions have different required ages for adult content, so you can easily set it up to show different ages for each one.

Additionally, you can set up different language versions that will switch depending on your users’ browser language settings or the language they choose on your website. When you add a new language version to your widget, your original text is automatically translated into the selected language using ChatGPT-4o, and you can edit it after that. It's super easy and convenient!

Step 4. Set up integrations

Claspo allows you to easily integrate with many popular platforms, such as CRMs, CDPs, ESPs, and more. In this case, you can ignore this step, as you may not need any martech tools to transfer users’ data. You can also integrate Claspo with Google Analytics to track how many users interact with your widget.

Integration

Step 5. Add the widget to your website

After you've finished editing and customizing your widget, we'll provide you with a ready-made script to copy and paste into your website. You can easily add our widgets to any CMS using Google Tag Manager — this also works great if you prefer to create a WordPress popup without plugin installation, keeping your site lightweight and plugin-free. If you're a WordPress user, simply install the Claspo’s age verification plugin for WordPress to make the widget installation process even easier and add a WordPress popup form to your site. Also, we have a Shopify app. If you have any issues, just contact our customer success manager, and we will embed a widget for you for free.

Install_script

How do you create an age verification pop-up from scratch?

Claspo allows you to create free age verification widgets for websites from scratch. It’s also quick and easy — a great solution for anyone searching for age verification online, free of charge. Here’s how this process works.

Step 1. Get started

In the same way as before, you log in, but now you choose from ready-made proposed solutions.

Age_Verification_Widget_from_Scratch

Step 2. Select the base layout

With Claspo, you don’t create from a completely blank slate. Instead, you choose from several generic base layouts that allow you to implement any ideas.

Age_Verification_Basic_Layout

Step 3. Set up your layout

Choose the containers, resize, insert images, and write your text. Don’t forget to check the “Insufficient age” state as well. You can create a widget like this in less than five minutes. Want to know how we know? Because it only took us three!

Age_Verification_From_Scratch_1

Age_Verification_From_Scratch_2

Step 4. Finalize

After you’ve designed your widget, proceed to the next steps as you would with a template. Choose the website age verification triggering rules and integrations, check your results, and insert the script code.

Ready-to-use age verification pop-up templates from Claspo

With Claspo’s many ready-to-use templates, it’s easy to find the perfect fit for age verification websites that match your goals and style.

If you sell alcohol, “Friday Night” might be your choice. A moody bar setting with dim lights will fit any liquor store.

Dark_Gothic
Try this template

Are you doing business with games of luck or skill? “Game Awaits” is the perfect template for a casino or other gambling business.

Game_Awaits
Try this template

Is what you’re offering spicy and taboo? Try “Pleasant Mood” for businesses offering adult goods or content.

Pleasant_Mood
Try this template

More than age gates: what else you can create with Claspo

Sure, age verification is a major step — especially when you need to prevent minors from accessing age-restricted products or content. But if you're only using Claspo for age gates, you're just scratching the surface.

Claspo is actually a full-blown popup maker and online age verification system that gives you a ton of options to engage users, not just require users to verify their age. And the best part? It’s easy to use, requires no coding knowledge, and helps you protect your business while leveling up your user experience.

So, what else can you do with it besides setting a widget on your website to comply with legal requirements? Here’s what marketers love using Claspo for:

  • Lead generation popups that collect emails, phone numbers, or other personal information — perfect for building your list while users explore your website’s offers. For example, Absolut Vodka invites users who have passed age verification to subscribe to its weekly newsletter. As an incentive, subscribers receive cocktail recipes and drink inspiration straight to their inbox.

Absolut-Vodka-05-21-2025_01_10_PM

  • Gamified widgets (yep, like spin-the-wheel, pick a gift or scratch cards) — especially great for e-commerce, or any brand that wants to make promotions fun.
  • Cross-sell & upsell banners that pop up based on what users are browsing or adding to their cart. Great for promoting products online to users of a certain age.
  • Exit-intent popups that show up just in time to stop someone from leaving — maybe offer a discount, a freebie, or something else.
  • Multi-step forms — useful when you need more than just an email, like getting a quote, feedback, or even creating quizzes for specific age groups.
  • Announcement bars and timers — highlight flash sales that're only available for a limited time.

For example, on the PAX website, you’ll find not only an age verification gate, but also an announcement bar at the top highlighting free shipping terms, along with a floating box featuring a multi-step subscription form. In the first step, users are invited to subscribe to the newsletter in exchange for a discount. Once they agree, the next step appears with a field to enter their email address.

PAX

Each widget is fully customizable and adapts to mobile automatically — whether you're showing an age gate or a mobile pop-up for discounts, announcements, or lead capture, everything looks great and works flawlessly.. 

Claspo is a secure and reliable tool for businesses that work with certain types of content, especially if it’s inappropriate or harmful for minors. Whether you sell alcohol, gamble-related products, wellness goods, or digital content, Claspo helps you ensure that the content only reaches the right audience — and that your site follows the best practices in robust age verification measures.

You can start building widgets on your website for free, and set up age verification software or conversion-boosting popups in minutes.

When does a website need online age verification?

Age verification is necessary for websites that offer age-sensitive products like alcohol and cigarettes, adult-only content, gambling, and others. You usually need to introduce age verification pop-ups on your website when:

  • You distribute content or goods not meant for minors.
  • The law of your country requires age confirmation.

For example, the Food and Drug Administration (FDA) prohibits the sale of tobacco products (including hookah and e-cigarettes) to consumers under 21 years of age in the US. Retailers operating in this niche can find detailed information on the FDA's official website on how to comply with these rules.

Moreover, a simple age verification pop-up may need to be revised to comply with industry regulations. Most states in the US require that a consumer present a valid government-issued ID to prove their age when they buy alcoholic drinks. 

The world of online entertainment is no different. In the US, the Children's Online Privacy Protection Act Rule (COPPA) limits the consumption of online content by users under the age of 13. Similar restrictions are imposed in the EU General Data Protection Regulation (GDPR). Both regulations limit the collection of personally identifiable information from underaged people without their parent's consent.

Types of website age verification

There are several user’s age verification pop-ups, ranging from a simple age verification inquiry to more advanced techniques like AI-powered face recognition. 

A regular age gate pop-up usually looks like this.

Picture_2

Depending on the time and place, a website age verification may be displayed:

  • on every page;
  • on specific product pages;
  • at the checkout.

Many websites ask for users' dates of birth instead of a simple “yes” or “no” question. If you acquire contact details from the user, you can add this personal data for future marketing and analytical purposes.

Welcome

Depending on the industry requirements and local regulations, the user’s date of birth might suffice. Still, you can also ask for personal details like the address or require uploading an ID photo. You can also bake in age verification with other functions. The example below gets your age and immediately asks your location to improve your shopping experience.

Picture_1

We’ve also seen other, stricter verification methods that go beyond the scope of simple pop-ups. For example, some websites might ask you to scan or upload a photo of your ID, as Meta does.

Age-Verification_ID_screens

And you can’t go anywhere without AI in this day and age. So, naturally, there are already tools with AI-powered age verification systems Trust Stamp, Veriff, Facia, and others.

Age-age-estimation-demo_header

Regardless of the age verification process you opt for, ensure that your Privacy Policy clearly states the purpose of such data collection.

How to use age verification to avoid problems

Age verification sites are a must if you operate in an age-sensitive niche and aim to ensure that your website complies with laws and regulations issued by legal institutions. Violating these rules can entail fines or even imprisonment.

Age verification pop-ups are extensively used to restrict underage users from accessing your website when browsing. Such pop-ups usually convey the same idea: warn customers about the age restrictions introduced on your website. Depending on your preferences and the legal age requirements of local authorities, you may supply your age verification pop-up with additional information for parents or provide a link to your Terms of Use. 

Start with our free lifetime plan and immediately create your first age verification popup with no design or coding skills!

FAQ

Is asking for a birthdate enough to keep minors off my website?

Not always. While asking for a birthdate is a common first step, it's not foolproof. Some users might enter a fake date just to access age-restricted content. That’s why age verification is an important part of protecting your business — especially if you deal with products like online alcohol, tobacco, or adult goods.

If you’re in a highly regulated industry, you might need a more robust solution — for example, one that requires users to check a box per accepted verification standards, or even upload an ID in some regions. The key is to strike a balance between ease of access and proper protection.

How can I ensure my age verification process complies with local regulations?

Start by knowing your audience and where they’re browsing from — different countries (and even states!) have their own rules. For example, in the U.S., users must be 21+ to buy tobacco or alcohol online, while in the EU, data privacy laws also come into play when collecting personal info.

A great way to ensure compliance with legal regulations is to use an age verification popup tool that supports geotargeting. Claspo lets you display the widget based on location.

What should I look for in an age verification solution?

Look for something that checks all these boxes:

  • Easy to use and quick to set up (bonus points if it needs no code).
  • Flexible — lets you customize for different regions, languages, or specific age requirements.
  • Works on all devices seamlessly.
  • Doesn’t frustrate visitors but still helps you protect your customers and brand.
  • Offers integrations or tracking to see how users interact with it.

In short, a solid tool should offer proper age verification while also enhancing the user experience — not hurting it.

What’s the difference between basic and advanced age verification systems?

Think of it like this: a basic system asks “Are you 18?” with Yes/No buttons or a simple birthdate field. It’s fast and lightweight — great for low-risk situations. An advanced system might go further: using cookies to remember past answers, geolocation to adjust the specific age, or even facial recognition or ID scanning for high-risk industries. These robust age verification tools are especially useful when legal compliance is non-negotiable, or when you need to restrict access to age-restricted content more tightly.

How do I choose the right age verification popup for my business?

Start with your industry. If you’re selling age-restricted products like online alcohol, CBD, or adult items, you’ll want something a bit more than just a checkbox.

Then think about user experience: will your visitors find it annoying or helpful? The right tool should let you display the widget cleanly, match your branding, and adjust settings for different regions and age thresholds.

Claspo, for example, makes it easy to choose from stylish templates or build from scratch. It helps you access age-restricted audience segments responsibly, while keeping things smooth and seamlessly integrated into your site.

Popular Posts
Related Templates

Dana Cormier 1 year ago

Hey, thanks for the super informative piece on age verification pop-ups! Just dove into the online retail world myself and man all the legal stuff especially for my adult-beverage line kinda overwhelming. Your article totally cleared up, keep rolling out these awesome guides!

Avatar
Тарас Талімончук commented to Dana Cormier 1 year ago

Thank you, Dana!

Stewart Darley 1 year ago

Working as a digital marketer with a bunch of e-commerce sites, staying on top of the legal stuff for online selling is super important. I really dug the guide for setting up these pop-ups those coding examples are a fantastic addition for those of us who like to get our hands dirty. Awesome job! 👍🏻

Elizabeth Guzman 1 year ago

The article has info for my business about website age verification. Thank you for the detailed guide 🥰 but, one point isn't understandable, it is a little bit missarable for me. How can age verification pop-ups customized to suit different websites and industries?

Zoryana Oberemok commented to Elizabeth Guzman 1 year ago

Elizabeth, you are welcome! We are glad you found the guide helpful. Customizing age verification pop-ups to suit different websites and industries is essential to ensure a seamless user experience. Start by designing the pop-up to match your website's overall look and feel. Use your brand colors, fonts, and logo to make it feel like a natural part of your site.

Sofia Ramirez 2 years ago

Not using age verification pop-ups could lead to underage access, potential harm, legal repercussions, regulatory non-compliance, reputational damage, increased risk of addiction, negative societal impact, and compromised user safety. One well-known situation in the USA related to the lack of age verification is the "Cambridge Analytica scandal" involving Facebook. In 2018, it was revealed that the personal data of millions of Facebook users had been harvested without their consent. This incident raised concerns about privacy, data protection, and the potential misuse of personal information. It highlighted the need for robust age verification measures to protect users, particularly minors, from unauthorized access to sensitive data and potential harm.

Caleb Thompson 2 years ago

It's a game-changer for any website that needs age verification. This tool is ridiculously easy to use, even for us non-tech-savvy folks. It gives you a step-by-step guide on how to add a cool age verification pop-up to your website with just a few clicks. You know, those pop-ups that ask visitors to confirm their age before accessing certain content.

You Might Be Interested in
30 Welcome Messages Examples For Your Website
30 Welcome Messages Examples For Your Website

When welcoming potential customers to your website, it's important to make a good first impression with a compelling introductory message. This message should convey your warmth and eagerness to have them explore your site while catching their interest in the valuable content offered on your web pages. Creating welcoming messages throughout your site can help captivate visitors and keep them engaged as they browse high-value propositions. It would be best to balance being friendly while highlighting what makes your business...

26 July 2024 10 min read
How to Create Responsive Widgets: 6 Tips with Examples
How to Create Responsive Widgets: 6 Tips with Examples

Responsive widgets for websites are becoming increasingly essential. Given that almost 58% of web traffic comes from mobile devices, it is important that all elements of your website, including popups, easily adapt to different displays. In this article, we'll share tips on how to create widgets that look perfect on both desktop and mobile screens. Additionally, we will analyze different mobile-friendly widgets on actual websites and demonstrate how easy it is to create similar ones in our editor. What is...

18 July 2024 25 min read
Double Your Newsletter Signup Form Conversions with 3 Proven Strategies
Double Your Newsletter Signup Form Conversions with 3 Proven Strategies

Is your newsletter signup campaign effective? We thought ours was. That is until we actually checked the data and tried different approaches. In this article, we will explain how you can test the same three strategies to increase your conversion rate for newsletter signups by up to 100%. Drawing from our A/B testing experience, we'll explain how we improved offer clarity, personalized messaging for our target audience, and leveraged incentives with urgency and scarcity triggers. Note that the final stats...

05 July 2024 18 min read
How to Add an Email Subscription to WordPress: 6 Easy Steps
How to Add an Email Subscription to WordPress: 6 Easy Steps

If you're serious about growing your business, building an email list isn't optional — it's a game-changer. Email is one of the most cost-effective digital marketing channels, helping you convert traffic into leads, nurture customer relationships, and drive repeat sales with precision. In fact, our data shows that websites using popups for email subscriptions often see conversion rates soar by up to 9% or more, significantly boosting their reach and engagement. This approach can contribute to the impressive average return...

02 August 2024 15 min read
9 Labor Day Advertising Ideas
9 Labor Day Advertising Ideas

E-commerce customers today have an abundance of choices, intensifying competition among businesses. With so many options, the bounce rate is climbing as users swiftly exit websites that don't immediately meet their expectations. According to Statista, the cart abandonment rate in e-commerce exceeded 70% in 2025. To attract more potential customers and retain existing ones, focus on enhancing the user experience. Personalize their journey and offer attractive deals at the right time. Labor Day is a fantastic opportunity to convert more...

09 August 2024 15 min read
Claspo unveils plugin for WordPress and WooCommerce
Claspo Unveils Plugin for Easy WordPress & WooCommerce Integration

Claspo has released a new WordPress plugin that seamlessly integrates with your website. Compatible with any WordPress plugins and themes, the plugin offers a straightforward and native setup process: Download the free Claspo plugin directly from the WordPress catalog.  Follow the simple installation guide that takes less than a minute to complete. Select a visually appealing template that suits your needs, and customize it to align with your brand style.  Place your first widget on your website and see a...

12 August 2024 3 min read

Top