You can continue using your database's original domain name after migration by binding it as a private domain name.
Scenarios
You can bind one private domain name to each VPC-facing endpoint of a PolarDB cluster. A private domain name takes effect only in the specified VPC within the current region and has a higher resolution priority than globally available domain names.
For example, the original domain name of your database is developer.aliyundoc.com. After you migrate the database to a PolarDB cluster whose connection endpoint is image.developer.aliyundoc.com, you can create a private domain name to continue using the original domain name. To do so, create a CNAME record that maps developer.aliyundoc.com to image.developer.aliyundoc.com. After the binding is successful, requests to developer.aliyundoc.com from within the specified VPC are directly routed to the PolarDB cluster, as shown in the following figure.

Pricing
The private domain name feature for PolarDB uses PrivateZone to map a private domain name to the VPC-facing endpoint of PolarDB. PrivateZone charges a small fee. For more information, see Pricing.
Bind a private domain name
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where the cluster is located, and then click the cluster ID.
-
On the Basic Information page, find the Database Connections section. In the upper-right corner of the section, click the
icon to switch the view. -
Find the target VPC-facing endpoint and click Bind Private Domain Name in the Actions column.
-
In the Bind Private Domain Name dialog box, enter a prefix and suffix for the private domain name. The format is
<prefix>.<suffix>. For more information, see the following table:Parameter
Description
private domain name prefix
The prefix must be 6 to 40 characters long, start with a letter, end with a letter or digit, and contain only lowercase letters, digits, and hyphens (-).
private domain name suffix (zone)
You can select an existing zone from the drop-down list or enter a new one. For more information about zones, see What is PrivateZone?.
Note-
If the VPC where the PolarDB cluster resides is not associated with the specified zone, the system automatically associates the VPC with the zone.
-
You can view and manage the zones in the PrivateZone console.
NoteWhen you bind a private domain name, the system automatically creates a service-linked role named AliyunServiceRoleForPolarDB. For more information, see PolarDB service-linked role.
-
-
Click OK.
-
In the Bind Private Domain Name dialog box, confirm that the domain name information is correct, and then click OK.
Related APIs
|
API |
Description |
|
Modifies a PolarDB cluster's endpoints, which include the primary endpoint, default cluster endpoint, custom cluster endpoint, and private domain name. |