Shared cloud hosting instances use a shared IP address. If this IP address is targeted by a DDoS attack, all hosts sharing it are affected. We recommend creating a CNAME record to resolve your domain name to the provided temporary domain name. This improves security by abstracting the underlying IP address. This topic describes how to configure a CNAME record for your domain name.
Prerequisites
Background information
The temporary domain name resolves to an IP address managed by Alibaba Cloud that can change at any time. This conceals your host's actual IP address, isolating your service from attacks and improving network security.
- Domain registered with Alibaba Cloud: You do not need to manually add the domain in the Alibaba Cloud DNS console. You can bind the domain and configure automatic resolution directly from the host management console.
- For enhanced shared cloud hosting instances, you do not need to enable CNAME resolution for the temporary domain name. You can bind and resolve the domain directly in the host management console. For details, see Configure a CNAME record for a domain registered with Alibaba Cloud (enhanced shared hosting).
- For some non-enhanced shared cloud hosting instances, you must first enable CNAME resolution for the temporary domain name before you can bind and resolve the domain in the host management console. For details, see Configure a CNAME record for a domain registered with Alibaba Cloud (some non-enhanced shared hosting).
- Domain registered with another registrar or a subdomain: You must use Alibaba Cloud DNS. To enable domain resolution, you must first add your primary domain or subdomain to the Alibaba Cloud DNS console.
- For enhanced shared cloud hosting instances, you do not need to enable CNAME resolution for the temporary domain name. You can directly configure a CNAME record to resolve to the temporary domain name. For details, see Configure a CNAME record for a domain not registered with Alibaba Cloud (enhanced shared hosting).
- For some non-enhanced shared cloud hosting instances, you must first enable CNAME resolution for the temporary domain name before you configure the CNAME record. For details, see Configure a CNAME record for a domain not registered with Alibaba Cloud (some non-enhanced shared hosting).
Enabling CNAME resolution for the temporary domain name can help mitigate some DDoS attacks, but it does not guarantee your website's availability. For greater protection, we recommend that you upgrade to dedicated cloud hosting, which provides a dedicated IP address. For more information, see Upgrade a Web Hosting instance.
Configure CNAME for Alibaba Cloud domains (enhanced shared hosting)
- Log on to the Web Hosting management page.
- Find the target shared cloud hosting instance and click Manage in the Actions column.
- In the left-side navigation pane, choose .
- On the Domain Binding page, click Bind Domain.
- In the Bind Domain dialog box, enter your domain name, select the If your domain uses Alibaba Cloud DNS, it will be automatically resolved to this host after binding checkbox, and then click Confirm.
A tip at the top of the dialog box states that if you enter a root domain (for example, aliyun.com), the system automatically binds both the root domain and its www subdomain (for example, www.aliyun.com). The dialog box also provides an Or, select a HiChina domain name under your account drop-down list.
- In the confirmation message that appears, click Confirm.
The dialog box shows the domain binding result. The upper list displays the bound domains and their Binding Status, which shows Bound. The lower list displays the domain's Expected Resolution Target, Resolution Status, and ICP Filing Status. If the ICP Filing Status is Not Filed, you can click File Now to start the ICP filing process.After the domain is successfully bound, the results are displayed on the Domain Binding page. The list of bound domains includes the Bound Domain, Resolution Address, ICP Filing Status, Forced HTTPS Encrypted Access, and Actions columns. A tip at the top of the page indicates that a host can have multiple domains bound to it. After binding, a domain must be resolved and have a completed ICP filing to be accessible. The tip also shows the maximum number of domains that can be bound and the current number of bound domains.
Configure CNAME for Alibaba Cloud domains (non-enhanced shared hosting)
For some non-enhanced shared cloud hosting instances, you must first enable CNAME resolution for the temporary domain name before you configure the CNAME record in the host management console. The console UI may vary.
- Log on to the Web Hosting management page.
- Find the target shared cloud hosting instance and click Manage in the Actions column.
- On the Site Information page, in the Website Information section, click Enable CNAME Resolution for Temporary Domain.
The Enable CNAME Resolution for Temporary Domain link is located to the right of Running Status, on the same line as the Stop Site link.
- In the Resolve to Temporary Domain dialog box that appears, click Confirm.
- Configure the CNAME record for the domain.
Configure CNAME for external domains (enhanced shared hosting)
- In the Alibaba Cloud DNS console, configure the CNAME record for your domain.
For detailed steps, see How do I configure DNS in Alibaba Cloud DNS for a domain not registered with Alibaba Cloud?.
The following table describes the parameters for the CNAME record.
Parameter Description Record Type Select CNAME. host record The subdomain prefix. - To create a resolution record for a subdomain such as
www.dns-example.com, set the host record towww. - To create a resolution record for the root domain, such as
dns-example.com, set the host record to@.
Resolution Line Select Default. record value The domain name to which the CNAME record points. Enter your temporary domain name. TTL The cache duration. A smaller value means record changes take effect faster. The default is 10 minutes. - To create a resolution record for a subdomain such as
- Log on to the Web Hosting management console.
- In the left-side navigation pane, choose .
- On the Domain Binding page, click Bind Domain.
- In the Bind Domain dialog box, enter the domain name for which you configured the CNAME record, and then click Confirm.
Important Do not select the If your domain uses Alibaba Cloud DNS, it will be automatically resolved to this host after binding checkbox.
- In the confirmation message, click Confirm to finish binding the domain.
Configure CNAME for external domains (non-enhanced shared hosting)
For some non-enhanced shared cloud hosting instances, you must first enable CNAME resolution for the temporary domain name before you configure the CNAME record. The console UI may vary.
- Log on to the Web Hosting management page.
- Find the target shared cloud hosting instance and click Manage in the Actions column.
- On the Site Information page, in the Website Information section, click Enable CNAME Resolution for Temporary Domain.
The Enable CNAME Resolution for Temporary Domain link is located to the right of Running Status, on the same line as the Stop Site link.
- In the Resolve to Temporary Domain dialog box that appears, click Confirm.
- Configure the CNAME record for the domain.