diff --git a/base/app/init.d/10-novnc.sh b/base/app/init.d/10-novnc.sh
index bcae756..7a07026 100755
--- a/base/app/init.d/10-novnc.sh
+++ b/base/app/init.d/10-novnc.sh
@@ -19,6 +19,13 @@ sed -i "/UI.initSetting\|shared/ s/shared', .*);/shared', ${_MYVNC_VNCSHARING});
# NoVNC custom title
sed -i "/
noVNC<\/title>/ s/noVNC/${MYVNC_CUSTOM_TITLE:-noVNC}/g" /usr/share/novnc/*.html
+# Include domain details for websocket
+if [ ${MYVNC_DOMAIN} ]
+then
+ sed -i "/UI.initSetting\|host/ s/host', '');/host', '${MYVNC_DOMAIN}');/" /usr/share/novnc/app/ui.js
+ sed -i "/UI.initSetting\|port/ s/port', 0);/port', 443);/" /usr/share/novnc/app/ui.js
+fi
+
# Apply subpath to websocket
if [[ ${MYVNC_PROXYPATH} == "/" ]]
then