Skip to main content
adriellousada
Staff
Staff
December 2, 2025

Technical Tip: How to use regular expressions in the FortiClient EMS web filter

  • December 2, 2025
  • 0 replies
  • 567 views
Description This article describes how to use regular expressions to perform granular website allowance or blocking within the FortiClient EMS web filter.
Scope FortiClient EMS
Solution

To block or allow websites using regular expressions (regex) in FortiClient EMS, follow these steps:

  1. Open FortiClient EMS and navigate to Endpoint Profiles -> Web Filter.
  2. Find the profile that will be edited.
  3. Find the 'Exclusion List' section.
  4. Select 'Add' and select the desired action for this URL.
  5. Select the 'Regular Expression' type.
  6. In the URL field, enter the desired regular expression pattern.
  7. Apply the change by selecting Save'.

 

Example 1:

To allow all URLs from the subdomain 'fortinet.com.' The Web Filter configuration will be:

  • Action: Allow.
  • Type: Regular Expression.
  • URL: .*\.fortinet\.com.*



web-filter-regex.gif

 

All the following URLs, for example, will match this rule, as the regex will find the configured string 'fortinet.com':

  • community.fortinet.com/t5/forticlient/tkb-p/TKB10
  • docs.fortinet.com/product/forticlient/7.4


Example 2:

To block all websites that have the word 'forticlient' between the slashes in the URL:

  • Action: Block.
  • Type: Regular Expression.
  • URL: .*\/forticlient\/.*.

    web-filter-regex-block.gif

 

The URLs below will match the rule, but using the string '/forticlient/':

  • community.fortinet.com/t5/forticlient/tkb-p/TKB10
    docs.fortinet.com/product/forticlient/7.4

Note:

The examples are for illustrative purposes only. It is essential to verify the need for each case, as a very broad regular expression may allow or block inappropriate websites. Avoid generic terms and always be specific when defining what will be filtered by the regular expression.

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.