Answers to frequently asked questions about domain names in API Gateway.
Domain name issues
What is a second-level domain name and what limits does it have?
API Gateway assigns a public second-level domain name to each API group by default. This domain name is for testing only and not suitable for production use.
The second-level domain name has the following limits:
Outside the Chinese mainland: 100 API calls per day.
Inside the Chinese mainland: 1,000 API calls per day.
The egress IP address of API Gateway can change at any time. Instead of pointing your DNS A record at this IP, create a CNAME record that maps your independent domain name to the second-level domain name. This keeps your domain resolving correctly even when the underlying IP changes.
To use your APIs without these restrictions, bind your own independent domain name to the API group.
How long does it take for a bound domain name to take effect?
For Alibaba Cloud domain names:
A new DNS record takes effect within one minute.
An updated DNS record takes effect a little longer after the Time to Live (TTL) of the previous record expires.
For domain names registered with other providers, propagation timing depends on the provider's policy.
How do I use an independent domain name to call an API?
Bind one or more of your own domain names to an API group. Once bound, use those domain names to call any API in that group.
Do I need to file my domain name with ICP by using Alibaba Cloud before I can use the domain name to open APIs?
Yes. ICP filing is required before you can use a domain name to expose APIs.
How is a domain name resolved?
After you bind a domain name to an API group, create a CNAME record that points your domain name to the second-level domain name assigned to that group. DNS resolves your domain name to the second-level domain name, and API calls reach the correct API group.
Use a CNAME record rather than an A record. The egress IP address of API Gateway can change, but the second-level domain name stays fixed — a CNAME always resolves correctly regardless of IP changes.
How many domain names can I bind to an API group?
Each API group supports up to five public domain names and five internal domain names.