Do you know who visits your website? And more importantly, does your visitor's demographics mean anything to you? For some companies and bloggers, it's a " Yes Resounding.

If you are reading this, you probably have (or want to implement) a restriction based on the age of the visitors of your site. There are a variety of reasons that might push you to do it, but there is only a handful of methods that will get you there.

In this tutorial, we'll explore the reasons why you might want to consider restricting access and the metrics and tools that will allow you to get there.

Age restrictions: what does this mean?

The world has become very different from what it was a few decades ago. With the advancement of technology and permanent Internet access, anyone with a device connected to the Internet can access your site. While this thrills companies looking to expand their reach, it does pose a significant problem: how are you supposed to keep away those who are not old enough to see your content ?

If you are looking for a method to restrict access to your website based on the age of visitors, usually because your content is not suitable for minors. Here are some of the most common reasons:

  • Your website contains an adult humor and inappropriate subject for children.
  • You sell or promote alcohol or anything that should not be seen by minors.
  • Your website offers content or services related to sex or a dating site.
  • Your site contains violence or other content deemed inappropriate for young audiences.
  • You are offering a contest that requires the member to be of a certain age.
  • Your services need a valid credit card or driver's license.

Whatever your reason, moral, ethical, legal, monetary or otherwise, the fact is that you, as the owner of the site, must be responsible for enforcing this restriction. Ideally, parents, schools, libraries, and all those who provide Internet access to children should always teach children what is good or bad, but do not always rely on it.

How to add a restriction on WordPress

Many of the suggestions mentioned below are, of course, plugins. WordPress is a platform known for keeping users and visitors safe, so it shouldn't come as a surprise that someone has thought about developing plugins to help websites display restrictions for unauthorized users.

Step 1: Add a Privacy Policy

Each site must have a privacy policy in place. Why? Because you must allow visitors to know that you are protecting their information. But also, the privacy policy is especially needed with respect to child protection laws and you must ensure that your site respects them.

Privacy policies must include information regarding:

  • The type of information you are going to collect from visitors.
  • How will you collect it: through cookies, statistics, forms registration, etc.
  • Third parties involved in setting cookies and targeting visitors once they have left your site.

Suggested tool : the plugin Privacy Policy Terms of Service. Once installed on WordPress, go to " Settings> Auto TOS && PP »In order to configure the plugin and retrieve the shortcodes that you can display on your blog.

Step 2: Show a warning about age

Now let's talk about setting up the restriction gates.

It all depends on how you need to restrict it (for some of you it might be a page, for others a whole site). An age restriction homepage could be a good place to start. While it is true that the warning will not be enough to deter underage visitors from accessing your site.

There are a few options that you should always include on your warning page. You can create a new homepage, a brand for the rest of your site, and:

  • Add a note that mentions the age limit.
  • Add one online form asks visitors to provide their age.
  • Add a member area to restrict access to certain content

Step 3: Restrict access to content

Restriction to your site may still be necessary

Maybe your site is okay, but you touched on a controversial topic in a recent article. Or maybe your storefront has an adult-only section. It is therefore important to have control of these parts. The age verification tool will not always be appropriate.

Suggested tools:

Ultimate Category Excluder : If your site is intended for all audiences, but the casual blog contains graphic or unsuitable material, then this plugin will help you to hide the categories of your choice.

WP Hide Poster : This plugin is similar to the Ultimate Category Excluder plugin, although the main purpose of the latter is to choose which individual blog posts you want to hide.

Restrict Content : This plugin sets up restriction rules according to the level of the users. So, if your website allows subscriptions, the plugin will be able to restrict the content for those subscribers and you will still be able to control the content.

Summary :

As a website owner, developer, or website manager, the last thing you want is to expose underage individuals to inappropriate content on your site, simply because you don't. could not control the content.

I hope this tutorial will allow you to put together a number of measures that will allow you to restrict access to your website.