diff --git a/public/index.html b/public/index.html
index d7ba800..e7932d2 100644
--- a/public/index.html
+++ b/public/index.html
@@ -72,7 +72,7 @@
document.getElementById("msgBox").value = "";
});
- const ws = new WebSocket("ws://" + window.location.host);
+ const ws = new WebSocket("ws" + (window.location.protocol === "https:" ? "s" : "") + "://" + window.location.host);
ws.addEventListener("message", ({ data: msg }) => {
console.log(msg);