Page Domain and API Domain

The API Platform needs to distinguish between two domains: platform.zhishuyun.com hosts the pages and documentation, while xapi.zhishuyun.com hosts customer API requests.

Completion Effect

Customers read the documentation on the Zhishuyun domain, and the copied API Base URL is also the Zhishuyun domain, which can be called in real terms using HTTPS.

Preparation Before Starting

  • Ability to modify the zhishuyun.com DNS;
  • Confirm the page domain platform.zhishuyun.com;
  • Confirm the API domain xapi.zhishuyun.com;
  • Both names have no conflicting A, AAAA, or CNAME records;
  • A low-cost, side-effect-free test request has been prepared.

Step 1: Add Platform Page Domain

  1. Go to the Site details "Domain";
  2. Click to add in the "Page Domain" area;
  3. Enter platform.zhishuyun.com;
  4. Copy the CNAME target displayed in the console;
  5. Add a new CNAME in the DNS console;
  6. Return to the Site and click verify;
  7. Wait for the status and HTTPS certificate to be normal.

Zhishuyun Domain Configuration: Page Domain and API Domain Status, CNAME and Verification Entry

Zhishuyun currently resolves to:

platform.zhishuyun.com → platform-proxy.acedata.cloud

Step 2: Add API Request Domain

  1. Still on the "Domain" tab;
  2. Click to add in the "API Domain" area;
  3. Enter xapi.zhishuyun.com;
  4. Copy the API Proxy CNAME target;
  5. Add a new CNAME in the DNS console;
  6. Return to the console to verify and wait for the certificate.

Zhishuyun currently resolves to:

xapi.zhishuyun.com → api-proxy.acedata.cloud

The target displayed in the console is the final reference; do not confuse the Page Proxy and API Proxy.

Step 3: Check Page Domain

  1. Open https://platform.zhishuyun.com;
  2. Sequentially enter the homepage, services, pricing, documentation, and support;
  3. Refresh deep documentation URLs to confirm they do not return 404;
  4. Check login and redirects;
  5. View the title, description, canonical, OG, and favicon in the source code.

Step 4: Check API Domain

Copy a minimal request from the documentation and set the Base URL to:

https://xapi.zhishuyun.com

Use the test API Key to make a call once, confirming:

  • TLS certificate is valid;
  • Authentication is successful;
  • The return structure is consistent with the default API domain;
  • Corresponding usage records appear in the console;
  • Actual charges comply with the service rules.

Step 5: Understand Security Boundaries

Custom API domains are "changing the doorplate": TLS, routing, authentication, and billing are still handled by a unified gateway. It does not automatically restrict tokens to the current Site, nor is it a set of independently deployed gateways. Do not promise customers domain-level token isolation.

Success Indicators

  • Both CNAMEs are queryable in public DNS;
  • Both domains are valid HTTPS;
  • Deep links on the page refresh normally;
  • Documentation examples show xapi.zhishuyun.com;
  • Test requests succeed and generate correct usage records;
  • The page's first screen SEO and Favicon belong to Zhishuyun.

Frequently Asked Questions

The Page Domain Opens the Wrong Site

Check if the domain is bound to the wrong Site, or if the CNAME points to the API Proxy. A domain should only be bound to one Site.

API Domain Returns 401

First, use the same API Key to call the default domain. If the default domain also fails, the issue lies with the credentials or quota; only check domain verification and path if the custom domain fails.

Documentation Still Copies Default API Host

Confirm that the API domain status is verified, and reload the Site configuration and documentation page. Clear the cache if necessary and test again.

Next Article

Continue to complete Customer Registration, API Key, and API Delivery.