How do I create my own URL protocol? (e.g. so://...)

Michael Beck picture Michael Beck · Dec 23, 2008 · Viewed 131.9k times · Source

I have seen:

  • http://www...
  • ftp://blah.blah...
  • file://blah.blah...
  • unreal://blah.blah...
  • mailto://blah.blah...

What is that first section where you see http and the like called?

Can I register my own?

Answer

James Gregory picture James Gregory · Dec 23, 2008

The portion with the HTTP://,FTP://, etc are called URI Schemes

You can register your own through the registry.

HKEY_CLASSES_ROOT/
  your-protocol-name/
    (Default)    "URL:your-protocol-name Protocol"
    URL Protocol ""
    shell/
      open/
        command/
          (Default) PathToExecutable

Sources: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml, http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx