Enabling Protocol Handlers for Sites in Chrome (Windows)
Custom protocol handlers in web browsers allow websites to handle specific protocols and perform custom actions. For instance, a web application can use a custom protocol to open a specific program or perform a particular function. This article will walk you through enabling protocol handlers for sites in Google Chrome on Windows.
Registering a Custom Protocol Handler
Before enabling a custom protocol handler for a site, it must be registered on your system. This process involves creating a registry entry that associates the protocol with an application. This section will demonstrate how to register a custom protocol handler using the microsoft-edge: protocol and the Microsoft Edge browser as an example.
To register a custom protocol handler, follow these steps:
- Press Win + R and type
regeditto open the Registry Editor. - Navigate to
HKEY\_CLASSES\_ROOTin the Registry Editor. - Create a new key for your custom protocol. In this case, create a key called
microsoft-edge. - Create a new string value within the key named
URL Protocoland set its value to. - Create a new key under the
microsoft-edgekey namedshell. - Create a new key under the
shellkey namedopen. - Create a new key under the
openkey namedcommand. - Set the default value of the
commandkey to the path of the application you want to handle the protocol, including the%1argument placeholder. In this case, something like"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" %1.
Enabling Protocol Handlers for Sites in Chrome
Once a custom protocol handler is registered, you can enable it for specific sites in Google Chrome:
- Open Google Chrome and navigate to
chrome://settings/handlers. - Find the protocol you want to enable and click on the corresponding
Managebutton. - Enter the site URL that will be granted permission to handle the protocol and click
Add. - The site is now permitted to handle the custom protocol.
In our example, prependingmicrosoft-edge:to a URL in the Chrome address bar will prompt a popup asking, "Open Microsoft Edge?".
- Registering a custom protocol handler involves creating a registry entry associating a protocol with an application.
- Enabling protocol handlers for sites in Chrome involves navigating to the Chrome settings page for protocol handlers, adding the desired site URL, and granting it permission to handle the protocol.