How to make Opera browser obey the etc/hosts file?

There is Turbo mode in Opera, I guess you have it turned on.

When it is turned on - browser may ignore your local DNS configuration.

How does Opera Turbo work?

The technology behind Opera Turbo is a proxy server with server-side compression of webpages. A compression rate of up to 80% can be achieved, in part by reducing the quality of images.

Source: link


I haven't got Turbo turned on but I still had this problem. I found the following superuser post that solved my problem: Why is Chromium bypassing /etc/hosts and dnsmasq?.

Adapting the answer from that post I did the following:

1) In a new tab in Opera I entered the following URL: opera://net-internals/#dns;

2) On the page I clicked the Clear host cache button.