From b523688204d0b1cfa291f833a7c4940bfe3bff16 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Tue, 25 Feb 2020 12:39:41 +0300 Subject: [PATCH] Merge: + add "domains-only syntax" section Squashed commit of the following: commit 3786bb54577baa29c6acf4c9329c0e7e1ed19a19 Author: Simon Zolin Date: Thu Feb 20 11:57:58 2020 +0300 * edit "domains-only syntax" section commit 2a8b0541d94e62a07d79343e12a87896d7a75238 Author: adworacz Date: Mon Feb 17 19:12:49 2020 +0300 + add "domains-only syntax" section --- Hosts-Blocklists.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Hosts-Blocklists.md b/Hosts-Blocklists.md index 5893a99..20c97bf 100644 --- a/Hosts-Blocklists.md +++ b/Hosts-Blocklists.md @@ -1,8 +1,9 @@ # AdGuard Home - How to write hosts blocklists -There are two different approaches to writing hosts blocklists: +There are three different approaches to writing hosts blocklists: - [/etc/hosts syntax](#etc-hosts) - the old, tried and true approach is to use the same syntax as Operation Systems use for the "hosts" files. +- [domains-only syntax](#domains-only) - a list of domain names. - [Adblock-style syntax](#adblock-style) - modern approach to writing filtering rules based on using a subset of the Adblock-style syntax. This way blocklists will be compatible with browser ad blockers. If you are creating a blocklist for AdGuard Home, we recommend using the [Adblock-style syntax](#adblock-style). It has a couple of important advantages over the old-style syntax: @@ -49,6 +50,21 @@ Examples: > Please note, that the `IP_address` value is ignored by most of the DNS filtering software. + +## Domains-only syntax + +This is just a list of domain names, one name per line. + +Example: + +``` +example.com +example.org +``` + +If a string is not a valid domain (e.g. `*.example.org`), AdGuard Home will consider it to be an [adblock-style](#adblock-style) rule. + + ## Adblock-style syntax This is a subset of the [traditional Adblock-style](https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters) syntax which is used by browser ad blockers.