Back to Terraform

Alibaba Regional Delivery: DNS, CDN and Cross-Network Boundaries

November 6, 2026 Wasil Zafar 35 min read

Evaluate regional connectivity and edge ownership with account and product constraints made explicit

Table of Contents

  1. Choose the Regional and Public Delivery Path
  2. Record Account, Region and Domain Prerequisites
  3. Model CEN or Other Interconnection Only When Required
  4. Configure DNS, Certificates and Cache Boundaries
  5. Prove a Request Path and Its Recovery Route

Choose the Regional and Public Delivery Path

A hostname has one edge, and on Alibaba that edge is chosen per domain. CDN is attached to an accelerated name rather than to a listener, so the unit of decision is the hostname and not the balancer. The record you publish is a CNAME to a target the CDN returns, which joins the zone and the edge by alias instead of by address.

Three shapes cover public delivery, and they differ in what they store. The CDN terminates viewer TLS, caches objects and fetches misses from an origin over the public network. Global Accelerator carries a connection across Alibaba's backbone to a regional endpoint and stores nothing. A regional ALB or CLB terminates TLS in one region with no edge in front of it.

CDN is the default only when the response can be shared. A catalogue page, a product image, a video segment or an installer is a cache candidate. A checkout, an account page or an API whose body depends on a cookie is not, and accelerating it buys latency at the cost of one visitor's response reaching another.

Global Accelerator is the answer when the path matters and the body must not be stored. Users enter through a nearby address of the accelerator, and the listener forwards to one or more endpoint groups, each anchored in a region. Nothing is cached, so an authenticated flow or a write keeps its semantics while the network path shortens.

A regional balancer is a complete answer for one country. The ALB from the previous article is a regional, multi-zone resource with host and path rules, and CLB is the older layer-4 and layer-7 option. Neither needs a CDN, a second TLS terminator or a purge procedure.

Scope is a compliance field that changes what the edge may serve. The CDN domain accepts domestic, overseas or global, and domestic is the default. A team outside China that omits the field asks for mainland acceleration, which then demands a filing for a domain that never needed one.

An ICP filing is a precondition of mainland acceleration, not a Terraform argument. A domain served from a mainland CDN or ECS must carry a filing, and no argument in the provider substitutes for it. Overseas scope skips the filing and serves mainland users from outside the boundary, which is a latency decision dressed as a compliance one.

A Cloudflare proxy in front of the CDN duplicates both decisions at once. Both layers terminate viewer TLS and both answer from cache, and the name no longer resolves to the CDN target, so CDN-side cache, logs and URL signing never see the request. The origin then sees Cloudflare rather than the CDN, which quietly changes what a back-to-origin allowlist means.

Cloudflare as authoritative DNS only is a clean split and a common one. The zone stays where the team already operates it, the CNAME is unproxied, and the Alibaba CDN remains the only terminator and the only cache. That is one owner per decision and one purge procedure.

The choice reduces to four questions. Is the audience inside mainland China, can the response be shared, must the body stay private, and does the domain already hold a filing? The first three point at a shape, and the fourth decides whether the mainland shape exists at all.

Scope also decides where the cached copy sits, and that is a residency statement. A domestic edge stores objects inside mainland China, an overseas edge stores them outside it, and a global edge does both. If anyone has to answer where a cached copy of a document lived, scope is the field that answers, so it belongs in the design record rather than in a console dropdown.

Cost follows the shape of the traffic, not the number of resources. CDN bills on transfer and request count at a rate set by scope, an accelerator bills on its specification plus transfer, and a balancer bills on capacity units and hours. The cheapest chain for a small static site is the one with the fewest moving parts, not the one with the most features.

ChainViewer TLSCacheOrigin protectionCharacteristic failure
CDN, domestic scopeCDN, mainland nodesCDNallowlist plus URL signingthe filing names another entity, so the edge never enables
CDN, global scopeCDN, both scopesCDNthe same controls, per scopecertificate uploaded in the other certificate region
Global Acceleratoraccelerator listenernoneendpoint group health checka layer-4 path treated as if it cached
Regional ALB onlyALB listenernonesecurity group on the balancera second region quietly needs a second balancer
Cloudflare proxy in frontCloudflare, then CDNtwo cachesCDN sees Cloudflarethe CNAME never reaches the CDN target

Read the table by its failure column. Each row fails in a different layer, so the remedy differs: a filing problem is paperwork, a certificate problem is a region, and a proxy problem is a record. Knowing which layer owns the failure is most of the diagnosis.

A delivery decision is also a rollback decision, and the two should be made together. A CDN can be taken offline and its record repointed, an accelerator can move traffic between endpoint groups by weight, and a balancer can be replaced by a record edit. Choose the shape whose undo you can perform at the hour the failure happens, not at the hour the design was approved.

Choose the Regional and Public Delivery Path
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','signalColor':'#5a6e82','noteBkgColor':'#c4873b','noteTextColor':'#132440','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    H["Hostname and workload"] --> Q1{"Served from mainland
China?"} Q1 -- "yes" --> ICP{"ICP filing held
for this domain?"} Q1 -- "no" --> Q2{"Same response for
every visitor?"} ICP -- "no" --> X1["Domestic scope refuses
to enable the domain"] ICP -- "yes" --> Q3{"Can the body
be cached?"} Q2 -- "yes" --> Q3 Q2 -- "no" --> GA["Global Accelerator
anycast entry, no cache"] Q3 -- "yes" --> CDN["CDN domain
CNAME to the edge"] Q3 -- "no" --> ALB["Regional ALB
TLS in one region"] CDN --> C1{"Certificate in the
matching cert region?"} C1 -- "no" --> X2["HTTPS config accepted,
no usable chain served"] C1 -- "yes" --> OK["Publish the CNAME
and verify the chain"] GA --> OK2["Record points at
the accelerator address"] ALB --> OK3["A record at the
balancer address"] classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class H,Q1,ICP,Q2,Q3,C1 primary; class CDN,GA,ALB,OK2,OK3 secondary; class OK ok; class X1,X2 danger;

Read the diagram from the filing question down. The filing decides whether a mainland edge exists, and the cache question decides whether the edge is a CDN or a path accelerator. The red branches are the two arrangements that look configured and never serve: a domain without a filing, and a certificate that lives in the other region.

The origin is still the only thing that decides the body, and that does not change with the chain. CDN and Global Accelerator both forward a request; neither knows what the application returns. A cache hit never reaches the origin, which is the entire benefit and the entire risk of putting anything in front of it.

Figure 1 draws the same decision as ownership: one chain with one terminator per layer, beside the proxied arrangement that breaks it.

One hostname chain with one owner per decision, beside a proxied chain that never reaches the CDN target The visitor resolves a name in an Alibaba Cloud DNS zone whose CNAME points at the target an Alibaba CDN domain returns; the CDN terminates viewer TLS, caches, and calls the origin ALB which runs a health check against the application. Below, a Cloudflare DNS-only arrangement keeps one owner, while a proxied arrangement answers with Cloudflare addresses so the CDN target is never contacted and the origin sees the proxy instead of the CDN. One hostname, one owner per decision Visitor one request Alibaba Cloud DNS CNAME to the edge CDN domain TLS, cache, URL signing Origin ALB health check, one region requester zone team edge team application team Viewer TLS: exactly one terminator Cache key: exactly one owner Origin admits the CDN, not the internet Clean split: DNS only Cloudflare zone only CDN domain TLS and cache Origin private The unproxied record returns the CNAME target the CDN assigned, so the edge can serve and be purged in one place. Duplicate edge: proxied Cloudflare proxy and cache CDN domain never contacted Origin sees the proxy The name answers with proxy addresses, so cache hits, URL signing and CDN logs describe traffic that never arrived. A second edge is justified by a capability the Alibaba edge lacks, not by symmetry. Two caches are two purge procedures, two log streams and two client addresses.

A second edge is a capability decision, and it should be written down as one. Bot management, an existing enterprise contract or a zone ruleset the Alibaba edge does not offer are legitimate reasons. "Both providers are already here" is not, because it doubles the surface without removing a single obligation.

Record Account, Region and Domain Prerequisites

Most delivery failures on Alibaba are prerequisites, and prerequisites are not in the plan. A filing, a delegation, a verified domain and a certificate in the right region are all satisfied outside Terraform, and each one turns a valid configuration into a domain that never serves. Record them as checked inputs with a date, the way the ECS article records stock.

The account site changes the menu, not only the price. The China site and the international site expose different products and different fields, and the provider documents some arguments as available only on a domestic account. Two engineers reading the same registry page can therefore disagree about what a resource accepts.

Real-name verification and the account's payment status gate almost everything. An account that has not completed verification can authenticate, plan and read, and still fail at the first create. That is worth confirming before a lab is scheduled, because it is a support ticket rather than a configuration change.

The account's site is recorded nowhere in the configuration, which is why it breaks a rebuild. The same code applied from a China-site account and from an international account can produce a field one of them rejects. Put the site beside the region in the README, and treat a rebuild in a different account as a port rather than a copy.

A domain has to be added to Alibaba Cloud DNS before Terraform can write a record into it. The domain resource proves control of the name, and the proof is a DNS answer, so a domain registered elsewhere needs either a delegation to this zone or a verification record published at the current provider.

Delegation is proved by name servers, and it is the step that silently fails. Until the registrar lists the zone's name servers, every record in the zone is invisible to the internet while the console shows it as saved. Resolve the name from a network outside the account before blaming the CDN.

An ICP filing belongs to an entity, a domain and a mainland hosting location. A filing for one domain does not automatically cover a second one, and a new brand or a new market usually means a new filing with its own lead time. That lead time belongs on the project plan next to the build, because no amount of apply time recovers it.

The filing is inspected when the domain is added, which makes a later lapse an operational risk rather than a plan error. Terraform never re-reads it, so a domain can plan cleanly for months and stop serving when the paperwork changes underneath it. Put the filing number in the runbook beside the domain name.

The DNS edition sets a hard floor on TTL, and the floor is much higher than most teams expect. A free zone cannot publish a short TTL, so a cutover that assumes sixty seconds will be wrong for ten minutes at a time. Check the edition before choosing the change window.

DNS editionMinimum TTLWhat a short window costs
Free600 sa record change is visible for at least ten minutes
Basic120 stwo minutes of mixed answers
Standard60 sone minute, the usual cutover floor
Ultimate10 sfast but still not instant
Exclusive1 sthe only edition that approaches per-second control

A certificate is regional in practice, because the upload target is. The certificate service keeps a domestic and an international region, and the CDN domain config names the region it should read from. A chain that is valid in one region is simply not a candidate in the other, and the failure appears at serve time rather than at create time.

Renewal repeats the same regional question a year later, when nobody is watching. The replacement chain lands in the region the upload targeted, and a CDN config pointing at the other region keeps serving the older chain until someone reads an expiry date. Automate the expiry check rather than the renewal alone.

The CDN domain also needs its own verification and its own quota. Adding a name to the CDN is a separate grant from adding it to DNS, and accounts have a ceiling on accelerated domains. Both are quick to check and expensive to discover during a launch.

Record Account, Region and Domain Prerequisites
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','signalColor':'#5a6e82','noteBkgColor':'#c4873b','noteTextColor':'#132440','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    A["Account and site"] --> B{"Real-name verification
complete?"} B -- "no" --> F1["Plan succeeds, first
create is refused"] B -- "yes" --> D["Domain added to
Alibaba Cloud DNS"] D --> NS{"Registrar delegates to
the zone name servers?"} NS -- "no" --> F2["Records exist, internet
asks the old provider"] NS -- "yes" --> ICP{"Mainland acceleration
needed?"} ICP -- "no" --> S2["Overseas scope
outside the filing"] ICP -- "yes" --> FIL{"Filing names
this domain?"} FIL -- "no" --> F3["Domestic scope cannot
be enabled"] FIL -- "yes" --> S1["Domestic or global
scope enabled"] S1 --> CR{"Certificate in the
matching region?"} S2 --> CR CR -- "no" --> F4["HTTPS configured,
no usable chain served"] CR -- "yes" --> T["TTL at the edition
floor for the cutover"] T --> OK["Domain ready for a
record change"] classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class A,B,NS,ICP,FIL,CR primary; class D,S1,S2,T secondary; class OK ok; class F1,F2,F3,F4 danger;

Every branch in that diagram is proved by a lookup, not by a Terraform plan. A plan can show a CDN domain and a certificate while the zone is undelegated and the filing is missing, because neither fact is an argument. Collect the four answers in one place and attach the date.

Version baseline. Behaviour was checked against Terraform CLI 1.17.1 and aliyun/alicloud 2.2.0 on 6 November 2026. Where a product document outruns the provider schema, the schema decides what Terraform can express.

Model CEN or Other Interconnection Only When Required

Most regional delivery needs no interconnection at all. A CDN fetches from its origin over the public network by default, and a GA endpoint group reaches a balancer in its own region. Neither implies a private link between regions, and adding one because the diagram has two boxes is how a delivery project acquires a monthly bandwidth bill nobody asked for.

CEN is a private-range product, not a public edge. It connects VPCs across regions and accounts through a transit router, so a request from one VPC reaches an address in another as if both were local. A user on the internet is not a CEN participant, and an accelerated hostname does not become one because its origin is attached.

The transit router is the routing plane, and attachments are the permission. A VPC attachment joins one VPC in one region, and the router learns its CIDR so pairwise routes disappear from your configuration. Cross-account attachment needs a grant in the owning account, which is a separate Terraform object rather than an argument.

Route learning is automatic inside an attachment, and that is the part nobody re-verifies. A subnet added inside an attached CIDR needs no new route, while a second VPC needs its own attachment even when it shares a range with nothing. The plan shows the attachment; the route table shows whether traffic actually moved.

A public edge over a private link is a common and expensive confusion. CEN carries traffic between VPCs; it does not shorten a user's path to the CDN or to a balancer. If users are slow and the origin is healthy, the missing piece is a closer origin or an accelerator, and a transit router will not change the number.

Cross-region capacity is purchased separately from the connection. A bandwidth package names a region pair and a capacity, and it must be attached before traffic crosses, so an attachment without a package is a route with no budget. Prepaid capacity also cannot be released mid-term, which makes the size a commitment rather than a setting.

Cross-border is a second gate on top of cross-region. A mainland-to-overseas path needs the account to be enabled for cross-border connectivity in addition to capacity, and the accelerator product exposes the same distinction as its own switch. Treat eligibility as an approval with a lead time, not as a field you can try.

Express Connect is the answer for volume, not for latency on its own. A dedicated line makes sense when a steady private flow is large enough to justify a port, and it is a commitment with a physical or virtual circuit behind it. A public website whose users are simply far away is a CDN or accelerator problem, and buying a line to fix it moves the cost without moving the symptom.

NeedProductCrosses an accountChargeable dimensionWhat it does not solve
Two VPCs, one pairVPC peeringoptionally, with acceptancedata transfera third VPC
Many VPCs across regionsCEN with a transit routeryes, with a grantbandwidth package and region pairpublic edge latency
Mainland to overseas, privateCEN cross-border bandwidthyes, with eligibilitypurchased capacityregulatory approval
A public entry near the userGlobal Acceleratornoaccelerator specification and transfercaching
A dedicated private lineExpress Connectyesport and line capacityanything public

Read the table from the left column, and stop at the first row that fits. A pair of VPCs with disjoint ranges is a peering, not a CEN. A growing estate that must cross accounts is a CEN. A public workload that needs a shorter path is an accelerator, and none of those answers makes the others true.

A multi-region active design needs one balancer per region, and that is a DNS or accelerator decision. An ALB is regional, so two regions mean two balancers and two endpoint groups. The steered record or the accelerator listener becomes the only object that knows both exist, and that is where failover is proved.

Configure DNS, Certificates and Cache Boundaries

Each surface gets one owner, and the ownership table is shorter than the resource list. The record belongs to the zone team, the chain to the security team, the cache rule to the edge team and the back-to-origin allowlist to the network team. A resource that two teams can edit is a resource with no owner.

SurfaceResourceOwnerWhat a second owner breaks
RecordDNS record plus the returned CNAMEzone teamtwo answers for one name
Certificatecertificate service plus the listener fieldsecurity teama chain served from the wrong region
Cache ruleCDN domain config, one per functionedge teama private page served from a shared entry
Back-to-origin allowlistsecurity group on the originnetwork teamthe origin reachable around the edge
PurgeAPI call, no resourceoperationsa stale object with no attributable change

The record is a CNAME, and the apex is the exception. A CDN domain returns a CNAME target, so a subdomain is a straight alias and an apex name is not, because a zone cannot put a CNAME beside its own name server records. Put the accelerated name on a subdomain and let the apex redirect or answer from the balancer.

Leaving the old address record beside the new alias is the classic half-cutover. Resolvers that cached the A record keep reaching the origin while everyone else reaches the edge, so the cache warms unevenly and the logs disagree. Remove the old record in the same change, and accept that the TTL is the only thing making the window finite.

A certificate has to be attached where the TLS handshake happens, and that is three different fields. The ALB listener takes a certificate block, the CLB HTTPS listener takes a certificate id, and the CDN domain takes a certificate configuration with a type and a region. Attaching the right chain to the wrong surface produces a listener that exists and does not serve.

The certificate cutover is two attachments, not one replacement. Attach the new chain beside the current one, move traffic, then remove the old entry, because a listener with no certificate is a listener that answers nothing. The removal is the step that gets skipped, and it is the one that leaves an expired chain in the path.

RecordTerminates viewer TLSCertificate fieldMismatch symptom
CNAME to the CDN targetCDN edgeconfig with type, id and regionchain missing in the named region
CNAME to the balancer nameALB listenercertificate block on the listenera default certificate is served
A at the balancer addressCLB HTTPS listenerserver certificate idhandshake fails or names the wrong host
CNAME to another providerthat providerthat provider's storeno Alibaba certificate is in the path

Read the row that matches your record type before touching a certificate. The field name changes with the surface, and a chain that is correct for one row is invisible to the next. Pairing the record with its terminator is what makes the certificate review short.

Cache rules are keyed by file type and by path, and the two answer different questions. A file-type rule covers images, scripts and media with one TTL, and a path rule carves out an exception for a directory that must not be stored. Each function is its own resource with its own name, so a second rule is a second object rather than an extra block.

A zero TTL is the bypass, and it should be written for every path that varies by visitor. Account pages, baskets and authenticated APIs belong in a path rule with no caching, not in a hope that the origin's headers are respected. The origin's directives are a second line of defence, and the edge rule is the first.

The cache key decides what is shared, and a query string is part of the key unless you say otherwise. Turning query-string retention off for a catalogue is a large hit-ratio win; doing it for a search endpoint serves one user's results to another. Set it per path rather than per domain.

Origin protection is a chain of three controls, and each one fails independently. The origin security group admits the published back-to-origin ranges rather than the internet, the origin checks the Host header it expects, and URL signing makes a copied link expire. Removing any one of them leaves a path that works and should not.

URL signing is a shared secret with a clock attached. The edge derives a signature over the path and an expiry, so a link copied into a chat window stops working on schedule, and the key rotation is the operational half of the feature. A signing key that never rotates is a permanent credential in every logged URL.

A health check on the CDN domain answers a different question than the balancer's. The CDN domain accepts a health-check URL, which tells the edge whether the origin is answering at all; the balancer's check decides which backend receives the miss. One describes availability, the other admission.

Purge is an operation, not a resource. No Terraform object invalidates a cached object, so the purge is a command against the CDN API and belongs in a runbook. That leaves a short TTL and a deliberate cache key as the only declarative controls you hold over freshness.

A directory purge is broader than the word suggests. It removes every variant of every path beneath it, which is the right tool after a template change and the wrong one after a single image replacement. Prefer the narrowest purge that fixes the object, and record what was purged so a second purge is not guessed.

Figure 2 shows the cache boundary as a failure path: one stored page, two visitors, and the rule that separates them.

A cached account page served to a second visitor, and the path rule that keeps it at the origin A request arrives at the CDN edge, which either answers from a stored copy or forwards the miss to the origin. In the failure panel a file-type rule caches HTML for ten minutes, so visitor A's account page is stored and served to visitor B. In the fixed panel a path rule sets a zero TTL for the account directory and the cache key retains the query string, so every request for that path reaches the origin. One request, one cache decision Request with a cookie CDN edge lookup by cache key Origin ALB miss only Cache hit the origin never runs Failure: one stored page, two visitors visitor A signed in HTML cached 600 s, by type visitor B sees A A file-type rule covers every page ending in the same suffix, including the one page that must never be shared between visitors. Fix: a path rule with no caching path /account/* more specific TTL 0 no store origin answers each The rule is narrower than the file type, so the catalogue keeps its hit ratio and the private path keeps its own behaviour. Order the rules by specificity: the path that must not be stored, then the file type that may be. A cache key without the query string turns a per-user result into a shared one, and no header at the origin repairs an entry that the edge already answered.

A cached page is not a configuration bug, it is a boundary that was never drawn. The rule that caches by file type is correct for a catalogue and wrong for an account page, and the two live under the same suffix. Draw the path boundary before the first TTL is written.

Prove a Request Path and Its Recovery Route

Evidence at the edge is a sequence, and each step answers a question the previous one cannot. Resolve the name, read the chain, request the same object twice, then request something the edge should refuse. A screenshot of a console page answers none of those questions, and a successful apply answers only that the API accepted the object.

The recovery route is part of the design, not an incident improvisation. Keep the origin's own name resolvable, write down the record value that existed before the cutover, and decide in advance whether recovery means repointing the alias or taking the CDN domain offline. A rollback nobody has timed is a hypothesis.

Give the recovery a named owner and a time budget. Who may edit the record at three in the morning, and how long the window is before the incident commander stops waiting, are decisions that must exist before the incident. The exercise in the card is where both get measured.

Evidence is only useful when the layers are separable. A single "it works" test proves the chain end to end and names no layer, while four small checks — resolution, chain, cache, refusal — each fail in one place. Collect the small ones, and the end-to-end result becomes a conclusion rather than a coincidence.

Lab

Prove a Request Path and Its Recovery Route

Status: design-only. No Alibaba Cloud account or credential was used to produce this article, and these steps were not executed here. Versions: Terraform CLI 1.17.1 and aliyun/alicloud 2.2.0, checked 6 November 2026.

Prerequisites. A sandbox account with real-name verification complete, one VPC with an ALB or CLB serving a static page and a private page behind a cookie, a domain you control that is delegated to an Alibaba Cloud DNS zone, a filing only if you intend to use mainland scope, and permission to manage DNS, CDN, certificates and security groups. Use a lab hostname with no customer traffic and put a budget alert on the account.

Minimal setup. One CDN domain accelerating the lab hostname toward the balancer, one certificate for that name, one file-type TTL rule for images, one path rule with no caching for the private directory, one client-IP allowlist entry, and a security group on the origin that admits only the published back-to-origin ranges.

ObjectLab value
DNS zonelab subdomain delegated to the Alibaba Cloud DNS name servers
CDN domainweb type, overseas scope unless a filing is in place
RecordCNAME at the lab name, pointing at the target the CDN returned
Certificateone chain, uploaded in the region the CDN config names
Cache ruleimage TTL long, private path TTL zero
Origin boundarysecurity group allows the back-to-origin ranges only
  1. Write the owner list. Five rows: zone, certificate, cache, back-to-origin allowlist, client address. One team per row, before anything is applied.
  2. Record the pre-change record value and its TTL. This is the rollback target; without it the recovery route is a guess made under pressure.
  3. Confirm the delegation. Query the zone's name servers at the registrar and resolve a harmless record you published, from a network outside the account.
  4. Apply the CDN domain and read back its CNAME target. Do this before the record exists, so the alias has a real target rather than a copied string.
  5. Publish the CNAME and wait out the TTL. Resolve the lab name until the answer is the CDN target, and note the time it took, because that is the real propagation window.
  6. Read the chain. Connect to the lab name with the server name set explicitly, and record the subject, the issuer, the validity window and the protocol version. A default certificate means the name never reached the listener.
  7. Prove the miss. Request the image once, read the response, and confirm the origin logged the request.
  8. Prove the hit. Request it again and confirm that the edge answered and that the origin logged nothing new. A second origin line means the object was never stored.
  9. Prove the cache key. Request the image with two different query strings. With the query string retained, expect a separate entry per variant and an origin request for the first of each, then none on the repeat.
  10. Prove the bypass. Request the private path twice with the session cookie and confirm both requests reach the origin. One origin line out of two means the path rule never applied.
  11. Prove the denial. Restrict the client-IP allowlist to an address you are not using, request the lab name, and confirm the edge refuses before the origin sees anything. Restore the list afterwards.
  12. Prove the origin boundary. Ask the origin's own name or address directly from outside the VPC and confirm it refuses, while the lab name still serves through the CDN.
  13. Rehearse the recovery. Repoint the CNAME at the origin's name, confirm the origin answers, then point it back. The origin has to serve the lab name with a valid chain already, which is why the listener certificate comes before the record change.
  14. Tear down in dependency order. Remove the record last, so the zone is not left with a name pointing at a deleted edge, and release the certificate only after the listener is gone.
CheckEvidence to collectPass conditionFailure signal
Delegationname-server answer at the registrarthe zone's servers are listedrecords save and never resolve
Aliasthe CNAME target returned by the CDNthe record answers with that targetthe name answers with proxy addresses
Certificatesubject, issuer, validity and protocolthe lab name is present and the chain is valida default certificate is served
Cache missfirst response plus the origin logone origin requestno origin line at all
Cache hitsecond response plus the origin logedge answers, no new origin linea second origin request
Cache keyorigin lines for two query stringsdistinct entries where expectedone entry shared across variants
Bypasstwo requests to the private pathboth reach the originthe second is served from cache
Denialresponse after the allowlist changerefused at the edgethe request reaches the origin
Origin boundarydirect call to the origin namerefused while the CDN servesthe origin answers the internet
Recoveryelapsed time from record change to servicethe origin serves within the stated windowthe window was never measured

Expected observation. A sequence rather than a duration: the record resolves to the CDN target, the chain names the lab host, the second image request produces no origin line, the query-string variants produce separate entries, both private-path requests reach the origin, the allowlisted edge refuses a client it does not know, the direct origin call is refused, and the repointed record serves from the origin until it is pointed back. Capture timestamps so the DNS, cache and firewall evidence can be joined afterwards.

Failure checks. A name that resolves but serves a default certificate points at a listener whose certificate field was never set, or at a chain uploaded in the other region. A cache that never hits points at a rule covering a different file type, or an origin sending a directive the edge honours. A private path that is cached on the second request means the path rule does not match the requested path, or a broader rule is answering first. An origin that answers directly means the security group still admits the internet, and a refusal that appears only after minutes is the allowlist propagating rather than a broken rule.

Cost dimensions. CDN is billed on transfer and request volume, with the scope changing the rate rather than the model; the certificate is free or subscription depending on its source; the balancer and its capacity units bill for the hours it exists; and DNS queries bill at a low per-million rate. A GA lab adds accelerator specification and transfer, which is the most expensive of the three to leave running.

Cleanup. Delete the record before the CDN domain, delete the CDN domain before the certificate it references, and remove the path and file-type rules with the domain. Detach or delete the allowlist entries so a later lab does not inherit a restriction nobody remembers, and keep the resolution output, the chain, the two cache responses and the refusal text as evidence rather than as infrastructure.

References (provider schema checked 6 November 2026):

  • alicloud_cdn_domain_new: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/cdn_domain_new
  • alicloud_cdn_domain_config: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/cdn_domain_config
  • alicloud_alidns_record: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/alidns_record
  • alicloud_ssl_certificates_service_certificate: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/ssl_certificates_service_certificate
  • alicloud_alb_listener: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/alb_listener
  • alicloud_slb_listener: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/slb_listener
  • alicloud_ga_accelerator: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/ga_accelerator
  • alicloud_cen_transit_router_vpc_attachment: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/cen_transit_router_vpc_attachment
  • alicloud_cen_bandwidth_package: https://registry.terraform.io/providers/aliyun/alicloud/2.2.0/docs/resources/cen_bandwidth_package
  • Alibaba Cloud CDN product documentation: https://www.alibabacloud.com/help/en/cdn
  • Alibaba Cloud CEN product documentation: https://www.alibabacloud.com/help/en/cen
  • Alibaba Cloud Global Accelerator documentation: https://www.alibabacloud.com/help/en/global-accelerator

Next in the Series

In Operate Alicloud: Imports, Deprecations, Quotas and CI Recovery, we'll explore Maintain Alibaba roots through schema changes, regional constraints and partially completed operations.