A 301 redirect permanently forwards traffic from a source domain name to a destination domain name, improving your website's search engine ranking and user experience. On Linux-based Alibaba Cloud Web Hosting Enhanced edition instances, you can also configure an HTTPS redirect to forward HTTPS requests to the destination domain name. This topic explains how to configure both types of redirects.
Prerequisites
You have bound both the source domain name and the destination domain name to your Alibaba Cloud Web Hosting instance.
NoteIf a domain name is on the blocklist, you cannot bind it to Alibaba Cloud Web Hosting.
The domain names are registered with Alibaba Cloud, have their DNS records properly configured, and have completed ICP filing.
NoteIf your domain name is used for internet information services in the Chinese mainland, you must apply for an ICP filing. For more information, see ICP Filing Overview.
Limitations
Domain name limitations
You cannot configure a 301 redirect for a temporary domain name.
The source domain name and destination domain name cannot be the same.
For example, a domain name that is already used as a destination domain name cannot be used as a source domain name in another redirect rule.
A source domain name cannot be redirected to multiple destination domain names.
For example, if you have configured a 301 redirect from domain name A to domain name B, you cannot configure another 301 redirect from domain name A to domain name C.
Host instance type limitations
M2-type instances and the Economy edition of Alibaba Cloud Web Hosting do not support 301 redirects.
The Enhanced edition supports site-wide 301 redirects. The Standard edition only supports 301 redirects for the homepage.
For the Enhanced edition (Linux) of Alibaba Cloud Web Hosting, you can enable the HTTPS redirect feature only if HTTPS is enabled for both the source and destination domain names. For more information, see Enable or disable HTTPS redirect.
Configure 301 redirects
After you switch to a new domain name, you can set up a 301 redirect to forward traffic from the old domain name to the new one. When a visitor or a search engine requests the old domain name, the server returns a 301 status code, indicating that the website has permanently moved, and then automatically redirects the request to the new domain name.
- Log on to the Cloud Web Hosting management page.
- Find the Cloud Web Hosting instance you want to manage and click Manage in the Actions column.
- In the navigation pane on the left, choose .
On the 301 Redirect page, select your Source Domain (the old domain name) and Destination Domain (the new domain name), click Add, and then click Confirm.
If the 301 Redirect Added Successfully! message appears, click Confirm.
The 301 redirect takes effect only after the domain name is registered with Alibaba Cloud, its DNS records are configured, and its ICP filing is complete.

If the error message The source domain name is already configured with a redirect. Please delete the original redirect before you configure a new one. appears, click OK. You must first remove the existing redirect for the source domain name and then set up the 301 redirect to the new domain name.

For example, if you have a 301 redirect from domain name A to domain name B and try to create a new redirect from domain name A to domain name C, the
The source domain name already has a redirect configured. Please delete the original redirect before configuring a new one.error message appears. You must first remove the redirect from domain name A to domain name B (as described in Step 5) before you can create the new redirect from domain name A to domain name C.
(Optional) Remove the 301 redirect.
If you no longer need the 301 redirect, you can remove it.
On the 301 Redirect page, find the redirect rule to remove and click Delete in the Operations column.
In the dialog box that appears, click Confirm.
When you remove a 301 redirect, any associated HTTPS redirect is also disabled. This means that requests to the old domain name over both HTTP and HTTPS will no longer be forwarded to the new domain name.
Enable or disable HTTPS redirect
This procedure applies only to the Enhanced edition (Linux) of Alibaba Cloud Web Hosting, and only if HTTPS is enabled for both the source and destination domain names.
For the Enhanced edition (Windows) of Alibaba Cloud Web Hosting, this step is not necessary. The system supports HTTPS redirects by default.
For other types of Alibaba Cloud Web Hosting instances, the available options may vary. Refer to the console for details.
Configure a 301 redirect for the domain name.
For instructions, see Configure 301 redirects.
In the list of redirect rules, enable or disable the HTTPS redirect feature, and then click Confirm.
Enable the HTTPS redirect
Scenario: Enable this feature if you want to redirect HTTPS requests from the source domain name to the destination domain name.
Impact: After you enable this feature, both HTTP and HTTPS requests to the source domain name are redirected. HTTPS improves security by encrypting data in transit, preventing it from being intercepted or modified.
For example, if you have a 301 redirect from domain name A to domain name B and you also enable the HTTPS redirect, requests to both http://domain-a.com and https://domain-a.com are redirected to domain name B.
Procedure: Find the redirect rule and click Enable in the Support HTTPS Redirect column. Then, click Confirm.
Disable the HTTPS redirect
Scenario: If you do not want HTTPS requests to be redirected, disable this feature.
Impact: After you disable this feature, only HTTP requests to the source domain name are redirected. HTTPS requests will no longer be forwarded.
Procedure: Find the redirect rule and click Disable in the Support HTTPS Redirect column. Then, click Confirm.
Related topics
You can configure 301 redirects by using the Host Management console, a website configuration file, or by modifying website pages. If a redirect is no longer needed or causes issues, you can remove it. The removal method depends on how the redirect was configured. For more information, see Remove the 301 redirect.