How do I import a large list of blacklisted domains?

I tried using the importer in the teleporter to upload a blacklist of websites.

I put 2.6 million websites into this format:

[{"id":2101255,"type":1,"domain":"website1.com","enabled":1,"date_added":1592921510,"date_modified":1592921510,"comment":""},
{"id":2101256,"type":1,"domain":"website2.com","enabled":1,"date_added":1592921510,"date_modified":1592921510,"comment":""},
{"id":2101257,"type":1,"domain":"website3.com","enabled":1,"date_added":1592921510,"date_modified":1592921510,"comment":""},
{"id":2101258,"type":1,"domain":"website4.com","enabled":1,"date_added":1592921510,"date_modified":1592921510,"comment":""}]

I incremented the IDs from 5 all the way up to 2 million and gave them all the same value for date added and date modified. I called the file blacklist.exact.json and turned it into a tar ball with this code tar -cvzf backup.tar.gz blacklist.exact.json.

Unfortunately, the teleporter didn't work for me. I went to teleporter import and then deselected every option except for blacklist (exact) and deselected clear existing data and found the tarball.

I got back two options, depending on the size:

Empty token! Check if cookies are enabled on your system. pi hole
The file you are trying to upload is not a .tar.gz file (filename: backup.tar.gz, type: ). Please try again.

I cleared my cookies and tried with multiple browsers. I tried with progressively smaller files and went all the way down to 50,000 and it still did not work.

Why do you try to import with teleporter at all?

Just make a list with the domains (each on a separate line) and save it on your device. You can add this file as an adlist by setting the path to

file:///home/pi/my_personal_adlist.txt

Do I store this on the pi hole or on my local machine?

On the device hosting pihole.

Awesome! Can I remove all the domains in the "blacklist"?

Yes because they are contained in the overall gravity database anyway when you add them as an adlist. No need to have them as duplictate.

Cave: If you add them as proposed all together as an adlist you loose the ability to assign each domain individually to individual clients. You can still decide to assign the whole adlist to individual clients of course.

1 Like

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