All Products
Search
Document Center

Redirect requests from HTTP to HTTPS

Last Updated: Feb 09, 2022

HTTPS is a protocol used to secure data transmission. Classic Load Balancer (CLB) supports HTTP-to-HTTPS redirection to achieve end-to-end data transfer over HTTPS. This secures data transmission. HTTP-to-HTTPS redirection is available in all regions.

Prerequisites

A CLB instance is created. For more information, see Create a CLB instance.

Context

In this example, HTTP-to-HTTPS redirection is enabled for CLB to redirect HTTP requests received on port 80 to port 443 that is used by an HTTPS listener.

Step 1: Create an HTTPS listener

  • Log on to the CLB console.

  • In the top navigation bar, select the region where the CLB instance is deployed.

  • Use one of the following methods to open the listener configuration wizard:

    • On the Instances page, find the CLB instance that you want to manage and click Configure Listener in the Actions column.

    • On the Instances page, click the ID of the CLB instance that you want to manage. On the Listener tab, click Add Listener.

  • In the Protocol and Listener step, set the following parameters and click Next:

    For more information about the other parameters and how to create an HTTPS listener, see Create an HTTPS listener.

    • Select Listener Protocol: HTTPS.

    • Listening Port: 443.

Step 2: Create an HTTP listener and enable HTTP-to-HTTPS redirection for the listener

  1. Log on to the CLB console.

  2. In the top navigation bar, select the region where the CLB instance is deployed.

  3. Use one of the following methods to open the listener configuration wizard:

    • On the Instances page, find the CLB instance that you want to manage and click Configure Listener in the Actions column.

    • On the Instances page, click the ID of the CLB instance that you want to manage. On the Listener tab, click Add Listener.

  4. In the Protocol and Listener step, set Select Listener Protocol to HTTP and Listening Port to 80.

  5. Click Modify next to Advanced.

  6. Enable Redirection, set Target Port to HTTPS:443, and then click Next.

  7. Confirm the configurations and click Submit. In the message that appears, click OK.