How to block users ?
You can create as many block instances as needed. They work as a normal post or page, you can set them to draft, publish, schedule or send it to trash. Each block instance is based on 3 things:
- Title: Just give a name to your redirection
- Block rules: Here we define a set of rules that will determine if the user will be blocked or not.
- Block options: The different settings and blocking message to display to the user
On this section you can combine multiple rules between each other and is the most powerful part. You can create group of rules using
For example on the screenshot above the block will be performed only if the user is located in the test page, and his country is US. If those two statements are true the redirection will be performed.
That rule for example could be extended with an
OR group of other rules and say for example redirect if the user is from Canada. So either the user is from Canada OR the two rules above match, the block will be performed.
You need to be careful to not overlap rules. For example if you do the following to block all user from US except the ones that are in contact page and you do the following:
On the example above if the user is from US and he is on the Contact page will be blocked because rule group #2 overwrite rule group #1. Instead you need to add both rules using the
It's important to add geo rules as the last rule of each group. That way is a prior rule fails, the geo rule won't run and you will save requests
On this section you find the different options for this block:
- Message: The message that will be displayed to the user being block. You can use HTML or shortcodes in here.
- Exclude Search engines: By default you don't want to redirect search engines, and just do it to user.
- Ip whitelist: You can add as many IPs as needed to be excluded from the redirection.