diff --git a/roles/aurweb/templates/nginx.d.conf.j2 b/roles/aurweb/templates/nginx.d.conf.j2
index 9d260847120d6a5a4480c8df0b32fa55df5970c9..d4fce5163d9d232281556b776a71c8bbd65ef685 100644
--- a/roles/aurweb/templates/nginx.d.conf.j2
+++ b/roles/aurweb/templates/nginx.d.conf.j2
@@ -22,7 +22,7 @@ server {
     include snippets/letsencrypt.conf;
 
     location / {
-        rewrite ^(.*) https://{{ aurweb_domain }}$1 permanent;
+        return 301 https://$server_name$request_uri;
     }
 }
 
diff --git a/roles/fluxbb/templates/nginx.conf.j2 b/roles/fluxbb/templates/nginx.conf.j2
index 29f840de92ba7037bc8249d79cde365531d4c24d..1c81bd6bec514519691b25a08a5a78a7f8b96c4d 100644
--- a/roles/fluxbb/templates/nginx.conf.j2
+++ b/roles/fluxbb/templates/nginx.conf.j2
@@ -10,7 +10,7 @@ server {
     include snippets/letsencrypt.conf;
 
     location / {
-        rewrite ^(.*) https://{{ fluxbb_domain }}$1 permanent;
+        return 301 https://$server_name$request_uri;
     }
 }
 
diff --git a/roles/hedgedoc/templates/nginx.d.conf.j2 b/roles/hedgedoc/templates/nginx.d.conf.j2
index 1faac68d36f79025ae394ec9bafc7799c7f8a990..66f41d9010b5fa69000fa5d76260659bd7589a98 100644
--- a/roles/hedgedoc/templates/nginx.d.conf.j2
+++ b/roles/hedgedoc/templates/nginx.d.conf.j2
@@ -19,7 +19,7 @@ server {
     include snippets/letsencrypt.conf;
 
     location / {
-        rewrite ^(.*) https://{{ hedgedoc_domain }}$1 permanent;
+        return 301 https://$server_name$request_uri;
     }
 }