Firefox search is resolving to IP instead of hostname
Firefox search is resolving to IP instead of hostname
I have a SearXNG instance running locally, and I have a proxy entry for this (search.home). When I go to https://search.home/ in Firefox, it works as expected and brings me to SearXNG, however if I try adding this as my default search, it instead resolves to the IP and not the hostname, which fails because the IP does not have a cert on it and it tries to hit it with https (as would work with the hostname).
This works in Firefox mobile, and every other web browser I've tried on desktop, just not Firefox for some reason. I've tried various about:config
changes but so far no luck. Anyone else have a workaround for this? It would be nice if Firefox showed you what it actually has saved for the url/hostname/IP of the search engine in the Search section of the Settings, but sadly it just has the name and shortcut listed.
Have you looked at the OpenSearch Description file for your instance? It might be generated with an IP by SearXNG not knowing the hostname. The URL is probably
https://search.home/opensearch.xml
.If you want to examine the search engines in your browser profile, they're stored in a json file compressed with a mozilla specific variant of lz4. The file is
search.json.mozlz4
and can be unpacked to json with lz4json.Thanks! The output of the xml is as follows
It looks like it's set to use
https://192.168.2.20:8080/
for some reason.https://search.home/
will resolve fine but using https with the underlying IP will not.https://docs.searxng.org/admin/settings/settings_server.html says you need to set
base_url
, and that by default it's set to$SEARXNG_URL
.however, https://docs.searxng.org/admin/installation-docker.html#searxng-searxng says that if you are running it under docker the environment variable which controls
base_url
in the config is actuallyBASE_URL
rather thanSEARXNG_URL
.(possibly whichever variable it is is currently empty, which might make it construct a URL based on the IP address it is configured to listen on.)