Skip to main content
willbase
New Member
May 22, 2025
Question

How to configure URL Filter to allow only specific domains

  • May 22, 2025
  • 2 replies
  • 1047 views

Hello,

 

We would like to allow only certain domains in the static URL filter.
Is the following the correct way to write it if the domain is an exact match and subdomains are not allowed?

 

example

I want to allow only 【example.com】,
If I do not want to allow the subdomain 【aaa.example.com】

when I select Regular Expression,

 

→ example \. com

 

Normally, when you select a simple URL filter, writing 【example.com】 is recognized to include subdomains.
The following web site was used as a reference.

 

https://community.fortinet.com/t5/FortiGate/Technical-Tip-URL-Filter-expressions-for-the-FortiGate/ta-p/192746

 

FortiGate 

2 replies

funkylicious
SuperUser
SuperUser
May 22, 2025
hpenmetsa
Staff
Staff
May 23, 2025

Hello,

If you want to allow only example.com. Please use "www.example.com" in the static URl. This will allow only www.fortinet.com and the rest of the subdomains, such as aaa.example.com will be blocked. Please check link below for more info.
https://community.fortinet.com/t5/FortiGate/Technical-Tip-Using-a-static-URL-filter-feature-to-allow-block/ta-p/193086#:~:text=can%20be%20defined%3A-,Simple%3A,-A%20simple%20URL

Thanks

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.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!