From eb61c1bae2ffad114e17393d91d86fb00d7ac8cd Mon Sep 17 00:00:00 2001 From: Hannah Isopod Date: Sat, 10 May 2025 03:03:58 -0600 Subject: Initialer commit Just remade the repo because I don't *need* need a comprehensive source history for my personal website and this is easier than getting filter-repo to work good --- .../posts/guide_blacklist_websites_searxng/index.md | 21 +++++++++++++++++++++ .../guide_blacklist_websites_searxng/index.php | 1 + .../guide_blacklist_websites_searxng/searxng.svg | 19 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 blog/posts/guide_blacklist_websites_searxng/index.md create mode 100644 blog/posts/guide_blacklist_websites_searxng/index.php create mode 100644 blog/posts/guide_blacklist_websites_searxng/searxng.svg (limited to 'blog/posts/guide_blacklist_websites_searxng') diff --git a/blog/posts/guide_blacklist_websites_searxng/index.md b/blog/posts/guide_blacklist_websites_searxng/index.md new file mode 100644 index 0000000..3aab326 --- /dev/null +++ b/blog/posts/guide_blacklist_websites_searxng/index.md @@ -0,0 +1,21 @@ +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](https://github.com/searxng/searxng/discussions/970) 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 +``` \ No newline at end of file diff --git a/blog/posts/guide_blacklist_websites_searxng/index.php b/blog/posts/guide_blacklist_websites_searxng/index.php new file mode 100644 index 0000000..f572f79 --- /dev/null +++ b/blog/posts/guide_blacklist_websites_searxng/index.php @@ -0,0 +1 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3