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:

7 Likes

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.

2 posts were split to a new topic: Ad lists storage location in database