The docs are out of date and haven't been updated since 2019. There is this related question but I'm asking a new one because it doesn't answer my specific question.

I'd like to add a list of websites as a custom blacklist. I'm intending on uploading the list to github so that I have a publically accessible link.

I'm going to upload it as a text file and I want to know the formatting rules for it to work with pi hole.

Two questions:

  1. Is it simply a list of domains with a new domain on each line?

  2. Or, do I add or :: before each domain name

If it's the first option, then do I need to do special formatting with the domains? eg, do I need to remove www. or https://?

  • Have you tried on their Discourse forum at discourse.pi-hole.net ? Pi-hole(despite its name) is not Pi specific and you may do better there than here. It will be worth including the version you are using as v5 is significantly different internally than v4 and some things need database tables to be modified at the moment! I’ve not yet tried the import routines on v5 but noted the process in my answer.
    – user115418
    Jun 23 '20 at 13:33

With the introduction of v5 lots of things have changed as the developers have moved from flat files to using a database and not all things have a gui or command line process yet.

As such I would:

  1. Log into your pi-hole admin console
  2. Add a single black list entry
  3. Go to Settings / Teleporter and export all files
  4. Unzip the files and look at the blacklist entrIt’s
  5. Create the file with your entries in the same format
  6. Zip it back up (as the only only file in the archive)
  7. Import it using Teleporter

Note in v4 the whitelist / blacklist files where separated into two:

  • exact match entries
  • regex/wildcard entries

Looking at v5 this is still the same.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.