Skip to navigation
Filter the Search Result by domains
17.08.26
Filter the Search Result by domains SearXNG has a built-in **filter plugin system** that allows you to block/skip certain domains from search results. ## Domain Filtering in SearXNG The feature you want is the **`hostnames` plugin** in the configuration. Here's how to use it: ### Configuration Method Edit your `searx/settings.yml` file and add a `hostnames` section. Based on the settings file, here's the structure: ```yaml plugins: searx.plugins.hostnames.SXNGPlugin: active: true # Configuration of the "Hostnames plugin": hostnames: remove: - '(.*\.)?facebook.com$' - '(.*\.)?instagram.com$' - '(.*\.)?tiktok.com$' replace: '(.*\.)?youtube\.com$': 'yt.example.com' '(.*\.)?reddit\.com$': 'teddit.example.com' low_priority: - '(.*\.)?google(\..*)?$' high_priority: - '(.*\.)?wikipedia.org$' ``` ### Options Explained - **`remove`** - Completely skip/block these domains from results - **`replace`** - Redirect these domains to alternative instances (e.g., YouTube to Invidious) - **`low_priority`** - Deprioritize these domains in results ranking - **`high_priority`** - Prioritize these domains higher in results ### Using External Configuration File For better organization, you can also use a separate YAML file: ```yaml hostnames: remove: 'blocked-hosts.yml' ``` Then create `blocked-hosts.yml` in the same directory: ```yaml - '(.*\.)?facebook.com$' - '(.*\.)?instagram.com$' - '(.*\.)?linkedin.com$' - '(.*\.)?tiktok.com$' ``` ### Regex Pattern Examples - `facebook.com` - exact domain only - `(.*\.)?facebook.com$` - facebook.com and all subdomains - `(.*\.)?youtube\.com$|youtu\.be$` - YouTube and youtu.be The plugin is **already enabled by default** in the settings.yml, so you just need to add your domain filtering rules! Would you like help setting up specific domains to block or redirect?
https://github.com/veto8/searxng
Reply
Anonymous
Information Epoch 1787652552
Distrust all claims for one true way.
Home
Notebook
Contact us