Configuring an OVHcloud Load Balancer service with redirects

Knowledge Base

Configuring an OVHcloud Load Balancer service with redirects


Icons/System/eye-open Created with Sketch. 64 Views 27.11.2025 Cloud / OVHcloud Load Balancer

Objective

The OVHcloud Load Balancer operates by default as a proxy. It can also be configured to redirect client traffic to a third-party website. This functionality is essential for scenarios such as domain name migration or enforcing the HTTPS version of a website. This is known as HTTP redirection.

This guide outlines the process for integrating your web services behind an OVHcloud Load Balancer utilizing HTTP redirections.

Requirements

Instructions

Overview

An HTTP redirect looks like this:

HTTP/1.1 301 Moved Permanently
Location: http://www.example.org/
Content-Type: text/html
Content-Length: 174

Custom redirects must be formatted as <scheme>://<net_loc>/<path>;<params>?<query>#<fragment>. Only one redirect can be specified per frontend.

Custom redirects can be specified via the OVHcloud Control Panel or via the API, on a new or existing frontend.

Adding a custom redirect from the OVHcloud Control Panel

You can define a custom redirect from the OVHcloud Control Panel in the Bare Metal Cloud section and then Load Balancer. This can be done either on a new frontend during its creation, or on an existing frontend.

Adding a new frontend

In the Frontends section, click on the Add a frontend button to create a new one.

In the frontend editing page, select the HTTP or HTTPS protocol.
Configure the information as usual. However, it is unnecessary to specify the Default backend, as it will not be used.

In the advanced settings, fill in the HTTP redirect.

Editing an existing frontend

In the Frontends section, click on the ... button to the right of the relevant frontend and select Edit.
Make sure the selected frontend is of the HTTP or HTTPS protocol. Complete the configuration if necessary. However, it is unnecessary to specify the Default backend, as it will not be used.

In the advanced settings, fill in the HTTP redirect.

Configuration of a Frontend Redirect

Once the frontend is configured, click on Add or Edit depending on whether you are configuring a new frontend or an existing one. Do not forget to deploy the configuration.

To do this, you can either:

  • In the Status section of the Home tab, click on the ... button of your Load Balancer and then click on Apply the configuration.

  • In the reminder banner informing you that the configuration is not applied, click on Apply the configuration.

Application of a Load Balancer Configuration

Adding a custom redirect from the OVHcloud API

In the OVHcloud API, redirects are specified in the redirectLocation string:

Creating a new frontend

ParameterMeaning
serviceNameIdentifier of your Load Balancer service
portPort(s) of the frontend
zoneDeployment zone of the frontend
redirectLocationHTTP redirect URL

Updating an existing frontend

ParameterMeaning
serviceNameIdentifier of your Load Balancer service
frontendIdIdentifier of the frontend to update
redirectLocationHTTP redirect URL

Applying the changes

ParameterMeaning
serviceNameIdentifier of your Load Balancer service
zoneDeployment zone of the frontend

Go further

Join our community of users.

Related articles