To set the default browser via Group Policy Object (GPO), you must create an XML association file that defines the browser as the handler for HTTP and HTTPS protocols and then deploy that file via a GPO setting called "Set a default associations configuration file." This method prevents users from accidentally changing the browser and ensures a consistent environment across all workstations in an Active Directory domain.

What You'll Need

  • A Windows Server machine with the Group Policy Management Console (GPMC) installed.
  • Administrative privileges on the domain controller.
  • A target Organizational Unit (OU) containing the computers where the browser change will be applied.
  • A shared network folder (UNC path) where the XML association file is stored and accessible by all target computers (Read permissions for "Authenticated Users" or "Domain Computers").
  • A reference computer running the desired browser to export the initial association file.

Step-by-Step

  1. Generate the Association XML File: You cannot simply type an XML file from scratch easily because Windows requires specific hash values for applications. On a reference computer that already has your desired browser set as the default, open the Command Prompt as an Administrator. Type the following command: Dism /Online /Export-DefaultAppAssociations:%USERPROFILE%\Desktop\AppAssoc.xml. This exports all current default app associations to your desktop.
  2. Clean the XML File: Open the AppAssoc.xml file using a text editor like Notepad. To avoid overriding every single default app (like photo viewers or music players), delete all lines except those related to the browser. Look for and keep only the entries for http, https, .html, .htm, and .shtml. Save the file.
  3. Store the File on a Network Share: Move the cleaned AppAssoc.xml file to a network share that is reachable by all client machines. For example, \\ServerName\Deploy\AppAssoc.xml. Ensure that the "Domain Computers" group has Read access to this folder and file, as the policy is applied at the system level during login.
  4. Create the GPO: Open the Group Policy Management Console (GPMC). Right-click the target Organizational Unit (OU) and select "Create a GPO in this domain, and Link it here..." Name the GPO something clear, such as "Default Browser Configuration."
  5. Configure the Policy Path: Right-click the new GPO and select "Edit." In the Group Policy Management Editor, navigate to Computer Configuration > Administrative Templates > Windows Components > File Explorer. (Note: Labels may differ slightly depending on your version of Windows Server).
  6. Enable the Association Setting: In the right pane, find the setting named "Set a default associations configuration file." Double-click it to open the properties window. Select "Enabled."
  7. Link the XML File: In the "Options" box, enter the full UNC path to your XML file (e.g., \\ServerName\Deploy\AppAssoc.xml). Click "Apply" and then "OK."
  8. Force Policy Update: To test the deployment immediately on a client machine, open the Command Prompt and run gpupdate /force. Log out and log back in to see the changes take effect.

Common Mistakes

One of the most frequent errors is placing the XML file in a location that the computer account cannot access. Because this is a Computer Configuration policy, the machine itself—not just the user—needs to be able to read the file before the user profile fully loads. If you put the file in a user's private folder, the GPO will fail silently.

Another common mistake is failing to clean the XML file. If you export the entire association list from a reference machine, you may inadvertently force every user in the company to use a specific calculator, photo viewer, or mail client that was installed on that one reference machine, leading to widespread confusion and help desk tickets.

Some administrators attempt to use Registry keys to force the default browser. While this worked in older versions of Windows, modern versions of Windows 10 and 11 use a "User Choice" hash in the registry to prevent "browser hijacking." If you try to change the registry key manually via GPO without the XML method, Windows will detect the change as unauthorized and reset the browser to Microsoft Edge automatically.

Tips

To ensure a seamless transition, always test the GPO on a small test OU containing only one or two machines before applying it to the entire organization. This allows you to verify that the UNC path is correct and that the browser launches as expected without impacting production users.

If you are deploying a browser that is not yet installed on all machines, ensure that the software deployment (via MSI or other tools) happens before or at the same time as the GPO. If the XML file tells Windows to use a browser that isn't installed, the system will revert to the system default (usually Edge).

Keep a backup of your original AppAssoc.xml before cleaning it. If you realize later that you also need to standardize the default PDF viewer (which is often tied to the browser), you will have the original list of associations ready to be added back into the deployment file.

Troubleshooting

If the browser does not change after a reboot and gpupdate /force, first check the Event Viewer on the client machine. Navigate to Windows Logs > System and look for errors related to Group Policy. If you see an "Access Denied" error regarding the XML file, your network share permissions are incorrect. Ensure "Domain Computers" has Read access.

Next, verify the path in the GPO. A single typo in the UNC path will cause the policy to fail. Copy the path directly from the Windows File Explorer address bar and paste it into the GPO setting to avoid manual typing errors.

If the policy is applying but the browser is still not the default, check if there is a conflicting GPO. Use the command gpresult /r in the Command Prompt to see which policies are winning. If another GPO is setting different associations, the one with the highest precedence (the one linked closest to the user/computer object) will win.

Finally, ensure the browser is actually installed in the expected directory. If the browser was installed in a non-standard path on the reference machine but is installed in a different path on the client machines, the association may fail because the XML file points to a specific executable path.

Frequently Asked Questions

Can users change the browser back after this GPO is applied?

Yes, by default, this GPO sets the association upon login. However, if the user manually changes the default browser in Windows Settings, the change will persist until the next time the Group Policy refreshes or the user logs in again, depending on the OS version. To make it permanent, you would need additional restrictions on the Settings app.

Does this work for both Windows 10 and Windows 11?

Yes, the XML association method is the official supported way to handle default applications for both Windows 10 and Windows 11 across all Pro and Enterprise editions.

Do I need to install the browser on the Domain Controller?

No, the browser only needs to be installed on the client workstations. The Domain Controller only hosts the GPO and the XML file; it does not need to run the software it is directing clients to use.

What happens if the XML file is deleted from the server?

Existing clients who have already had the policy applied will keep their current settings. However, new computers joining the domain or computers that refresh their policy will fail to apply the setting and will revert to the Windows default browser.

Can I use this to set the default PDF viewer as well?

Yes. When cleaning your XML file, simply leave the entries for .pdf in addition to the HTTP and HTTPS entries. This allows you to standardize both the web browser and the PDF handler in one single GPO.