Allow only white-listed sites on Windows 10

If it's OK to block access for everyone who uses that computer, you can edit the HOSTS file to null-route non-approved websites, redirecting them to an IP address that doesn't exist (or, if you want to be annoying, redirect them all to something like nyan.cat).

As an admin, press Win+R and type

%systemroot%\system32\drivers\etc\

in the dialog box, and press ENTER. On the list of files in Explorer, right-click on "hosts", click "Open With" from the context menu, and then open it with Notepad. Once you're in, you can edit it like this:

#allowed sites
173.194.33.128 google.com
198.252.206.16 superuser.com
#blah blah, more sites here

#blocked sites
<paste the contents of http://pastebin.com/63hfPx8M here>

This null-routes all TLDs (.com, .net, etc.) and only allows through whitelisted sites.

To whitelist more sites, add a line for each website to the HOSTS file by putting the IP address of the website (see below), then a space, then the website name. Don't put "http://" in the name, or anything after the .com/.net/whatever TLD the website has.

To find the IP of a website, first do Win+R, then "cmd", then Enter. When the black box comes up, type ping <website> and press Enter. (Again, don't put "http://" or any of that stuff in.) Some stuff will show up, but what matters is the IP, which is in brackets:

C:\Users\Me>ping google.com

Pinging google.com [173.194.33.128] with 32 bytes of data:

So Google's IP is 173.194.33.128.