Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating Dim request As System.Net.WebRequest Dim response As System.Net.WebResponse request = System.Net.WebRequest.Create(e.Url) ' we need only header part of http response request.Method = "HEAD" response = request.GetResponse() ' only text/html, text/xml, text/plain are allowed... extend as required If (Not response.ContentType.StartsWith("text/")) Then e.Cancel = True MessageBox.Show("Not allowed for security resons...") End If End Sub