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.comDNS; - 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
- Go to the Site details "Domain";
- Click to add in the "Page Domain" area;
- Enter
platform.zhishuyun.com; - Copy the CNAME target displayed in the console;
- Add a new CNAME in the DNS console;
- Return to the Site and click verify;
- Wait for the status and HTTPS certificate to be normal.
Zhishuyun currently resolves to:
platform.zhishuyun.com → platform-proxy.acedata.cloud
¶ Step 2: Add API Request Domain
- Still on the "Domain" tab;
- Click to add in the "API Domain" area;
- Enter
xapi.zhishuyun.com; - Copy the API Proxy CNAME target;
- Add a new CNAME in the DNS console;
- 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
- Open
https://platform.zhishuyun.com; - Sequentially enter the homepage, services, pricing, documentation, and support;
- Refresh deep documentation URLs to confirm they do not return 404;
- Check login and redirects;
- 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.
