How to setup pfSense haproxy http-to-https redirect

Setting up HAProxy HTTP-to-HTTPS redirect is pretty simple:

  • Setup a new primary frontend. I typically name it HTTP-to-HTTPS but you can name it whatever you want
  • Configure the External address section to listen on port 80 on all interfaces you want to redirect. Note that you need to remove all port 80 listen addresses from all other primary frontends or else you won’t be able to reload haproxy

  • Now create an ACL http-request redirect rule with scheme https as the rule:

This will redirect any incoming request on this frontend to HTTPS. Since this frontend is only listening to HTTP, it will redirect all HTTP requests to HTTPS.