Skip to content

Ready-to-use, optimized blocklists for Pi-hole, regularly updated and categorized by threat type

License

Notifications You must be signed in to change notification settings

zachlagden/Pi-hole-Optimized-Blocklists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi-hole Optimized Blocklists

Last Updated Total Domains License

Ready-to-use, optimized blocklists for Pi-hole, regularly updated and categorized by threat type

InstallationThe ListsStatisticsUsageWeekly UpdatesFAQ

ℹ️ About

This repository contains regularly updated, optimized blocklists for use with Pi-hole, the popular DNS-level ad blocker. These lists have been processed with the Pi-hole Blocklist Optimizer to:

  • Remove duplicates across all source lists
  • Validate all domains for proper formatting
  • Organize domains by category
  • Pre-optimize for Pi-hole compatibility
  • Remove false positives and problematic domains

These lists are updated on a regular basis to ensure they contain the latest threats while minimizing false positives.

🚀 Installation

Option 1: Quick Setup (Recommended)

Simply add these URLs to your Pi-hole's blocklist settings (Settings → Blocklists):

Category URL
All Domains https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/all_domains.txt
Advertising https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/advertising.txt
Tracking https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/tracking.txt
Malicious https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/malicious.txt
Suspicious https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/suspicious.txt
Comprehensive https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/comprehensive.txt
NSFW https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/nsfw.txt

After adding your desired lists, click "Save and update" to apply them to your Pi-hole.

Option 2: Manual Download

If you prefer to download the lists manually:

# Download the lists to your Pi-hole
cd /etc/pihole/
sudo wget -O advertising.txt https://media.githubusercontent.com/media/zachlagden/Pi-hole-Optimized-Blocklists/refs/heads/main/lists/advertising.txt
# Download other lists as desired
sudo pihole restartdns reload

📋 The Lists

List Description Domains Raw Link
all_domains.txt Complete collection of all unique domains 6,567,959 Download
advertising.txt Ad networks and services 161,521 Download
tracking.txt Analytics and tracking services 88,539 Download
malicious.txt Malware, phishing, and scams 1,427,665 Download
suspicious.txt Potentially unwanted content 178,086 Download
comprehensive.txt Well-maintained multi-category lists 306,425 Download
nsfw.txt Adult content 4,825,138 Download

Recommendations

  • Balanced Protection: Use the comprehensive.txt list (excellent for most users)
  • Standard Protection: Use the advertising.txt and tracking.txt lists
  • Enhanced Protection: Add the malicious.txt list
  • Complete Protection: Use all_domains.txt (may require more powerful hardware)
  • Parental Controls: Add the nsfw.txt list

📊 Statistics

These lists are compiled from over 45 trusted sources, and the current version includes:

  • 6.7+ million unique domains
  • 47 source blocklists
  • 6 categories
  • ~419,942 duplicate domains removed
  • Last updated: March 30, 2025

🛠️ Usage

Whitelist Recommendations

Some domains may need to be whitelisted to prevent interference with normal services. Common whitelist recommendations:

# Microsoft services
outlook.office365.com
products.office.com
c.s-microsoft.com
i.s-microsoft.com

# Google services
accounts.google.com
clients2.google.com
clients4.google.com

# Apple services
appleid.apple.com
token.safebrowsing.apple

# Other services
gravatar.com
s.shopify.com
api.github.com

Add these to your Pi-hole whitelist if you experience issues.

Performance Impact

  • Pi-hole can easily handle millions of domains on modern hardware (RPi 4+)
  • For older devices (RPi 3 or earlier), consider using only specific category lists instead of all_domains.txt
  • The impact on DNS query performance is minimal after initial loading

🔄 Weekly Updates

These blocklists are automatically updated every Sunday using GitHub Actions. The process:

  1. Downloads the latest blocklists from their original sources
  2. Processes and optimizes them using Pi-hole-Blocklist-Optimizer
  3. Removes duplicates and validates domains
  4. Updates the repository with changes

Latest Update

  • Date: March 30, 2025
  • Processing time: 80.24 seconds
  • Total domains: 6,567,959
  • Duplicates removed: 419,415

❓ FAQ

How often are these lists updated?

These lists are updated weekly, typically on Sunday. Check the last commit date for the most recent update.

Why are some legitimate domains blocked?

Occasionally, legitimate domains may be included in blocklists. If you find a false positive, please:

  1. Add it to your whitelist in Pi-hole
  2. Open an issue with details so it can be reviewed

How do these compare to default Pi-hole lists?

These lists are considerably more comprehensive than the default Pi-hole lists, offering broader protection across multiple categories.

Can I use these with AdGuard Home or similar tools?

Yes, these lists use the standard hosts format (0.0.0.0 domain.com) which is compatible with most DNS-based blocking tools.

Do I need all these lists?

No, you can choose which categories to use based on your needs. For most users, the comprehensive list provides excellent protection without requiring multiple lists.

🙏 Acknowledgements

These lists are compiled from numerous open-source blocklist projects. Full credit goes to the maintainers of these source lists who do the hard work of identifying and categorizing domains.

Created using the Pi-hole Blocklist Optimizer.

📜 License

This repository is released under the Unlicense, placing these lists in the public domain.

About

Ready-to-use, optimized blocklists for Pi-hole, regularly updated and categorized by threat type

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published