The default browser is recorded in the Windows registry mainly under HKEY_CLASSES_ROOT\http\shell\open\command and the matching https key, where the command line that launches your browser is stored. You can inspect it with Registry Editor, but on modern Windows you should change the default browser through Settings rather than by editing those keys, because Windows protects the association with a hash and will reset hand-edited values. The registry key is best used for diagnosis: if it points to a browser you have uninstalled, links open nothing or show a "How do you want to open this?" prompt.

What You'll Need

  • A Windows PC where you can sign in with an administrator account (needed only to write to the registry, not to read it).
  • The browser you want set as default already installed.
  • Registry Editor (regedit.exe), which is built into Windows.
  • A backup of the registry keys before you change anything, so you can restore them.

Menu names in Windows, Registry Editor and browser settings vary slightly between versions, editions and regions, so the exact wording on your screen may differ from the labels below.

Step-by-Step

  1. Install the browser first. Download and install your preferred browser from its official site and let it finish and launch once. A browser that is not installed cannot be the target of the registry key.
  2. Set the default in Windows Settings. Open Settings > Apps > Default apps, find your browser in the list, open it, and set it as the default for HTTP and HTTPS (and for .htm and .html files). On Windows 10 the flow is Settings > Apps > Default apps > Web browser. On Windows 11 you set the browser at the top of Default apps and then confirm the individual file and link types. This is the supported method and the one you should rely on.
  3. Open Registry Editor. Press Windows key + R, type regedit, and press Enter. Approve the administrator prompt.
  4. Navigate to the HTTP association. In the left pane, expand HKEY_CLASSES_ROOT, then http, then shell, then open, and select command. In the right pane, the (Default) value shows the executable path and arguments, for example a path ending in chrome.exe -- "%1" or firefox.exe -osint -url "%1".
  5. Check the HTTPS association. Repeat the same path under HKEY_CLASSES_ROOT\https\shell\open\command. Both should point to the same browser executable. A mismatch is a common cause of links opening the wrong program depending on whether the site uses HTTP or HTTPS.
  6. Read where the executable actually lives. Note the full path in the value. If it names a folder that no longer exists, the browser was uninstalled or moved, and that is why links fail.
  7. Back up before editing. Right-click the http key, choose Export, and save a .reg file. Do the same for https. Keep the exports somewhere you can find them.
  8. If you must correct a broken path, edit the value. Double-click (Default) in the command key, change only the executable path to the correct installed location of the new browser, keep the quotation marks and the "%1" argument exactly as they are, then click OK. Repeat for https.
  9. Fix the file associations too if needed. The HTML file types live under different keys, such as HKEY_CLASSES_ROOT\.html and the htmlfile class, and browsers such as Firefox and Chrome register their own handler classes (for example FirefoxHTML or ChromeHTML). Editing these by hand is easy to get wrong, so prefer Settings > Apps > Default apps for file types.
  10. Confirm the result. Close Registry Editor, then open a link from another application, such as a link in an email or a chat app, and check that the correct browser opens. If Windows still prompts you to choose an app, go back to Default apps and set the association there, which writes the protected values correctly.
  11. Test after a restart. Sign out and back in or restart the PC and test a link again. Windows sometimes reapplies its stored association on sign-in, which is the clearest sign that a manual registry edit was overridden.

Common Mistakes

  • Editing the registry instead of Settings. Modern Windows stores a user-choice hash alongside the association. A hand-edited command line that does not match the expected hash can be ignored or reset, so the change appears to work and then reverts.
  • Editing only http and not https. Many sites are HTTPS only, so the browser appears not to change for most links.
  • Removing the "%1" argument. Without the placeholder, clicking a link opens the browser without the address, or the browser opens blank.
  • Dropping the quotation marks around the executable path. Paths with spaces, such as C:\Program Files\Mozilla Firefox\firefox.exe, then fail to launch.
  • Pointing to a stale uninstall folder. The old browser's folder may still exist as an empty remnant, so the path looks plausible but nothing runs.
  • Editing system-wide keys for one user's problem. The HKEY_CLASSES_ROOT view merges machine and user settings. Prefer per-user changes through Settings so other accounts are unaffected.
  • Forgetting to export first. Without a backup, restoring a wrong value means guessing.

Tips

  • Treat the registry as a read-only diagnostic tool for this job. Read the path, then fix it in Settings.
  • Keep the exports you made named by date so you can roll back quickly.
  • Use HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations only as a reading aid to see what Windows thinks the current user's choices are; editing it is not the supported route.
  • After installing a new browser, let it offer to become default and accept that prompt, which performs the supported registration for you.
  • If you manage many PCs, deploy the default browser choice through your organisation's normal policy tools rather than scripting registry edits per machine.

Troubleshooting

If that did not work: reopen Settings > Apps > Default apps and set the browser again, since that path writes the hash Windows checks. Restart the PC and test a link.

Windows asks which app to use every time. This usually means the association is unset or broken. Set the browser as default in Settings and make sure the "always use this app" option is selected when the prompt appears.

Links still open the old browser. Confirm the old browser is actually uninstalled, then check the http and https command keys again for a stale path. Some apps open links through their own embedded viewer rather than the system default, so test from more than one app.

Registry Editor shows an error when you try to edit. You are likely not running it as administrator, or the key is protected. Close it, reopen with an administrator account, and try again. If it is still refused, restore from your exported backup and use Settings instead.

The browser launches but shows a blank page. Check that "%1" is present at the end of the command value, in quotes.

You want to undo everything. Double-click the .reg files you exported earlier and confirm the merge prompt. This restores the previous values. If you have no backup, reinstall the browser and set it as default in Settings, which rewrites the correct values.

Frequently Asked Questions

Where exactly is the default browser stored in the registry?

Primarily in HKEY_CLASSES_ROOT\http\shell\open\command and the matching https key, with HTML file types in separate keys. The registry view merges machine-wide and per-user settings.

Can I change the default browser by editing the registry?

You can edit the command values, but modern Windows validates the user's choice with a hash and may reset hand edits. Settings > Apps > Default apps is the supported way to change it.

Why does Windows reset the browser I set in the registry?

Because the stored user-choice hash no longer matches the edited command line. Setting the default through Settings rewrites both the command and the hash together.

Do I need administrator rights to view the key?

Reading is generally possible for a standard user, but writing to HKEY_CLASSES_ROOT requires administrator rights, which is another reason to use Settings.

Does this work the same on Windows 10 and Windows 11?

The keys are the same, but the Settings screen differs. Windows 10 sets the default browser in one place; Windows 11 asks you to set per-link and per-file-type defaults for the chosen browser.

What happens if the key points to a deleted browser?

Links either do nothing or trigger Windows' "How do you want to open this?" prompt until you set a valid default browser.