Skip to main content
Configure HTTP → HTTPS redirect
Last update:

Configure HTTP → HTTPS redirect

  1. Make sure to create a load balancer with an HTTPS rule that will accept requests to the HTTPS version of the site. Available load balancers can be viewed in the Control Panel: in the top menu, click ProductsCloud ServersBalancersBalancers tab.

  2. In the dashboard, on the top menu, click Products and select Cloud Servers.

  3. Go to BalancersBalancers tab.

  4. Open the balancer page.

  5. Click Create Rule.

  6. Select HTTP as the protocol for receiving traffic. The default port 80 will be automatically selected, on which the balancer will listen to traffic.

  7. Select the default target group — traffic that is not covered by the HTTP policies in the rule will be directed there. If there are no available target groups in the list, click New Target Group and create a target group with the HTTP traffic destination protocol and port 80. If you want to discard traffic that does not fall under the HTTP policy, select No Target Group.

  8. Mark the HTTP request headers to be passed to the servers.

  9. To create an HTTP policy in the rule, click Add New Policy.

  10. Select the check condition: HOSTNAME — EQUAL TO.

  11. Enter a domain name, such as example.com.

  12. Select the Redirect to URL prefix action.

  13. Enter the URL prefix — the part that will replace the protocol and domain name in the incoming request, e.g. https://example.com.

  14. Optional: change the policy name or leave the default one generated.

  15. Click Add.

  16. Optional: open the Advanced Rule Settings block and specify the connection settings:

    • for incoming requests to the balancer — specify the connection timeout and maximum connections;
    • for requests from the balancer to servers — specify the connection timeout, inactivity timeout and TCP packet waiting timeout.
  17. Click Create.