Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The Navigator method registerProtocolHandler() lets web sites register themselves as possible handlers for particular protocols.

Browsers generally only permit protocol handlers to register handlers if the handler's domain and protocol match that of the current site. Additionally, browsers increasingly require that the registerProtocolHandler() function be used in a secure context (that is, on a page loaded using HTTPS).

Browsers may offer the ability to override these restrictions.


navigator.registerProtocolHandler(protocol, url, title);


The protocol the site wishes to handle, specified as a string. For example, you can register to handle SMS text message links by registering to handle the "sms" scheme.
The URL of the handler, as a string. This string should include "%s" as a placeholder which will be replaced with the escaped URL of the document to be handled. This URL might be a true URL, or it could be a phone number, email address, or so forth.
Note: The handler's URL must use one of "http" or "https" as its scheme. This should be an HTTPS URL, as some browsers may require this for security.
A user-readable title string for the protocol handler. This will be displayed to the user in interface objects as needed.


The user agent blocked registration of the protocol handler. This might happen if an invalid scheme is specified, such as "http", which cannot be registered for obvious security reasons, or if the browser requires that this function be called from a secure context, or that the handler's URL be an HTTPS one.
The "%s" string is missing from the specified protocol handler URL.

Permitted schemes

For security reasons, registerProtocolHandler() has restrictions on which schemes may be registered. A custom scheme may be registered as long as the scheme's name begins with "web+", is at least five characters long (including the "web+" prefix), and has only lower-case ASCII letters in its name. For example, "web+burger", as shown in the Example below.

Otherwise, the scheme must be one of the schemes on the whitelist below:

  • bitcoin
  • geo
  • im
  • irc
  • ircs
  • magnet
  • mailto
  • mms
  • news
  • nntp
  • sip
  • sms
  • smsto
  • ssh
  • tel
  • urn
  • webcal
  • wtai
  • xmpp


If your web application is located at, you can register a protocol handler for it to handle "web+burger" links like this:

                                  "Burger handler");

This creates a handler that allows web+burger:// links to direct the user to your web application, inserting the burger information specified in the link into the URL. Recall that this script must be run from the same domain (so any page location at and the second argument passed must be of http or https scheme (in this example it is https) .

The user will be notified that your code has asked to register the protocol handler, so that they can decide whether or not to permit it. See the screenshot below for an example on


Specification Status Comment
HTML Living Standard
The definition of 'registerProtocolHandler()' in that specification.
Living Standard Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
registerProtocolHandlerChrome Full support 13
Full support 13
Notes Protocol whitelist includes mailto, mms, nntp, rtsp, and webcal. Custom protocols must be prefixed with web+.
Edge ? Firefox Full support 3IE ? Opera Full support 11.6Safari ? WebView Android No support NoChrome Android Full support YesEdge Mobile ? Firefox Android Full support 4Opera Android ? Safari iOS No support NoSamsung Internet Android ?
Secure context requiredChrome ? Edge ? Firefox Full support 62IE ? Opera ? Safari ? WebView Android No support NoChrome Android ? Edge Mobile ? Firefox Android Full support 62Opera Android ? Safari iOS No support NoSamsung Internet Android ?


Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also