Do you want to add age verification to your WordPress website?
You may need to ask visitors to verify their age before accessing your website due to the nature of the content or legal requirements.
In this article, we will show you how to easily add age verification on your WordPress site.
If you don’t want to watch the video tutorial, then continue reading the instructions below.
How to Add Age Verification in WordPress
The easiest way to add an age verification page to WordPress, is by using the Age Gate plugin. Using this plugin, you can restrict your content based on age, without stopping the search engine bots and crawlers from seeing your pages and posts.
In this way, you can stop minors from accessing mature content without negatively affecting your WordPress SEO.
The first thing you need to do is install and activate the Age Gate plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, the plugin adds a new Age Gate item to the left-hand menu. Simply click on it to configure the plugin’s settings.
In ‘Default age,’ type in how old visitors must be to access your content.
By default, Age Gate restricts access to all your content. However, you may want to stop minors from visiting specific pages only. For example, if you run an online store using a plugin such as WooCommerce, then you might restrict access to specific products on your site.
To do this, simply open the ‘Restrict’ dropdown and choose ‘Selected content.’
If you choose this setting, then all your posts and pages will be unrestricted by default.
To add age verification to a page or post, you’ll need to open it in the editor and then enable the ‘Restrict this content’ toggle in the right-hand menu.
When it comes to age verification, you have three options.
One option is asking visitors to type their date of birth into a form, as you can see in the following image.
Visitors can also enter their date of birth using a dropdown menu.
Finally, you can simply ask visitors whether they’re old enough to access your content, by showing ‘Yes/No’ buttons.
To choose between these options, simply open the ‘Validate age using’ dropdown.
Then, select either Input fields, Dropdown fields, or Yes/No buttons.
By default, people will need to verify their age every time they visit your WordPress website.
If you prefer, then you can enable ‘Remember me’ so visitors don’t have to pass the verification every single time. After that, you can use the ‘Remember Length’ settings to change how long Age Gate will remember the visitor’s age.
This can save them time, especially if they visit your website regularly.
When you’re happy with how the plugin is set up, go ahead and click on the ‘Save settings’ button. You can now visit your WordPress blog to see the age verification screen live.
The default age verification screen is pretty basic, so let’s see how you can customize it to better suit your website.
Customizing Age Verification Screen and Message
To change how the age verification page looks, click on the ‘Messages’ tab on the plugin’s settings page.
Here, you can add a headline and sub headline, which will be displayed above the area where visitors verify their age.
When you’re happy with the messaging, click on the ‘Save settings’ button.
After that, click on the ‘Appearance’ tab. From here, you can change the background color, foreground color, background image, text color, and more.
When you’re happy with the changes you’ve made, don’t forget to scroll to the bottom of the screen and click on ‘Save settings’
You can now visit your website using incognito mode to see the custom age verification screen in action.
Advanced Age Verification Settings
Sometimes, a WordPress caching plugin or the caching enabled by your WordPress hosting service can cause plugin conflicts. If you’re having problems with the age verification page, then open the ‘Advanced’ tab in the plugin’s settings.
You can also enable other advanced settings from this page like adding custom CSS rules and enabling anonymous age verification.
We hope this article helped you learn how to add age verification in WordPress. You may also want to see our guide on how to allow user registration on your WordPress site or see our expert pick of the best WordPress membership plugins.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Can AgeGate be incorporated into the Register page?
My site doesn’t have mature adult topics, items, videos, etc. or anything else of that nature. I am currently setting it up but don’t want anyone under the age of 18 on there.
WPBeginner Support says
You would want to reach out to the plugin’s support for if that is an option with what you are using for your registration page.
how to add a code verification instead of age verification
Abhishek Bhardwaj says
how i can customize it,
Pauline Cahill says
I am running Windows Vista (I can’t afford anything newer!) and have installed it but have no ‘Activation page’ showing, nor an .exe file. Any idea where they might be. I have moved the folder from ‘verifications’ into my documents folder but that made no difference
WPBeginner Support says
We think you are probably trying to do something else. This is a WordPress plugin it does not come as an exe file.
This plugin stopped working on Android.
This would be OK only I need this for a French website! Can you have an option so that the text can be changed so I can write this in French?
Would be cool, if was an option to put that on top of a post or video.
Steve Gibson says
The plugin doesn’t work well on iPhone. Opens very small, then when you start to complete it, it opens too large.
is there a way to redirect a user who is underage to google or some other site?
thanks for sharing!
Joel Eade says
Awesome, this is exactly what I need. I had another solution (the name escapes me) but it was buggy. Thanks!