You can set your default browser through the registry, but on current versions of Windows the reliable way is to let Windows itself write the association rather than hand-editing it. The registry keys that control default apps are protected by a hash (UserChoice), so a manually typed value is usually rejected and Windows reverts to asking you which app to use. The practical answer: use Settings > Apps > Default apps to make the change, and use the registry only to inspect, back up, or repair what Windows has already written. This guide covers both, plus what to do when the setting refuses to stick.
What You'll Need
- A Windows PC where you can sign in with an account that has administrator rights (needed for some repair steps, not for the normal Settings route).
- The browser you want to set as default already installed and launched at least once, so it has registered itself with Windows.
- Patience with the confirmation prompt: Windows asks you to confirm the default app choice, and skipping that prompt leaves the old default in place.
- Optional but recommended before any registry edit: a registry backup (File > Export in Registry Editor) or a restore point, so you can undo a mistake.
Step-by-Step
- Install and open the browser once. A browser that has never run may not appear in the list of choices. Launch it, close it, and continue.
- Open Default apps. Go to Settings > Apps > Default apps. Menu labels vary slightly by Windows version, device and region, so if you do not see "Default apps" exactly, look under Settings > Apps for the entry that lists your installed apps and their defaults.
- Find your browser. On Windows 11 the page lists installed browsers near the top; click the one you want. On Windows 10, scroll to "Web browser" and click the current default to change it.
- Set it as the default. Choose "Set default" (Windows 11) or pick your browser from the list (Windows 10). Windows may show a confirmation dialog; accept it. This is the step that writes the protected registry entries for you.
- Check the file associations too. A browser is not only the "web browser" default. On Windows 11, open the browser's entry in Default apps and set the file and link types you care about, such as .html, .htm, http and https, to that browser. Otherwise double-clicking a saved web page may still open the old one.
- Verify in the registry (optional). Press Windows key + R, type regedit, and press Enter. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice. The ProgId value should name your browser's identifier (for example ChromeHTML or FirefoxURL). The Hash value is generated by Windows; do not edit it.
- Back up before changing anything by hand. In Registry Editor, select the key you plan to touch, then File > Export, and save the .reg file somewhere you will find it. If a manual edit goes wrong, double-click that file to restore the previous state.
- Restart Explorer if the change does not show. Sign out and back in, or restart the PC. Windows caches default-app choices, and a stale cache is the most common reason a correct setting appears not to work.
Common Mistakes
- Typing a UserChoice value by hand. Windows validates that key with a hash tied to your user account. A hand-typed ProgId without a matching hash is treated as tampering, and Windows resets the choice or prompts you again. Always let Settings write it.
- Deleting the UserChoice key and expecting a clean slate. Deleting it can leave Windows unable to open links at all until the association is rebuilt. Export a backup first, and prefer resetting through Settings.
- Changing only the browser default and forgetting file types. The http/https links and .html files are separate associations; set both if you want saved pages to open in the new browser.
- Editing HKEY_LOCAL_MACHINE when the setting is per-user. Default app choices live under HKEY_CURRENT_USER for the signed-in account. Machine-wide edits will not change what that user sees.
- Ignoring the confirmation prompt. If you dismiss the "How do you want to open this?" dialog without choosing "Always", the old default stays.
Tips
- Export the relevant UserChoice keys for http, https, .html and .htm before a Windows feature update. Updates occasionally reset defaults, and the exports make restoring them quick.
- If a browser keeps reclaiming the default on launch, check that browser's own settings for an option about checking whether it is the default; turning that prompt off stops the nagging but does not change the Windows setting.
- Use Settings as the source of truth. Treat the registry as a read-only diagnostic unless you are restoring a backup you made yourself.
- On a shared PC, remember the default is per user account. Changing it while signed in as one person does not affect the others.
Troubleshooting
The setting will not stick. Sign out and back in, then set it again. If it still reverts, check whether a third-party security or "system tune-up" tool is locking file associations; those tools sometimes enforce a default. Disable that feature in the tool rather than fighting the registry.
Links open in the wrong browser only from certain apps. Some apps open links through their own embedded browser rather than the system default. That is the app's behaviour, not a registry fault, and it usually cannot be changed from Windows.
Windows says "An app default was reset". This notification means something changed the association outside the supported route. Set the default again through Settings, and if it recurs, review recently installed software.
You edited the registry and now links do nothing. Restore the .reg backup you exported, then sign out and back in. If you have no backup, set the default again through Settings; that rebuilds the key correctly.
If that did not work, create a new local administrator account as a test. If defaults behave correctly there, the problem is specific to your user profile rather than Windows itself.
Frequently Asked Questions
Can I set the default browser purely through the registry?
Not reliably. The UserChoice key is hash-protected, so a value you write by hand is normally rejected. Use Settings to make the change and the registry to inspect or restore it.
Where is the default browser stored in the registry?
Under HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations, in the UserChoice subkeys for http and https.
Why does Windows keep asking me which browser to use?
Usually because the previous choice was never confirmed with "Always", or because the association was reset by an update or another program. Set it again in Default apps and accept the prompt.
Does changing the default browser affect other user accounts?
No. Default app choices are stored per user, so each account on the PC keeps its own.
Is it safe to delete the UserChoice key?
It is risky. Deleting it can leave links unopenable until the association is rebuilt. Export a backup first and prefer resetting through Settings.