diff --git a/nginx.conf b/nginx.conf
index 490c4653ab0671d5f05050857c15bd1e505c0153..3e781cd46e9d59b100b53dd9f61e434be8af97a5 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -30,10 +30,10 @@ http {
     }
 
     location = /.well-known/carddav {
-      return 301 $scheme://$host/remote.php/dav;
+      return 301 https://$host/remote.php/dav;
     }
     location = /.well-known/caldav {
-      return 301 $scheme://$host/remote.php/dav;
+      return 301 https://$host/remote.php/dav;
     }
 
     client_max_body_size 1G;