diff --git a/templates/haproxy-cert.part b/templates/haproxy-cert.part
index b2516294e590f2511b3b996d4c7aff6c424fa2a5..a6b9fd94964a351c454e6248d54295965b4dad35 100644
--- a/templates/haproxy-cert.part
+++ b/templates/haproxy-cert.part
@@ -1,4 +1,4 @@
 
 # %HOSTNAME%:
-    acl is_%HOSTNAME% req_ssl_sni -i %HOSTNAME%
-    use_backend %HOSTNAME% if is_%HOSTNAME%
+    acl https_%HOSTNAME% req_end(host) -i %HOSTNAME%
+    use_backend %HOSTNAME% if https_%HOSTNAME%