# How careful should I be adding blocklists?

**URL:** <https://discourse.pi-hole.net/t/how-careful-should-i-be-adding-blocklists/62631>\
**Category:** Customizing Pi-hole\
**Tags:** blacklisting\
**Created:** [April 25, 2023, 1:54am UTC](https://discourse.pi-hole.net/t/how-careful-should-i-be-adding-blocklists/62631 "2023-04-25T01:54:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![419](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/4/c67d28/32.png) [@419](https://discourse.pi-hole.net/u/419)\
**Post date:** [April 25, 2023, 1:54am UTC](https://discourse.pi-hole.net/t/how-careful-should-i-be-adding-blocklists/62631/1 "2023-04-25T01:54:23Z")

</div>

I'm not familiar with the backend of how Pi-hole adds blocklists. Does it download a copy of the file and analyze it? If it downloads a copy, then it would be theoretically possible for someone to put malicious software in the file, and for it to then infect the machine.

Does it handle importing the domains in a different way, such that viruses and malware are not a concern?

For now, I'm being extremely careful and picky about which blocklists I add, only adding well-known and tested ones. I know this is best practice, as a poorly made blocklist can cause more harm than good, regardless of whether or not it has malware, but there are some lesser-known third party blocklists I would like to add. I just want to make sure I'm not going to give my Pi-hole machine a virus or anything by adding a blocklist.

---

<div class="post-metadata">

**Author:** ![RonV42](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@RonV42](https://discourse.pi-hole.net/u/RonV42)\
**Post date:** [April 25, 2023, 10:44am UTC](https://discourse.pi-hole.net/t/how-careful-should-i-be-adding-blocklists/62631/2 "2023-04-25T10:44:43Z")

</div>

I only trust reliable sources of lists. There is checking done by the gravity update process but that is on the record structure. Here is a site that has a good source of reliable lists:

> **[The Big Blocklist Collection](https://firebog.net/)**
>
> Pi-hole compatible blocklists for you to have a more enjoyable online presence

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [April 25, 2023, 3:03pm UTC](https://discourse.pi-hole.net/t/how-careful-should-i-be-adding-blocklists/62631/3 "2023-04-25T15:03:31Z")

</div>

> [@419](#):
>
> Does it download a copy of the file and analyze it?

Yes. We retrieve the list at the specified URL, strip any leading IP's and save the remaining domains (1 per line) into gravity. Lines that do not contain valid entries are rejected.

> [@419](#):
>
> then it would be theoretically possible for someone to put malicious software in the file, and for it to then infect the machine.

We don't process anything other than domain names. No executables, etc.

Imported domains go into the SQL database _ **/etc/pihole/gravity.db** _. This file is searched when a client requests a domain - if the domain is in this file, the domain is blocked.

---

<div class="post-metadata">

**Author:** ![419](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/4/c67d28/32.png) [@419](https://discourse.pi-hole.net/u/419)\
**Post date:** [April 26, 2023, 4:10am UTC](https://discourse.pi-hole.net/t/how-careful-should-i-be-adding-blocklists/62631/4 "2023-04-26T04:10:08Z")

</div>

This looks pretty good. Thank you for the recommendation.

---

<div class="post-metadata">

**Author:** ![419](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/4/c67d28/32.png) [@419](https://discourse.pi-hole.net/u/419)\
**Post date:** [April 26, 2023, 4:10am UTC](https://discourse.pi-hole.net/t/how-careful-should-i-be-adding-blocklists/62631/5 "2023-04-26T04:10:55Z")

</div>

Ah, so no worries about getting malware then. Still, I'll be careful. Thank you for the information.
