Redaguoti

Bendrinti naudojant


Configure HTTP to HTTPS redirection using the Azure portal

Important

Azure Front Door (classic) will be retired on March 31, 2027. To avoid any service disruption, it is important that you migrate your Azure Front Door (classic) profiles to Azure Front Door Standard or Premium tier by March 2027. For more information, see Azure Front Door (classic) retirement.

This article shows you how to redirect traffic from HTTP to HTTPS for an Azure Front Door (classic) profile using the Azure portal. This configuration is useful if you want to redirect traffic from HTTP to HTTPS for your domain.

Prerequisites

Create HTTP to HTTPS redirect rule

  1. Sign in to the Azure portal.

  2. Go to the Azure Front Door (classic) profile that you want to configure for HTTP to HTTPS redirect. Select Front Door designer from under Settings on the left hand side menu pane.

  3. Select the + icon for Routing rules to create a new route. Enter a name for the route, for example HttpToHttpsRedirect, and then set the Accepted Protocol field to HTTP only. Select the Frontend/domains you redirecting HTTP to HTTPS.

    Screenshot of adding a route in Front Door designer.

  4. Under the Route Details section, set the Route Type to Redirect. Then set the Redirect type to Moved (301) and Redirect protocol get set to HTTPS only.

    Screenshot of add an HTTP to HTTPS redirect route.

  5. Select Add to create the routing rule for HTTP to HTTPS redirect.

Create forwarding rule

  1. Add another routing rule to handle the HTTPS traffic. Select the + icon for Routing rules to add the route. Enter a name for the route, for example DefaultForwardingRoute. Then set the Accepted Protocols field to HTTPS only. Select the appropriate Frontend/domains to accept this traffic.

  2. Under the Route Details section, set the Route Type to Forward. Select a backend pool forward traffic to and set the Forwarding Protocol to HTTPS only.

    Screenshot of add a forward route for HTTPS traffic.

  3. Select Add to create the forwarding route and then select Save to save the changes to the Front Door profile.

Note

The creation of this redirect rule will incur a small charge.

Next steps