diff --git a/files/etc/nginx/hedgedocs-nginx.conf.j2 b/files/etc/nginx/hedgedocs-nginx.conf.j2
index e0556b7061c915a0baa30bb0d4890063124166f5..c34498daee1646da9325d84c221aa69a7fb5a6d7 100644
--- a/files/etc/nginx/hedgedocs-nginx.conf.j2
+++ b/files/etc/nginx/hedgedocs-nginx.conf.j2
@@ -3,7 +3,7 @@ map $http_upgrade $connection_upgrade {
         ''      close;
 }
 server {
-        server_name {{ service_hedgedocs_domain.split("https://")[0] | lower  }};
+        server_name {{ service_hedgedocs_domain.split("//")[0] | lower  }};
 
         location / {
                 proxy_pass http://127.0.0.1:3000;