Opera URL Filtering for ad blocking


Recommended Posts

Note: I have specifically set this up to allow Google ads so that this Forum can remain open. If the admins decide on new ad servers, they should pm me and I'll modify this guide to include the new ad server.

Or if you don't like this, feel free to destroy it.

This is a modified version of a guide found here

And also a modified HOSTS file from here

One of Opera's many features is a Kiosk mode.

One part of this mode is a URL filter which can accept wildcard entries. This is a perfect for blocking a lot of adservers. More effective than editing a HOSTS file, due to the wildcard entries.

---------

1) First, you will need at least version 6.02 of Opera (currently I am using this in version 7.5 Beta 1)

2) Make sure Opera is closed

3) Inside the program folder (in my case, "c:\program files\Opera75\") make a blank file called "Filter.ini" (full folder path: "C:\Program Files\Opera75\filter.ini")

4) The filter.ini file is made up of three sections: a [prefs] section, an [include] section, and an [exclude] section. Prefs is preferences, include refer to URL's that are allowed to be accessed, exclude refer to URL's that are forbidden. Now the fun begins.

5) Inside your "filter.ini" insert the following:

Snipped : here

6) Save and close this file.

7) Find your "Opera6.ini" file. It should be under the profile folder (in some cases, "c:\program files\opera75\profile". In other cases, "c:\documents and settings\******\Application Data\Opera\Opera75\profile", where ****** is your user name)

8) Open "Opera6.ini", and search for "[Adv User Prefs]". Under it add the following line:

URL Filter File=filter.ini

9) Save and close.

10) Now you can open Opera, and a lot of ads should be gone.

If you encounter any problems (most common is a page not opening, just instantly loading to a blank page), then compare the URL of the page to any entries under filter.ini. Remember that after editing filter.ini, you will need to close and reopen Opera.

A small tip, for easy editing of filter.ini: Right click filter.ini, and select "Send To > Desktop (Create Shortcut)". Now you have a desktop icon for easy editing of Filter.ini.

If you have any problems with this, feel free to to ask for help

*Chode*

Edited by Mr magoo
Link to comment
https://www.neowin.net/forum/topic/160967-opera-url-filtering-for-ad-blocking/
Share on other sites

I had problems with that before, the thing that solved it for me was:

change from "URL Filter File=filter.ini"

to "URL Filter File=<program path>\filter.ini" ("C:\Program Files\Opera\filter.ini")

Don't forget to add "" if the path has spaces in it.

I had problems with that before, the thing that solved it for me was:

change from "URL Filter File=filter.ini"

to "URL Filter File=<program path>\filter.ini" ("C:\Program Files\Opera\filter.ini")

Don't forget to add "" if the path has spaces in it.

Good point. Most of the time it's not needed as long as you follow the paths I used above, but sometimes you need to use your method

all loaded, with all the ads

I give up, even if it would work, there is no right clic menu to add a add to the list like Adblock extention does with FireFox

Also, cookies dont work at all!!! I have set to popup window when there is a cookie and i clic yes to accept those I want and I cant login to ANY sites at all

Also, I can't leave website's style using MY fonts... which I can with FireFox...

Gonnastay with FireFox.. the best for me

Edited by finalcut
all loaded, with all the ads

I give up, even if it would work, there is no right clic menu to add a add to the list like Adblock extention does with FireFox

Also, cookies dont work at all!!! I have set to popup window when there is a cookie and i clic yes to accept those I want and I cant login to ANY sites at all

Also, I can't leave website's style using MY fonts... which I can with FireFox...

Gonnastay with FireFox.. the best for me

Whatever works for you, dude ;)

Somehow that hostfile crashes opera for me...

Here is mine, covers up most of the ads with 10 times less information.

Don't think it was the hostfiles fault, I'm using it here on my copy of 7.5 Beta 1 and on my other machine running 7.23 without a hitch.

1) My filter.ini is a modified hostfile, hence the large number of entries to make it "more precise"

2) The filter.ini file you have attached will stop Google ads, meaning that you are cutting off support for this forum. :no:

I recommend you remove it, or ask a moderator to remove it for you.

How is removing ads from this site different than removing ads on any other?

Well

1) it would be hipocritical for the mods/admins here to allow a guide to be hosted that cuts off support for the forum

and more importantly

2) Google ads are harmless. I've never seen one pose as a system pop up, attempt to install spyware, or be made up of bright flashing colours, or take up ridiculous amounts of bandwidth.

Google: The Ways It's Meant To Be Advertised. :)

Somehow that hostfile crashes opera for me...

Hmm, after some investigating I managed to replicate this problem.

You are right, and I was wrong. There was a problem with the hostfiles/filter.ini

There was an errenous entry (***.) that caused 7.23 to crash in some cases. Removing the entry should fix that.

The guide probably will be modified to reflect that.

  • 3 months later...

Just thought I'd point out - I maintain the list of ad servers linked to in this thread's first post (as "a modified HOSTS file"). It's kind of funny that Mr. Chode linked to that URL and then went on to describe how it can be used in Opera's URL filtering - because it's actually possible to view the list in Opera's filter.ini format without needing to change anything (and has been for around two years). It's not meant to be a definitive filter.ini file, but it is quite a good start.

The list can also be viewed in quite a few other formats that can be used for different things. The main page has more information.

cheers,

pgl.

Just thought I'd point out - I maintain the list of ad servers linked to in this thread's first post (as "a modified HOSTS file"). It's kind of funny that Mr. Chode linked to that URL and then went on to describe how it can be used in Opera's URL filtering - because it's actually possible to view the list in Opera's filter.ini format without needing to change anything (and has been for around two years). It's not meant to be a definitive filter.ini file, but it is quite a good start.

The list can also be viewed in quite a few other formats that can be used for different things. The main page has more information.

cheers,

pgl.

/mega forehead slap.

Doh. I only found your (quite excellent) list when someone linked me to it (forget where). Man, I can't believe I coded an application to convert it for me....

Oh well...thanks for your excellent list (Y). Hope it's ok that I used it for this guide....

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Camtasia 2026.1.3 by Razvan Serea TechSmith Camtasia is the complete professional solution for high-quality screen recording, video editing and sharing. Camtasia 2026 makes editing your videos easier, and faster than ever. The new editor is packed with enhanced video processing, all-new production technology, an innovative library, and stock videos and other creative assets to help you create more polished, professional videos. No video experience needed. Anyone can create informative, engaging videos. Create professional, eye-catching videos: Add special video effects - Apply Behaviors that are perfectly designed to animate your text, images, or icons. Get a crisp, polished look without being a professional video editor. Drag-and-drop your edits - What you see is what you get. Every effect and element in your video can be dropped and edited directly in the preview window. And you can edit at resolutions up to beautiful 4K, for clear video at any size. Get exceptional performance - Camtasia takes full advantage of your computer’s processor with 64-bit performance. You’ll get fast rendering times and enhanced stability—even on your most complex projects. Camtasia 2026.1.3 changelog: Feature Updates Improved keyboard navigability in tool panels. Improved screen reader accessibility of headings in Preferences. Tool panels can now be resized using a keyboard-navigable control. Updated color of folder icon in User Library tab for better visibility. Grouped media now render a composite waveform considering all audio media within that group. Added Long Path Aware to the manifest of Editor and Recorder. Performance Improvements Improved performance for editing groups on the timeline. Improved the project loading performance when timeline has lots of trec media with cursor data. Updates for IT Administrators Updated cpp-httplib from 0.38.0 to 0.43.3. Updated expat from 2.7.4 to 2.8.0. Updated freetype from 2.13.3 to 2.14.3. Updated harfbuzz from 13.0.1 to 14.2.0. Updated libpng16 from 1.6.55 to 1.6.58. Updated pango from 1.57.0 to 1.57.1. Updated girepository from 2.86.3 to 2.88.0. Updated pcre2-posix from 10.47.0 to 12.0.2. Added new harfbuzz-gpu.dll. Updated FFmpeg from 7.1.1 to 7.1.2. Updated aom from 3.11.0 to 3.13.1. Updated dav1d from 1.5.0 to 1.5.1. Updated ogg from 1.3.5 to 1.3.6. Updated SDL2 from 2.32.4 to 2.32.10. Updated zlib from 1.3.1 to 1.3.2. Updated Nalpeiron binaries to version 4.4.69.3. Bug Fixes Fixed an issue which prevented some user submitted crash reports from being sent. Fixed a potential memory leak when decoding HEVC or VP9 video. Fixed a potential crash when trying to delete a range selection on a magnetic track. Fixed a bug with the Properties Panel showing stale properties when only a caption is selected on the timeline. Fixed an issue that could prevent the Opacity and Blur properties from being changed in the Background Removal effect. Fixed an issue where larger Camtasia online projects may fail to open in Camtasia Editor. Table of contents thumbnails are no longer created for Smart Player exports with no table of contents. Fix resetting skew revert to revert just skew and not scale as well. Fixed editing in Snagit with snagX file with Unicode characters. Fixed a bug where grouped visual media could be cropped in some cases. Fixed importing SnagX files with Unicode characters. Localization fixes. Download: Camtasia 2026.1.3 | 309.0 MB (Shareware) View: Camtasia Homepage | Tutorials | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • yeah it seems to be Edge only. The dialog buttons work as expected in Chrome and Firefox. The phone is using Android 16 (OneUI 8.5) and Edge version  149.0.4022.53
    • I'm not aware of this issue, but to help the other guys.  What version of Android are you using? Did you try a different browser? To see if Edge is the issue here.
    • I agree when are you going to read this (really poor BTW) article? Here is a better article so you actually know what is going on and answers questions you had in other comments --> https://arstechnica.com/gadgets/2026/05/speed-boosting-low-latency-profile-is-one-of-the-improvements-coming-to-windows-11/ It is unclear if one will be able to disable the new profile at this point but I am not seeing any reason why one would.
  • Recent Achievements

    • One Month Later
      Jamswaz earned a badge
      One Month Later
    • Week One Done
      Jamswaz earned a badge
      Week One Done
    • Rookie
      Marzoid went up a rank
      Rookie
    • Community Regular
      coch went up a rank
      Community Regular
    • One Year In
      slackerzz earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      510
    2. 2
      PsYcHoKiLLa
      188
    3. 3
      +Edouard
      157
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!