Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Ad blocking
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Hosts file and DNS manipulation=== {{Further|Hosts (file)#Extended applications}} {{Unreferenced section|date=April 2023}} Most [[operating system]]s, even those which are aware of the [[Domain Name System]] (DNS), still offer [[backward compatibility]] with a locally administered list of foreign hosts. This configuration, for historical reasons, is stored in a flat text file that by default contains very few hostnames and their associated [[IP address]]es. Editing this hosts file is simple and effective because most DNS clients will read the local hosts file before querying a remote [[DNS server]]. Storing [[Black hole (networking)|black-hole]] entries in the hosts file prevents the browser from accessing an ad server by manipulating the name resolution of the ad server to a local or nonexistent IP address (<code>[[127.0.0.1]]</code> or <code>[[0.0.0.0]]</code> are typically used for IPv4 addresses). While simple to implement, these methods can be circumvented by advertisers, either by hard-coding, the IP address of the server that hosts the ads (this, in its turn, can be worked around by changing the local routing table by using for example [[iptables]] or other blocking firewalls), or by loading the advertisements from the same server that serves the main content; blocking name resolution of this server would also block the useful content of the site. Using a [[DNS sinkhole]] by manipulating the hosts file exploits the fact that most operating systems store a file with IP address, domain name pairs which is consulted by most browsers before using a DNS server to look up a domain name. By assigning the [[loopback address]] to each known [[ad server]], the user directs traffic intended to reach each [[ad server]] to the local machine or to a virtual black hole of [[/dev/null]] or [[bit bucket]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)