

by re-routing or not showing/hiding all elements. So, we will map the website we want to block to a local IP address called localhost. In case you don’t know, the hosts file is used to map IP addresses to human-readable website addresses. Filter and block inappropriate content on the web across Windows 10, Xbox, and Android devices with Family Safety. To block a website on the Edge browser, you can use an extension or make changes to the hosts file. You can either do this by pattern matching or simpler by searching if the string contains something that's only there in IE/Edge browsers and act accordingly, e.g. Set up web and search filters for Family Safety. TL DR: All you need to do is to check the user agent. Next, select Settings > View advanced settings, then enable the switch marked Keep me protected from malicious sites and downloads with Windows Defender Smartscreen. If you want a better example this could also help: Open the browser and click on the three dots icon in the top right corner. Here is an example on how to get the user agent:

Or you could entirely block the access by not displaying any elements if the user agent is either Edge or IE. Since accessing your website is nothing else than sending a GET-request, you can handle this by checking the user agent in the header and re-route users to a page where you can tell them that they should a different browser. The UA is part of the header that is sent/received with each HTTP call. Activate the 'element picker' and use the mouse to select the item on the page that you want to remove from it. Under Block type, click either URL & Cache to prevent URL and the cached pages from showing up in search, or click Cache only, to block only the cached page from showing up. The page that you want to remove elements on needs to be active. Every browser and app which access a website has something called a "User Agent". Press F12 to open the Developer Tools of the web browser.
