Get all your news in one place.
100’s of premium titles.
One app.
Start reading
The Guardian - UK
The Guardian - UK
Technology
Jack Schofield

Site blocker

I get very annoyed when websites will not permit you to use the Back button (close down being the only alternative) or have other annoying features. Is there a way of quarantining such sites so that your browser will not go there again? John Boothby

When your browser is going to a website, the first thing it does is look for a hosts file on your PC. You can use this file to tell the browser that the site is on your PC at the local address 127.0.0.1 (known as loopback), not on the web. To block a site such as www.xxxx.com, search your hard drive to find the hosts file, and load it in Notepad or another plain text editor. Now enter a separate line as follows:

127.0.0.1 www.xxxx.com

In future, the browser will look in the wrong place for the site (ie on your hard drive) and report it as Not Found. This technique is commonly used to block unwanted advertising sites, and you can download prepopulated hosts files (see http://www.mvps.org/winhelp2002/hosts.htm). Also, note that some malware tampers with your hosts file, so that when you try to go to Google, for example, the browser is redirected to www.xxxx.com or worse.

Incidentally, if the Back button is disabled, you should be able to click the small down-arrow next to the button and go back to any of the sites on the drop-down list.

Sign up to read this article
Read news from 100’s of titles, curated specifically for you.
Already a member? Sign in here
Related Stories
Top stories on inkl right now
Our Picks
Fourteen days free
Download the app
One app. One membership.
100+ trusted global sources.