Skip to main content
Stephen_Daniel
Staff
Staff
February 20, 2026

Technical Tip: Allow certain websites using static URL filter and block all other websites without using FortiGuard category-based filter

  • February 20, 2026
  • 2 replies
  • 1133 views
Description This article describes how to allow certain websites by using a static URL filter list whilst blocking all other websites using a static URL filter list, all without using a FortiGuard category-based filter.
Scope FortiGate.
Solution

Steps to create a URL filter list:

  1. Create a web filter profile by going to Security Profiles -> Web Filter -> Create new.
  2. Enable the URL filter option under the Static URL Filter.
  3. Select 'Create New' to create a new entry in the URL filter.
  4. Add the allowed domain with Action 'Monitor' or 'Allow' with the 'Enable' status.

 

KB3_Allowed_Domains.JPG

 

  1. Repeat the same for all other allowed domains.
  2. Select 'Create New' to create a new entry in the URL filter.
  3. Select 'Wildcard'
  4. Set Action 'Block' with status 'Enable'.
  5. In the URL field, keep *, which means it will block anything.

 

KB4_Blocked_Domains.JPG

 

In the following example, the domains www.msn.com and https://ping.eu have been allowed, but all other URLs have been blocked, all by using a static URL filter list without using a FortiGuard category-based filter. This web filter profile has been configured in the policy, and all of the traffic will be blocked, except for access to https://www.msn.com and https://ping.eu.

 

KB1_URL_Filter_Profile.JPG

 

CLI Reference:

 

config webfilter urlfilter
    edit 1
        set name "Auto-webfilter-urlfilter_4lgtg8uv8"
            config entries
                 edit 1
                     set url "www.msn.com"
                     set action monitor
                 next
                 edit 2
                     set url "ping.eu"
                     set action monitor
                 next
                 edit 3
                     set url "*"
                     set type wildcard
                     set action block
                 next
             end
    next
end


config webfilter profile
    edit "Restricted_Profile"
        config web
            set urlfilter-table 1
end

 

Additionally, check the forward traffic logs or web filter security event logs to verify whether all of the websites are blocked except for the allowed websites.

 

KB2_URL_Filter_Logs.JPG

 

Related articles:

Technical Tip: Web filtering order of execution

Technical Tip: Use static URL filtering without FortiGuard Web Filter license

Technical Tip: Allow all website using static url filter without using Fortiguard category based filter

    2 replies

    kvsivasakthi
    New Member
    June 22, 2026

    Thanks for this nice article. I want all hope i can do this for wildcard URL entries also. 

    My requirement is allow *.example.com & *.firstexample.com & deny all other. Hope i can achieve this following above, thanks.

    kvsivasakthi
    New Member
    June 22, 2026

    ​@Stephen_Daniel  - Pls answer me, thanks.

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.