Restoring default Pi-hole adlist(s)

Pi-hole ships with optional adlist(s) (publicly maintained block lists), which you can enable if you choose. If you find that you need to restore the default list(s), they are as follows - current as of the V5.2 release and a pending change to remove a discontinued list.

https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

To restore these lists to your Pi-hole, you have several options:

Pi-hole V4:

  1. From the web Admin GUI > Settings > Blocklists you can paste any of the URL's above (or all at once) into the box provided, then hit Save (or Save and Update when you are done entering URLs) and gravity will be updated.

or

  1. Edit file /etc/pihole/adlists.list and enter the lists desired. Save, exit and rebuild gravity with pihole -g.

Pi-Hole V5:

  1. From the web Admin GUI > Group Management > Adlists, paste any of the URL's above (or all at once) into the Address: window, and hit Add. After you are done adding, to update gravity use either the pihole -g command from the command line, or Admin GUI > Tools > Update Gravity.

or

  1. You can manually add the URLs to the database with SQL commands - see this section of the documentation:

    Examples - Pi-hole documentation

There is an additional option to restore the defaults, but this will remove any existing lists you have installed, so do this only if you have no other lists installed.

Run pihole -r and select reconfigure, then select the desired lists when presented with the option.

-------------------------------------------------------------------------------------------------------------------------------

For additional reference, the default lists are contained in the Pi-hole installer script, and the code is here:

5 Likes

There used to be 4 or 5 adlists by default. Are the other ones no longer needed?

Correct. They are either no longer available or no longer supported, thus they were dropped from our installer.

2 posts were merged into an existing topic: Merits of using a consolidated blocklist

2 posts were split to a new topic: Merits of using a consolidated blocklist

Is there a tool to auto-load the lists the way V4 used to work? It's pretty annoying to have to manually copy these in to the web interface if I have to re-setup my pi for any reason

Copy and paste the lot of them at once.

https://mirror1.malwaredomains.com/files/justdomains

In the meantime this list is offline

Which is why we removed it from our default lists.

May be off topic, but I used to backup the adlist files as part of a script. Since these files aren't being used any more, anybody got a good reference for where this info is stored now? Is it good enough to save the gravity.db file? Or do I need to extract all of this from the gravity database now and use that for restoring?

The database contains all URLs of the adlists, the downloaded domains + everything of the group management. If you're just interested in the adlist URLs it would be overkill to save the whole database. You can export the adlist information via SQL.