# Rules for hosts file

**URL:** <https://community.blokada.org/t/rules-for-hosts-file/3482>\
**Category:** Developers\
**Created:** [September 6, 2020, 12:22pm UTC](https://community.blokada.org/t/rules-for-hosts-file/3482 "2020-09-06T12:22:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Partyzan](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Partyzan](https://community.blokada.org/u/Partyzan)\
**Post date:** [September 6, 2020, 12:23pm UTC](https://community.blokada.org/t/rules-for-hosts-file/3482/2 "2020-09-06T12:23:49Z")

</div>

Technical question here about asterisk rules:

> [@BETA feature: Advanced adblocking rules](https://community.blokada.org/t/beta-feature-advanced-adblocking-rules/231/14):
>
> You can use an Asterisk (\*) to block all subdomains of a domain. E.g.: \*.example.com . This will block all requests ending with .example.com . This means a domain like news.example.com wouldn’t be accessed anymore. A request like news.123example.com would still be accessed when using .example.com . If you want to block that domain as well, you simply set \*example.com as rule in Blocked Hosts. You cannot block a top-level domain. E.g.: \*.com . This won’t be allowed by the app. Will asterisk…

And, yes, I didn’t want such formatting above, it was autogererated 🙂

---

_[View the full topic](https://community.blokada.org/t/rules-for-hosts-file/3482)._
