1
0
Fork 0
isopod.cool/blog/posts/guide_blacklist_websites_searxng/index.md
will 65a3e92d28 - Restructured blog
- Most blog posts are now written and stored as markdown
 - Markdown parsing and dynamic rendering for blog posts has been moved to a single file
 - Title for blog posts is now pulled from atom feed, just like dates
 - Changed code block styling and slightly altered content of some posts for compatibility with markdown parsing
 - Removed some old blog posts I'm no longer proud of
- Added link to deeptwisty.com to navbar on /
2024-09-10 04:42:07 -06:00

1.2 KiB

Quick one today. I got sick of searching for programming questions and seeing AI-generated scraped-from-stackoverflow click farm trash polluting the results, and I happen to use a personal SearXNG instance that no client-side blacklist extension on the planet is gonna support, so I went looking to see if I could blacklist them in SearXNG for like the eighth time and finally found a way using the hostname replace plugin. So here's that, because I didn't find this feature documented officially anywhere bar an issue on the Github repo.

How to do it

First, open up your instance's config file. If you installed it directly like I did, that'll probably be /etc/searxng/settings.yml. If you used Docker, god help you. Anyway, find the enabled_plugins: section and uncomment the entry for 'Hostname replace', then uncomment the line hostname_replace: just below it. Under there you'll put your blocks:

/etc/searxng/settings.yml

enabled_plugins:
  - 'Hostname replace'
hostname_replace:
  '(.*\.)?codegrepper\.com': false
  '(.*\.)?geeksforgeeks\.org': false

Then restart SearXNG:

service uwsgi restart searxng