---
title: "Configuring an OVHcloud Load Balancer service with redirects"
description: "The OVHcloud Load Balancer acts by default as a proxy. It can also be configured to redirect your customers to a third-party website. This functionality is esse"
url: https://docs.us.ovhcloud.com/en/network/load-balancer/create-redirectlocation
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Configuring an OVHcloud Load Balancer service with redirects

The OVHcloud Load Balancer acts by default as a proxy. It can also be configured to redirect your customers 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.

 

## Requirements

- An [OVHcloud Load Balancer](https://us.ovhcloud.com/network/load-balancer/) service in your OVHcloud account
- Access to the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) or [OVHcloud API](https://api.us.ovhcloud.com/)

 

## Instructions

### Overview

An HTTP redirection is presented as follows:

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

Custom redirections should have the following form: `<scheme>://<net_loc>/<path>;<params>?<query>#<fragment>`. You can only specify one redirection per front-end.

Custom redirections can be specified via the OVHcloud Control Panel and API, both on new and existing `front-ends`.

 

### Adding a custom redirect

#### Creating a new frontend

##### Via the OVHcloud Control Panel

You can define custom redirections from the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) by going to the `Bare Metal Cloud` section, and then `Load Balancer`.
You can follow [these instructions](https://docs.us.ovhcloud.com/en/network/load-balancer/manage-load-balancer.md#managing-front-ends) to create a new front-end, but take note of the following during the creation:
- Select `HTTP` or `HTTPS` protocol.
- Configure the information as requested. However, please note that there is no need to set a `Default server cluster`, as it will not be used.
- In the advanced settings, enter the `HTTP redirection`.

Once the front-end has been configured, click `Add` and [apply the changes](#applying-the-changes) to your Load Balancer configuration.

##### Via the OVHcloud API

In the [OVHcloud API](https://api.us.ovhcloud.com/), redirections are specified in the `redirectLocation` character chain.

[POST /ipLoadbalancing/{serviceName}/http/frontend](https://api.us.ovhcloud.com/console/?section=/ipLoadbalancing&branch=v1#post-/ipLoadbalancing/-serviceName-/http/frontend)

| Parameter          | Meaning                       |
| ------------------ | ----------------------------- |
| `serviceName`      | Your Load Balancer service ID |
| `port`             | Front-end listening ports     |
| `zone`             | Front-end deployment zones    |
| `redirectLocation` | HTTP redirection URL          |
[Apply your changes](#applying-the-changes) to your Load Balancer configuration.

 

#### Updating an existing frontend

##### Via the OVHcloud Control Panel

You can define custom redirections from the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) by going to the `Bare Metal Cloud` section, and then `Load Balancer`.
In the `Front-ends` tab of the OVHcloud Control Panel, select the front-end you would like to edit. To do this, click the _more options_ `...` button, then select `Edit` in the menu that appears. Please ensure that the front-end you have chosen uses either `HTTP` or `HTTPS` protocol.
Complete the configuration if necessary. However, there is no need to specify a `Default server cluster`, as it will not be used.
In the advanced settings, enter the `HTTP redirection`.

Once the front-end has been configured, click `Modify` and [apply the changes](#applying-the-changes) to your Load Balancer configuration.

##### Via the OVHcloud API

In the [OVHcloud API](https://api.us.ovhcloud.com/), redirections are specified in the `redirectLocation` character chain.

[PUT /ipLoadbalancing/{serviceName}/http/frontend/{frontendId}](https://api.us.ovhcloud.com/console/?section=/ipLoadbalancing&branch=v1#put-/ipLoadbalancing/-serviceName-/http/frontend/-frontendId-)

| Parameter          | Meaning                           |
| ------------------ | --------------------------------- |
| `serviceName`      | Your Load Balancer service ID     |
| `frontendId`       | ID of the front-end to be updated |
| `redirectLocation` | HTTP redirection URL              |
[Apply your changes](#applying-the-changes) to your Load Balancer configuration.

 

#### Applying the changes

##### Via the OVHcloud Control Panel

There are two ways of applying your configuration via the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/):
- via the **Status** panel of the OVHcloud Control Panel, by clicking on your Load Balancer’s _more options_ `...` button, then selecting `Apply configuration`.

- via the reminder box in the OVHcloud Control Panel, notifying you that the configuration has not been applied, by clicking `Apply configuration`.

##### Via the OVHcloud API

[POST /ipLoadbalancing/{serviceName}/refresh](https://api.us.ovhcloud.com/console/?section=/ipLoadbalancing&branch=v1#post-/ipLoadbalancing/-serviceName-/refresh)

| Parameter     | Meaning                       |
| ------------- | ----------------------------- |
| `serviceName` | Your Load Balancer service ID |
| `zone`        | Front-end deployment zones    |

 

## Go further

Browse all the [Load Balancer guides](https://docs.us.ovhcloud.com/en/network/load-balancer/landing-page-load-balancer.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Load Balancer](https://us.ovhcloud.com/network/load-balancer/) on the OVHcloud US website.
