Snapt Aria: Redirect port 80 to port 443 (HTTP to HTTPS)
  • 28 Dec 2021
  • 1 Minute to read
  • Dark

Snapt Aria: Redirect port 80 to port 443 (HTTP to HTTPS)

  • Dark

There are certain circumstances in which you might want to transparently pass traffic from one port to another. Quite typically for web apps, this may be the case if you are receiving plain text insecure requests on port 80 (HTTP) and you want those to be redirected to an SSL-secured connection on port 443 (HTTPS).

This HTTP to HTTPS redirection is something you can easily achieve with a load balancer group/frontend.

Step 1: Set up the Frontend

We will create an HTTP-Frontend and set it to listen on port 80 (HTTP).

Navigate to:

Balancer > Frontend Management

Click on the Add a Frontend tab, and enter your group details.

Give it a Name (e.g. HTTP_Redirect) and set it to listen on Port Number 80.

Click on the Step 2 button at the bottom of the page.

Step 2: Set the Load Balance Mode

Now it is time to configure the options for your Frontend options. You can edit these at a later stage, but take note of the various options and features as they can dramatically affect your load balance group!


Standard Options sub-tab > Balance Options pane

Set Balance Mode to HTTP (Layer 7). You can leave Default Backend as None


Step 3: Set the Redirects

We’ll now properly set the redirects from the HTTP to HTTPS schema.

Go under:

HTTP Options tab > Header Modification pane

And set Redirects to:

scheme https if !{ ssl_fc }

Click on the Save button at the end of the page.

… and that’s it! You have redirected all traffic from port 80 (HTTP) to port 443 (HTTPS).