Help Center/ Ubiquitous Cloud Native Service/ FAQs/ Traffic Distribution/ How Do I Add a Third-Party Domain Name?
Updated on 2024-09-11 GMT+08:00

How Do I Add a Third-Party Domain Name?

Symptom

If you have registered a domain name with a third-party registrar, and you want to use UCS to manage app traffic, you can add the domain name to Domain Name Service (DNS) on Huawei Cloud. The UCS traffic management console automatically obtains the domain name that has been resolved.

Step 1: Add a Domain Name

If your domain name is registered with a third-party registrar, create a public zone and add record sets to it on the DNS console.

  1. Log in to the Huawei Cloud console.
  2. Move the cursor to the icon on the left of the page. In the service list, choose Networking > Domain Name Service.

    The DNS console is displayed.

  3. In the navigation pane, choose Public Zones and click Create Public Zone in the upper right corner.
  4. Set Domain Name to your registered domain name, for example, example.com.

    For details about the parameters, see Creating a Public Zone.

  5. Click OK.

    View the created public zone on the Public Zones page.

    If the system displays a message indicating that the public zone has been created by another tenant, handle the issue by referring to Regaining a Domain Name.

    Click the zone name to query detailed zone information. Record sets of the SOA type and NS type have been created in the zone. To be more specific,

    • The SOA record set defines the DNS server that is the authoritative information source for a particular domain name.
    • The NS record set defines authoritative DNS servers for a zone.

      You can modify the NS record set based on the region of the domain name. For more information about DNS servers, see What Are DNS Server Addresses Provided by Huawei Cloud DNS?

Step 2: Change DNS Servers of the Domain Name

The DNS service provides authoritative DNS servers for domain resolution.

After you create a public zone, an NS record set is generated, which specifies the DNS servers provided by the DNS service.

If DNS server addresses of the public zone are not the same as those in the NS record set, the DNS service will not be able to resolve the domain name. You must change the DNS server addresses of the domain name on the registrar's website.

Generally, the changes to DNS server addresses take effect within 48 hours, but the time may vary depending on the domain name registrar's cache duration.

  1. Query the DNS server addresses of the DNS service.

    1. Log in to the Huawei Cloud console.
    2. Move the cursor to the icon on the left of the page. In the service list, choose Networking > Domain Name Service.

      The DNS console is displayed.

    3. In the navigation pane, choose Public Zones.

      The Public Zones page is displayed.

    4. Click the name of the public zone you created.

      Locate the NS record set. The DNS server addresses provided by the DNS service are displayed under Value.

      Figure 1 NS record set returned by the system

  2. Change the DNS server addresses of the domain name.

    Log in to the domain name registrar website and change the addresses to Huawei Cloud DNS server addresses.

    ns1.huaweicloud-dns.com

    ns1.huaweicloud-dns.cn

    ns1.huaweicloud-dns.net

    ns1.huaweicloud-dns.org

    For details, see the operation guide on the domain name registrar website.

Step 3: Add a Scheduling Policy on UCS

  1. After the DNS record set is added, return to the Create Traffic Policy page of the UCS console and select the newly added domain name. If the domain name is not displayed, click on the right to refresh the drop-down list.

    Figure 2 Creating a traffic policy

  2. Add a policy for the new domain name by referring to Creating a Traffic Policy.

    Figure 3 Scheduling policy

  3. Check whether the created scheduling policy takes effect.

    Take the Linux operating system as an example. You can run the following command in a CLI tool connected to the Internet:

    dig Target domain name

    If your device has not installed dig (Domain Information Groper), install it first. If you are using a CentOS device, run the yum install bind-utils command first.

    If the following information is displayed and the IP address of ANSWER SECTION is the load balancer IP of the destination cluster, the scheduling policy takes effect.