diff --git a/lib/scalra.js b/lib/scalra.js
index <HASH>..<HASH> 100644
--- a/lib/scalra.js
+++ b/lib/scalra.js
@@ -36,11 +36,12 @@ addScriptJs("/web/config.js");
 
 // perform action only after page is loaded
 document.addEventListener ("DOMContentLoaded", function () {
-		
+	console.log('document.location:');
+	console.log(document.location);
 	var onConnected = (typeof onConnect === 'function' ? onConnect : function () {console.log('server connected'); });
 	var onSocketEvent = (typeof onSocketEvent === 'function' ? onSocketEvent : undefined);
 	var type = (typeof connectType === 'string' ? connectType : 'http');
-	var host = (typeof connectHost === 'string' ? connectHost : document.location.host);
+	var host = (typeof connectHost === 'string' ? connectHost : document.location.hostname);
 	
 	console.log('connectType: ' + type);
 	console.log('connectHost: ' + host);
fix: host determination in /lib/scalra.js