Updated on 2025-07-10 GMT+08:00

(Optional) Binding a Custom Domain Name

To enable private and public access to the Stable Diffusion application, bind a custom domain name to the application.

Prerequisites

The Stable Diffusion application has been deployed. For details, see Deploying and Using the Stable Diffusion Application.

Step 1: Preparing a Custom Domain Name

If an available domain name exists, go to Step 2: Configuring Domain Name Resolution.

Apply for a public network domain name through the domain name registrar. Ensure that the domain name is available.

Step 2: Configuring Domain Name Resolution

  1. After an application is created, click Bind now in the prompt, as shown in Figure 1. The APIG console is displayed.

    Figure 1 Clicking the Bind now button

  2. On the displayed APIG console, click the Summary tab and click to copy the subdomain name as shown in Figure 2.

    Figure 2 Copying the subdomain name

  3. Log in to the DNS console, choose Public Zones, and click Manage Record Set on the right of the purchased domain name as shown in Figure 3.

    If you use a domain name not registered with Huawei Cloud, see Creating a Public Domain Name.

    Figure 3 Clicking Manage Record Sets

  4. On the Record Sets tab, click Add Record Set, as shown in Figure 4.

    Figure 4 Adding a record set

  5. In the displayed Add Record Set dialog box, configure the information.

    • Type: Select CNAME – Map one domain to another.
    • Name: Set it according to Adding a CNAME Record Set.
    • Value: Enter the subdomain name copied in 2.

    Retain the default values for other parameters and click OK to complete domain name resolution as shown in Figure 5.

    Figure 5 Configuring the record set

Step 3: Bind a Custom Domain Name

  1. Return to the APIG console, as shown in Figure 6. On the Domain Names tab page, click Bind Independent Domain Name, enter a custom domain name, and click OK. After the binding is successful, you can unbind the temporary domain name.

    Figure 6 Binding an independent domain name

  2. Return to the application details page on the FunctionGraph console, as shown in Figure 7. Click then refresh to access the application using the custom domain name.

    Figure 7 Refreshing the bound domain name