# Whitelists - import/export

**URL:** https://discourse.pi-hole.net/t/whitelists-import-export/74287
**Category:** Implemented
**Created:** [December 1, 2024, 8:00pm UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287 "2024-12-01T20:00:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Warmax356](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/warmax356/32/37830_2.png) [@Warmax356](https://discourse.pi-hole.net/u/Warmax356)
#### Post date: [December 1, 2024, 8:00pm UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287/1 "2024-12-01T20:00:14Z")

</div>

i am not sure if this has been suggested before in feature requests, but would it be possible to use a similar listing format as we use for gravity but for whitelists? or a format that would allow us to share our existing whitelist from the regex edits rather than one by one into a text file?

the reason i mention this is i run alot of lists in my pihole, but sometimes i notice that some international lists tend to block services that are essential such as banking like revolut, xbox/playstation services that sadly yes though they are telementry or ads related they are blocked by those lists but causes a pain to stay hunting it down each time, so having the whitelist in a txt file would make it easier to deploy on multiple instances and to be able to share it with others, should they wish to import it.

---

<div class="post-metadata">

### Author: ![korhant](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/korhant/32/3670_2.png) [@korhant](https://discourse.pi-hole.net/u/korhant)
#### Post date: [December 1, 2024, 9:02pm UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287/2 "2024-12-01T21:02:41Z")

</div>

running the command **pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 0;" \> exact\_whitelist.txt** would export exact whitelist to a text file. Similarly for the Regex whitelist, **pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 2;" \> regex\_whitelist.txt** would work

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [December 6, 2024, 7:01pm UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287/3 "2024-12-06T19:01:17Z")

</div>

The upcoming Pi-hole v6.0 supports subscribing to publicly available "allowlists" (formally known as whitelists) in the same way as it was already possible to subscribe to "denylists" (formally known as blacklists).

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [February 28, 2025, 11:13am UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287/4 "2025-02-28T11:13:43Z")

</div>

This has been released with Pi-hole v6

---

<div class="post-metadata">

### Author: ![Warmax356](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/warmax356/32/37830_2.png) [@Warmax356](https://discourse.pi-hole.net/u/Warmax356)
#### Post date: [March 20, 2025, 4:17pm UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287/5 "2025-03-20T16:17:02Z")

</div>

thanks for that update, and i have created a community white list for maltese / eu users and this is still a works in progress and can be [found here](https://github.com/Warmax356/OSS356-DNS-Blacklists/blob/ea92b5aacfacc855d72e4ab441c643f2f59b0bae/OSSMalta-WL.txt)... how ever i have not found the correct documentation / template for creating the white list in the correct structure.

will wildcards for sub domains be used like || domain ^ or will the urls have to be exact?

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [March 20, 2025, 4:46pm UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287/6 "2025-03-20T16:46:05Z")

</div>

> [@Warmax356](#):
>
> will wildcards for sub domains be used like || domain ^ or will the urls have to be exact?

`||domain.tld^` should work for all subdomains.

> <https://github.com/pi-hole/FTL/pull/1532>
>
> \# What does this implement/fix?
> 
> This PR implements support for AdBlock Plus (…ABP)-style domain lists in Pi-hole. To be precise, it adds support for the following domain matching syntax defined \[here\](https://adblockplus.org/filter-cheatsheet#blocking2) at the time of opening this PR:
> 
> !\[image\](https://user-images.githubusercontent.com/16748619/219143480-c96681eb-ff17-433c-b246-8b177bbf095f.png)
> 
> We do \*not\* implement any other features such as \*exception rules\* as they are typically beyond what a DNS server can do (path information, for instance, is simply not available).
> 
> It should be noted that this new feature is not for free but the rather complex syntax means it comes at some computational costs (= delays in DNS replies if you are on low-end hardware). To mitigate this drawback, ABP-style matching is only enabled when FTL actually detects such domains in the \`gravity\` table. This shouldn't be the case for the vast majority of users using "normal" HOSTS-style or simple one-domain-per-line adlists as sources for Pi-hole.
> 
> \*\*Related issue or feature (if applicable):\*\* N/A
> 
> \*\*Pull request in \[docs\](https://github.com/pi-hole/docs) with documentation (if applicable):\*\* N/A
> 
> \---
> \*\*By submitting this pull request, I confirm the following:\*\* 
> 
> 1. I have read and understood the \[contributors guide\](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against. 
> 4. I have commented my proposed changes within the code.
> 6. I am willing to help maintain this change if there are issues with it later.
> 7. It is compatible with the \[EUPL 1.2 license\](https://opensource.org/licenses/EUPL-1.1)
> 8. I have squashed any insignificant commits. (\[\`git rebase\`\](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
> 
> \## Checklist:
> 
> \- \[x\] The code change is tested and works locally.
> \- \[x\] I based my code and PRs against the repositories \`developmental\` branch.
> \- \[x\] I \[signed off\](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the \[DCO\](https://docs.pi-hole.net/guides/github/dco/) for all contributions
> \- \[x\] I \[signed\](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
> \- \[x\] I have read the above and my PR is ready for review.

---

<div class="post-metadata">

### Author: ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)
#### Post date: [September 16, 2025, 4:46pm UTC](https://discourse.pi-hole.net/t/whitelists-import-export/74287/7 "2025-09-16T16:46:52Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
