diff --git a/confd/templates/haproxy.cfg.tmpl b/confd/templates/haproxy.cfg.tmpl
index bf6aab89fd5b72b1f7923ae6b6612fa6c03ece3c..344745d7503986f0785cdd4e89861b7a1df4baa5 100644
--- a/confd/templates/haproxy.cfg.tmpl
+++ b/confd/templates/haproxy.cfg.tmpl
@@ -29,6 +29,7 @@ mode http
     {{$data := json .Value}}
 # {{base $hostname}}:
   acl https_{{base $hostname}} hdr(host) -i {{base $hostname}}
+  acl https_{{base $hostname}} hdr(host) -i www.{{base $hostname}}
   use_backend {{base $hostname}} if https_{{base $hostname}}
   {{end}}
 {{end}}
@@ -44,6 +45,7 @@ frontend http-in
     {{$data := json .Value}}
 # {{base $hostname}}:
   acl is_{{base $hostname}} hdr(host) -i {{base $hostname}}
+  acl is_{{base $hostname}} hdr(host) -i www.{{base $hostname}}
   use_backend {{base $hostname}} if is_{{base $hostname}}
   {{end}}
 {{end}}