Domain name management
This topic describes how to bind a custom domain name to a published web application and configure domain name resolution, allowing visitors to access your web application through the custom domain name.
Prerequisites
-
Your application is published. For more information, see Publish.
-
You have purchased a domain name. For more information, see Alibaba Cloud Domain Name Service.
Limitations
-
If you embed your web application into a third-party website or application, such as a web-based backend or a mobile app, you must configure an HTTPS acceleration service.
-
Each application can be bound to a maximum of five domain names, but a domain name can be bound to only one application. If the domain name that you want to bind is already bound to another application, the binding fails and the following message appears:
domain already exit. In this case, you must unbind the domain name from the web application that currently uses it before you can bind it to the target application.
Bind a domain name
-
Log on to the IoT Studio console. In the upper-left corner, select the target instance. In the navigation pane on the left, click App Development.
-
In the Recently Developed section, find your target application in the Web Application list and click its name.
-
In the web application editor, click the Application Settings icon
in the far-left pane. -
On the Application Settings page, click the Domain Names tab, and then click Add.
-
In the Add Domain Name dialog box, enter your domain name and click OK.
NoteYou can bind a maximum of five domain names to each application.
Configure domain name resolution and HTTPS acceleration
When you bind a custom domain name by using Alibaba Cloud CDN, we recommend that you do not configure CDN caching. Otherwise, changes to your application may not appear immediately when accessed through the domain name.
This section explains how to use Alibaba Cloud DNS and Alibaba Cloud CDN to configure domain name resolution and HTTPS secure acceleration. For more information, see Add a DNS record and Configure an HTTPS certificate.
-
Log on to the CDN console. In the navigation pane on the left, click Domain Name Management.
-
On the Domain Name Management page, click Add Domain Name.
-
On the Add Domain Name page, configure the settings and click Next.
-
Part 1: Configure basic information
Parameter
Description
Domain name
Enter your domain name.
NoteThis domain name cannot have other CNAME records.
Business type
Select a type based on your business requirements.
Acceleration region
Select an option based on your requirements. If you select Chinese mainland only or Global, you must apply for an ICP filing for your domain name. For more information about the ICP filing procedure, see First-time ICP filing.
Resource group
If you have created resource groups, select the group that contains your resources.
-
Part 2: Configure origin information
-
On the Add Domain Name page, click Add Origin.
-
In the Add Origin dialog box, configure the following parameters.
Parameter
Description
Origin information
Select Origin Domain. For the domain name, enter the application's default domain name:
xxxxxx.vapp.cloudhost.link.You can find your application's default domain name on the Domain Name Management tab.
This system-assigned domain name has the format
xxxxxx.vapp.cloudhost.link.Priority
Origin priority allows for a primary/secondary configuration where requests are routed to the higher-priority (primary) origin first.
Weight
You can use the default weight.
Port
You can use the default port.
-
Click OK to complete the configuration.
-
-
-
After the domain name is added, return to the Domain Name Management page and copy the generated CNAME value.
-
Go to the Alibaba Cloud DNS console and click DNS Settings for the corresponding domain name.
-
Click Add Record and set the CNAME record for the domain name to the CNAME value that you copied in the previous step.
For more information, see Add a DNS record.
-
Return to the CDN console. On the Domain Name Management page, find your domain name and click Manage in the Actions column.
-
In the navigation pane on the left, select HTTPS Settings. In the HTTPS Certificate section, click Modify and enable HTTPS secure acceleration.
For more information about HTTPS acceleration settings, see Configure an HTTPS certificate.
Apply for an ICP filing
|
Product type |
Description |
Procedure |
|
Public Beta |
|
|
|
Trial Edition |
||
|
Enterprise Edition or Ultimate Edition |
|
On the Domain Names tab for your application, click Apply for ICP Filing to request an ICP filing service number and complete the ICP filing. For more information, see Apply for a free ICP filing service number and ICP filing on PCs and mobile clients. |
Unbind a domain name
-
Log on to the IoT Application Development console. In the top-left corner, select the correct instance, and then click App Development in the left-side navigation pane.
-
In the Recently Developed section, find your target application in the Web Application list and click its name.
-
In the web application editor, click the Application Settings icon
in the far-left pane. -
On the Application Settings page, click the Domain Names tab.
-
In the Domain Name List, find the domain name that you want to unbind and click Unbind in the Actions column.