Created on
02-22-2010
05:39 AM
Edited on
12-09-2025
07:52 AM
By
Jean-Philippe_P
Description
This article describes how the FortiGate behaves when setting the Block Invalid URL option from the Web Filtering UTM profile.
Scope
FortiGate.
Solution
In CLI:
When a visited URL contains a '_', the site will be blocked with 'block-invalid-url'.
As per RFC 952, 'A "name" (Net, Host, Gateway, or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.).'
The invalid URL can be exempted by the URL filter in the Web Filtering profile when the firewall policy is in proxy-based inspection mode, and SSL inspection and deep inspection are enabled in the policy. The exemption will not work in the flow-based inspection mode policy.
Webfilter log for HTTP:
date=2025-04-09 time=09:31:22 eventtime=1617985882321875966 tz="-0700" logid="0315012547" type="utm" subtype="webfilter" eventtype="urlfilter" level="notice" vd="root" proto=6 policyid=1 sessionid=17896 srcip=10.1.10.2 srcport=55210 srcintf="port2" srcintfrole="undefined" dstip=17.142.16.9 dstport=80 dstintf="port1" dstintfrole="undefined" service="HTTP" profile="webfilter" hostname="http://www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore1.com" action="blocked" reqtype="direct" msg="The HTTP request contained an invalid domain name." sentbyte=136 rcvdbyte=0 url="/" crscore=30 craction=8 crlevel="high"
Webfilter log for HTTPS:
2: date=2021-04-09 time=09:33:25 eventtime=1617986005833407313 tz="-0700" logid="0315012551" type="utm" subtype="webfilter" eventtype="urlfilter" level="notice" vd="root" proto=6 policyid=1 sessionid=17953 srcip=10.1.10.2 srcport=48608 srcintf="port2" srcintfrole="undefined" dstip=17.142.16.9 dstport=443 dstintf="port1" dstintfrole="undefined" service="HTTPS" profile="webfilter" hostname="http://www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore1.com" action="blocked" reqtype="direct" msg="The Server Name Indication for the HTTPS session contained an invalid domain name." sentbyte=517 rcvdbyte=0 url="/" crscore=30 craction=8 crlevel="high"
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.