diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 ## Changelog for the `threepenny-gui` package
 
+**0.9.1.0** – Maintenance and snapshot release
+
+* Add support for websockets over SSL.
+* Bump dependencies for compatibility with GHC 9.0.
+
 **0.9.0.0** – Maintenance and snapshot release
 
 * The events `contextmenu`, `mousedown`, `mousemove` and `mouseup` now return
diff --git a/js/comm.js b/js/comm.js
--- a/js/comm.js
+++ b/js/comm.js
@@ -15,7 +15,10 @@
 Haskell.createWebSocket = function (url0, receive) {
   var that = {};
   var optReloadOnDisconnect = false;
-  var url  = 'ws:' + url0.slice(5) + '/websocket/';
+  var url  = new URL(url0);
+  if (url.protocol === 'http:')  { url.protocol = 'ws:'  }
+  if (url.protocol === 'https:') { url.protocol = 'wss:' }
+  url.href = url.href + 'websocket/';
   var ws   = new WebSocket(url);
   
   // Close WebSocket when the browser window is closed.
diff --git a/threepenny-gui.cabal b/threepenny-gui.cabal
--- a/threepenny-gui.cabal
+++ b/threepenny-gui.cabal
@@ -1,5 +1,5 @@
 Name:                threepenny-gui
-Version:             0.9.0.0
+Version:             0.9.1.0
 Synopsis:            GUI framework that uses the web browser as a display.
 Description:
     Threepenny-GUI is a GUI framework that uses the web browser as a display.
@@ -109,10 +109,10 @@
   if flag(rebug)
       cpp-options:  -DREBUG
       ghc-options:  -O2
-  build-depends:     base                   >= 4.8   && < 4.15
+  build-depends:     base                   >= 4.8   && < 4.16
                     ,aeson                  (>= 0.7 && < 0.10) || == 0.11.* || (>= 1.0 && < 1.6)
                     ,async                  >= 2.0   && < 2.3
-                    ,bytestring             >= 0.9.2 && < 0.11
+                    ,bytestring             >= 0.9.2 && < 0.12
                     ,containers             >= 0.4.2 && < 0.7
                     ,data-default           >= 0.5.0 && < 0.8
                     ,deepseq                >= 1.3.0 && < 1.5
@@ -124,7 +124,7 @@
                     ,snap-server            >= 0.9.0 && < 1.2
                     ,snap-core              >= 0.9.0 && < 1.1
                     ,stm                    >= 2.2    && < 2.6
-                    ,template-haskell       >= 2.7.0  && < 2.17
+                    ,template-haskell       >= 2.7.0  && < 2.18
                     ,text                   >= 0.11   && < 1.3
                     ,transformers           >= 0.3.0  && < 0.6
                     ,unordered-containers   == 0.2.*
