Opera browser: Blocking unwanted ads and other cr*p using URL filtering

URL filtering has first been mentioned in the changelog for "Opera 6.02 for Windows" build 1078. Opera's url filtering provides a very basic filtering mechanism. Use The Internet Junkbuster, Siemens' WebWasher, Proxomitron or similar applications if you need a more powerful solution.

If you intend to use Opera's URL filtering, please make sure to download Opera 6.02 or newer for Windows. URL filtering has also been implemented in Opera 6.02 Preview 1 for Linux. :)

opera6.ini

First, you'll have to define a URL filter file in the [Adv User Prefs] section of your opera6.ini file:

; opera6.ini
; This file is part of the Opera browser.
; Do not edit this file while Opera is running

[Adv User Prefs]
URL Filter File=filter.ini

filter.ini

Then, you can set-up URL filter rules in your URL filter file:

; filter.ini
; This file is part of the Opera browser.

[prefs]
prioritize excludelist=1

[include]
*

[exclude]
http://ad.*
http://ads.*
http://adserv*
http://banner*
http://count*
http://*.doubleclick.net/*
http://*.hitbox.net/*
http://*.ivwbox.de/*
http://*.tradedoubler.*
http://*/ads/*
http://*/Ads/*
http://*/banners/*

Notes:

Known problems:

Opera might not be showing anything if a site uses JavaScript to display blocked images. So either adjust your exclude list or disable JavaScript (press F12, and uncheck "Enable JavaScript").

Download sample filter file

It was possible to download a sample block file from Partiallycorrect (http://scorpius.spaceports.com/~opera/block.ini). Right now all I get is a 404 error page. Therefore you can download a zipped version (2 KB) of block.ini (last modified April, 14th) from my server. Disclaimer: I haven't tested it. If someone knows the new URL, please drop me a line.

You can download a host specific filter list in different formats (e.g., for hosts, named.conf, opera url filter ini), or you could try to adjust entries from a Junkbuster blocklist (24 kb).

Official Opera Kiosk Mode and URL filtering documentation

Opera's Kiosk Mode and URL filtering (which was mainly added to benefit kiosks) are now documented by Opera. Read the official Opera Kiosk Mode documentation to learn more.

Deutsche Anleitung

JensusUT hat im Supernature-Forum eine «kurze Einführung in die eingebaute Opera URL-Filterliste» geschrieben.

Version française

La version française est disponible ici: Navigateur Opera: bloquer les pubs non-sollicitées et autres m*rdes avec le filtrage d'URL (Traduction: Perrick Penet).

28 Juni 2004
Martin Schrode <webmaster @ schrode . net>
http://www.schrode.net/opera/url_filtering/index.html

[Home] [Sitemap] [Buy Opera for your platform!]