Troubleshooting Tip: Web Page blocked with 'An error occurred while trying to rate the web site using the webfiltering service'
Description
This may be caused by:
- An issue about the rating of the FortiGuard Web Filtering feature.
- The expiration of the Web Filtering license.
- Inability to reach the FortiGuard server for web filtering rating.
To confirm FortiGuard servers are reachable, try to ping the following hostnames:
execute ping service.fortiguard.net
execute ping update.fortiguard.net
execute ping guard.fortinet.net
execute ping securewf.fortiguard.net [ for HTTPS service ]
If the hostname is not resolving or ping is not working, refer to this KB article: Troubleshooting Tip: Unable to connect to FortiGuard servers.

Scope
FortiGate.
Solution
This will enable users to access websites even when a rating error occurs, allowing the FortiGate unit to utilize the FortiGuard Web Filtering database stored on the unit to rate the website.
This is applicable even if the FortiGuard Web Filtering license has expired, but it will not allow access to the latest update from the FortiGuard service.
Go to Security Profiles -> Web Filter, select the Profile to use, and under 'Rating Options' enable 'Allow Websites When a Rating Error Occurs'.

In CLI:

From v7.4 and above, the option for changing the 'Allow website when rating error occurs' has changed. The following option, shown in the screenshot below, needs to be disabled or enabled to either enable or disable the option for rating error.

Scenario 2:
When checking the 'diagnose debug rating', two servers were seen:

If the servers show 'F' under Flags, this indicates that the server has not responded and is considered to have failed.
To resolve, the FortiGuard settings can be adjusted to the following:
config system fortiguard
set fortiguard-anycast disable
set protocol udp
set port 8888
set sdns-server-ip 208.91.112.220 173.243.140.53 210.7.96.53
end
At this point, if the issue persists, after clearing the browser cache and trying from different browsers, then a last resort is to restart the web-filter service using the command below:
diagnose test application urlfilter 99
For the detailed 'diagnose debug rating' flags description, refer to this article: Troubleshooting Tip: Resolving FDS Communication Issues (FortiGuard Distribution Servers).
Related article:
Technical Tip: Web Page Blocked using WebFilter when failed to connect to FortiGuard
