The 30-Second Fix: Check Your Search Settings
I know this error is infuriating. You set DuckDuckGo or Startpage as your default, restart Firefox, and boom—it's Google again. Before you scream at your monitor, let's rule out the simplest culprit: a hidden setting that lets Firefox override your choice.
Open Firefox and type about:preferences#search in the address bar. Scroll down to Search Settings. Look for a checkbox that says "Use this search engine by default" or similar—it's usually checked. Uncheck it. But the real fix here is the "Search Engine" dropdown at the top. Make sure it's set to your preferred engine.
If that doesn't hold, here's the sneaky part: Firefox sometimes resets this setting when it updates. So even if you set it now, the next update could wipe it. That's why the moderate fix below is the one I actually trust.
The 5-Minute Fix: Delete the Search Configuration File
Firefox stores your search engine preferences in a file called search.json.mozlz4. When this file gets corrupted—which happens more than you'd think, especially after crashes or forced shutdowns—Firefox falls back to its default engine. Deleting it forces Firefox to rebuild it from scratch, and your preference sticks.
Here's how:
- Close Firefox completely. Make sure it's not running in the background—check your task manager (Ctrl+Shift+Esc) or Activity Monitor.
- Open your Firefox profile folder. The fastest way: press
Win+R(Windows) orCmd+Shift+G(Mac), then paste this:
Wait, that doesn't work from the run dialog. Instead, in Firefox, go toabout:supportabout:support, look for Profile Folder, and click Open Folder. Or just search your system forsearch.json.mozlz4. - Once you're in the profile folder, delete
search.json.mozlz4. - Restart Firefox. It'll create a fresh file, and you can set your preferred engine in Settings.
This fixed it for me the first time I encountered this bug on Firefox 115. But if it comes back, you've got a more stubborn problem—time for the advanced fix.
The 15+ Minute Fix: Hunt Down Extensions and Enterprise Policies
If the reset keeps happening after the file delete, something is actively rewriting that file. Two usual suspects: a malicious extension or a corporate policy. Let's eliminate both.
Step 1: Kill the Rogue Extension
Some extensions—especially "search enhancers" or toolbar add-ons—silently force a search engine. Even ones you installed legitimately can do this after an update. To test:
- Open
about:addons. - Disable all extensions (not just the obvious ones).
- Restart Firefox and set your default search engine.
- Restart again. If the search engine holds, re-enable extensions one by one until you find the culprit. When you do, remove it permanently.
I've seen this with old versions of Skype Click to Call and some shopping helper add-ons. Don't trust an extension just because it's popular.
Step 2: Check for Enterprise Policies
If you're on a work computer, your IT department may have deployed a policy that locks the search engine. Firefox respects these policies, and they override your user settings. To check:
- Type
about:policiesin the address bar. - Look for any policy named
SearchEnginesorDefaultSearchProvider. If you see one, that's your culprit. You can't change it from inside Firefox—you need to contact your IT admin.
If you're not on a work machine, but you're still seeing policies, something else is messing with your Firefox installation. That's rare, but a full reinstall fixes it.
Step 3: The Nuclear Option (Reinstall Firefox)
Before you do this, back up your bookmarks and passwords. Use Firefox Sync or export them manually. Then uninstall Firefox completely, remove the leftover profile folders, and reinstall the latest version. This is a last resort, but it's the only thing that clears corrupted preferences files that don't get removed by a standard uninstall.
I know this is a pain, but honestly, the file deletion fix solves 80% of these cases. The other 20% are almost always extensions. Try those first before you nuke everything.
Why This Happens in the First Place
Firefox's search engine setting lives in prefs.js, but the actual engine list is stored in that search.json.mozlz4 file. When Firefox updates, it sometimes rewrites that file, and if the write fails partway, you get a reset. Also, if you use any "reset" tool or system cleaner like CCleaner, it can wipe the file and force a default.
My honest take: Firefox has been shaky with search engine persistence for years, especially on Windows. It's not you. But with these fixes, you can make it behave.
Pro tip: After you get your search engine set, export your profile via
about:profilesand keep a backup. That way, if the reset happens again, you can restore the backup instead of redoing the whole process.
If none of this works, you might have a deeper system issue—malware can also hijack Firefox search settings. Run a scan with Malwarebytes or Windows Defender offline. But I'd bet the file deletion or extension hunt does the trick.