One method of filtering is simply to block (or prevent auto play of)
Flash animations (though these are now largely obsolete) or image loading or
Microsoft Windows audio and video files. This can be done in most browsers easily and also improves security and privacy. This crude technological method is refined by numerous
browser extensions. Every
web browser handles this task differently, but, in general, one alters the options, preferences or application extensions to filter specific media types. An additional add-on is usually required to differentiate between ads and non-ads using the same technology, or between wanted and unwanted ads or behaviors. Some browsers include built-in controls to block unsolicited pop-up windows as part of their content-blocking features. For example, Brave exposes a setting to block pop-ups in its privacy and security options. The more advanced ad-blocking filter software allows fine-grained control of
advertisements through features such as
blacklists,
whitelists, and
regular expression filters. Certain security features also have the effect of disabling some ads. Some
antivirus software can act as an ad blocker. Filtering by intermediaries such as
Internet service providers (ISPs) or national governments is increasingly common.
Browser integration , many web browsers block unsolicited
pop-up ads automatically. Current versions of
Konqueror,
Microsoft Edge, and
Firefox also include content filtering support out-of-the-box. Content filtering can be added to
Firefox,
Chromium-based browsers,
Opera,
Safari, and other browsers with extensions such as
AdBlock,
Adblock Plus, and
uBlock Origin, and a number of sources provide regularly updated filter lists. Another method for filtering advertisements uses
Cascading Style Sheets (CSS) rules to hide specific
HTML and
XHTML elements. This was once handled directly by a browser's user style sheet and custom CSS files. The CSS files employed regular expressions to describe a general advertisement profile. An example CSS selector from the once popular Floppy Moose (2003) style sheet is below. It simply hides anything with a link containing the characters "ad." a:link[href*="ad."] img Stylesheets are still used to block ads today. However they are almost always used by an ad-blocking extension that combines CSS with other techniques. AdBlock Plus syntax includes CSS selectors which they call "element hiding" rules. The newer uBlock Origin even allows "cosmetic filters" which inject custom CSS declarations. Due to changes in advertising techniques, modern ad-blockers use more specific selectors, more frequently updated selectors, and a greater quantity of selectors. For example, the Floppy Moose style sheet originally contained 40 lines of CSS. In 2022, Easylist contains thousands of CSS selectors. In contrast to the general example above, below is one of the many specific CSS selectors from Easylist (2022). a[href^="https://topoffers.com/"][href*="/?pid="] In January 2016,
Brave, a free, ad-blocking browser for Mac, PC, Android, and iOS devices was launched. Brave users can optionally enable Brave's own ad network to earn
Basic Attention Tokens (BATs), a type of cryptocurrency, which can be sent as micro-payments to publishers. At the beginning of 2018, Google confirmed that the built-in ad blocker for the
Chrome/
Chromium browsers would go live on 15 February: this ad blocker only blocks certain ads as specified by the
Better Ads Standard (defined by the Coalition for
Better Ads, in which Google itself is a board member). This built-in ad blocking mechanism is disputed because it could unfairly benefit Google's advertising itself. In 2019, both
Apple and Google began to make changes to their web browsers' extension systems which encourage the use of declarative content blocking using pre-determined filters processed by the web browser, rather than filters processed at runtime by the extension. Both vendors have imposed limits on the number of entries that may be included in these lists, which have led to (especially in the case of Chrome) allegations that these changes are being made to inhibit the effectiveness of ad blockers.
External programs A number of external software applications offer ad filtering as a primary or additional feature. A traditional solution is to customize an
HTTP proxy (or web proxy) to filter content. These programs work by caching and filtering content before it is displayed in a user's browser. This provides an opportunity to remove not only ads but also content that may be offensive, inappropriate, or even malicious (
Drive-by download). Popular proxy software which blocks content effectively include
Netnanny,
Privoxy,
Squid, and some
content-control software. The main advantage of the method is freedom from implementation limitations (browser, working techniques) and centralization of control (the proxy can be used by many users). Proxies are very good at filtering ads, but they have several limitations compared to browser-based solutions. For proxies, it is difficult to filter
Transport Layer Security (TLS) (https://) traffic and full webpage context is not available to the filter. As well, proxies find it difficult to filter
JavaScript-generated ad content.
Hosts file and DNS manipulation Most
operating systems, 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 addresses. 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 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 (
127.0.0.1 or
0.0.0.0 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.
DNS filtering Advertising can be blocked by using a DNS server which is configured to block access to domains or hostnames which are known to serve ads by spoofing the address. Users can choose to use an already modified DNS server or set up a dedicated device running adequate software such as a
Raspberry Pi running
Pi-hole themselves. Manipulating DNS is a widely employed method to manipulate what the end-user sees from the Internet but can also be deployed locally for personal purposes. China runs its own
root DNS and the EU has considered the same.
Google has required their
Google Public DNS be used for some applications on its
Android devices. Accordingly, DNS addresses/domains used for advertising may be extremely vulnerable to a broad form of ad substitution whereby a domain that serves ads is entirely swapped out with one serving more local ads to some subset of users. This is especially likely in countries, notably
Russia,
India and
China, where advertisers often refuse to pay for clicks or page views. DNS-level blocking of domains
for non-commercial reasons is already common in China.
Recursive local VPN On
Android, apps can run a local
VPN connection with its own host filtering ability and DNS address without requiring
root access. This approach allows ad blocking app to download ad blocking host files and use them to filter out ad networks throughout the device.
AdGuard, Blokada, DNS66, and RethinkDNS are few of the popular apps which accomplish ad blocking without root permission. The ad blocking is only active when the local VPN is turned on, and it completely stops when the VPN connection is disconnected. The convenience makes it easy to access content blocked by anti-adblock scripts. This approach optimizes battery usage, reduces internet slowdown caused by using external DNS or VPN ad blocking and needs overall less configuration.
Hardware devices Devices such as AdTrap or
Pi-hole use hardware to block Internet advertising. Based on reviews of AdTrap, this device uses a
Linux Kernel running a version of PrivProxy to block ads from
video streaming,
music streaming, and any web browser, while PiHole acts as a local DNS to block advertisement servers, stopping connected devices from showing most ads. Another such solution is provided for network-level ad blocking for telcos by Israeli startup Shine.
By external parties and internet providers Internet providers, especially mobile operators, frequently offer proxies designed to reduce network traffic. Even when not targeted specifically at ad filtering, these proxy-based arrangements will block many types of advertisements that are too large or bandwidth-consuming, or that are otherwise deemed unsuited for the specific internet connection or target device. ISPs have been known to block advertisements while at the same time injecting their own ads promoting their services. ==Economic consequences for online business==