After you add an accelerated domain name to Alibaba Cloud CDN and configure the CNAME record, use the following methods to verify that your content is being served from CDN edge nodes.
Prerequisites
Before you verify, make sure that you have completed the following:
Added your accelerated domain name in the CDN console.
Configured the CNAME record at your DNS provider to point to the Alibaba Cloud CDN-assigned CNAME value. If CNAME is not effective, see CNAME configuration FAQ.
Allowed sufficient time for DNS propagation (typically 5 to 10 minutes, depending on the TTL configured at your DNS provider).
Verified that the origin server is accessible: If DNS resolution succeeds but the domain returns HTTP 404 or other error responses, verify that the origin server is running and serving the expected content. Access the origin server directly by its IP address or origin domain name to confirm availability.
Confirmed that DNS uses a CNAME record (not an A record): CDN acceleration requires a CNAME record pointing to the CDN-assigned CNAME value. If an A record (pointing directly to an IP address) is configured instead of a CNAME record, requests bypass CDN and go directly to the IP address. Check your DNS configuration at your DNS provider and ensure a CNAME record is used for the accelerated domain name. Also verify that the cache rules in the CDN console are configured correctly for your content types.
Verification methods
The following methods validate different aspects of CDN effectiveness. Start with the quickest check and proceed to more comprehensive verification.
Method 1: Check the frontend URL
Open your webpage and view the page source. Check the URLs of static resources such as images, CSS files, and JavaScript files.
If the resource URLs use the CDN accelerated domain name (for example,
https://cdn.example.com/image.png), your frontend is configured to use CDN.If the resource URLs still point to the origin server address (for example, an OSS endpoint such as
https://oss-bucket.oss-cn-hangzhou.aliyuncs.com/image.png), requests bypass CDN entirely and no traffic flows through CDN nodes.
This is the quickest check. If URLs do not use the CDN domain, update your frontend resource references before proceeding to other methods.
Method 2: Verify CNAME resolution
Check the CDN console to confirm that CNAME Status is Configured and Domain Name Status is Enabled.
Run one of the following commands, replacing <accelerated domain name> with your domain:
nslookup -type=CNAME <accelerated domain name>or
dig +short <accelerated domain name> CNAMEFor example:
nslookup -type=CNAME www.example.comA successful response looks similar to the following:
www.example.com canonical name = www.example.com.w.kunlunaq.comCompare the returned CNAME value (for example, www.example.com.w.kunlunaq.com) with the CNAME displayed in the CDN console. If the values match, DNS resolution has been redirected to Alibaba Cloud CDN nodes.
If no CNAME is returned or the value does not match the CDN console, the CNAME configuration has not taken effect. Check whether you correctly configured the CNAME record at your DNS provider.
Method 3: Check cache headers in the browser
Open a page under the accelerated domain name in your browser. Open Developer Tools (press F12) and inspect the response headers for a static resource such as an image or CSS file.
If the response includes headers such as X-Cache, X-Swift-SaveTime, or Age, Alibaba Cloud CDN is serving the content. The key header to check is X-Cache.
X-Cache:
HITmeans the response was served from the CDN cache.MISSmeans the content was fetched from the origin server. AMISSon the first request is expected;HITon subsequent requests confirms that caching is working.Age: The time, in seconds, that the file has been cached on the CDN node. This header is absent on the first request or after a cache refresh. A value of
0indicates that the cache has expired and the origin server must be contacted for revalidation.X-Swift-SaveTime: The time (GMT) when the resource was first cached on the CDN node. Add 8 hours to convert to China Standard Time (CST).
X-Swift-CacheTime: The maximum allowed cache duration for the file on the CDN node. A value of
0indicates that the response cannot be cached.EagleID: An Alibaba Cloud CDN-specific response header. Open your browser Developer Tools (
F12), go to the Network panel, and select a request to your accelerated domain name. In the Response Headers, look for theeagleidfield. If this field is present, the request reached an Alibaba Cloud CDN node. If the field is absent, the request may not be passing through CDN — for example, it could be going directly to the origin server or being served from a local cache.
The EagleID header is useful for confirming that a request reached a CDN node even when X-Cache shows MISS (first request). If neither EagleID nor other CDN-specific headers are present, the request is likely not routing through CDN at all.
Troubleshooting tips
Browser not showing CDN response headers: The browser may be using a local cache instead of making an actual network request. Press
Ctrl+Shift+R(Windows/Linux) orCmd+Shift+R(macOS) to perform a hard refresh, or open the page in an incognito/private window.DNS cache causing stale resolution: Your local DNS cache may retain old resolution results, causing requests to bypass CDN nodes. Flush your local DNS cache and try again:
Windows:
ipconfig /flushdnsmacOS:
sudo dscacheutil -flushcacheLinux:
sudo resolvectl flush-caches
If flushing the cache does not resolve the issue, try switching to a public DNS server (such as
8.8.8.8or114.114.114.114) for testing. This helps rule out issues with your ISP's DNS resolver.This step also applies to the following scenarios:
DNS_PROBE_FINISHED_NXDOMAINerrors in the browser, which typically indicate that DNS resolution has failed for the domain.Domain remains unreachable after CDN service renewal or configuration changes — stale DNS cache entries may cause the old (pre-CDN) resolution to persist.
Verify you are using the correct domain: Make sure you access resources using the CDN accelerated domain name (for example,
cdn.example.com), not the CDN-assigned CNAME address (for example,cdn.example.com.w.kunlunaq.com). The CNAME address is only used for DNS configuration at your DNS provider and should not be used directly in browser URLs or resource references.
Method 4: Monitor domain traffic in the console
Log on to the CDN console. Go to the Domain Names page and select the accelerated domain name to view the traffic curve. Select a time range that covers the period after you configured the CNAME record.
If the traffic curve shows data, requests are passing through CDN nodes and CDN is in effect.
If there is no traffic data, either the domain is not receiving requests, or requests are not routing through CDN.
Method 5: Compare performance with network diagnostic tools
To verify the overall acceleration effect, compare the response times of your CDN-accelerated domain and the origin server:
Open the One-time Test Tool.
Enter the CDN-accelerated domain name and run a test. Note the average response time.
Enter the origin server domain name and run the same test.
Compare the two results. If the CDN-accelerated domain shows lower latency or higher availability, CDN acceleration is effective.
FAQ
The CDN console shows CNAME is configured, but the domain is inaccessible or DNS resolution fails
If the CDN console shows that the CNAME status is Configured but the domain is not accessible, follow these troubleshooting steps:
Verify that the origin server is working: Bypass CDN and access the resource directly through the origin server IP or origin domain name to rule out an origin server failure. If the origin server itself is not accessible, resolve the origin issue first.
Check the domain status: In the CDN console, confirm that the accelerated domain name status is Enabled. If the domain has been disabled due to overdue payment or a policy violation, CDN acceleration does not take effect. After you renew the CDN service, acceleration typically resumes without requiring reconfiguration.
Flush local DNS cache: Your local DNS cache may retain old resolution results. Run the following commands to clear the cache, then try again:
Windows:
ipconfig /flushdnsmacOS:
sudo dscacheutil -flushcacheLinux:
sudo resolvectl flush-caches
Wait for DNS propagation: If you recently added or modified the CNAME record, it may take 5 to 10 minutes for the change to propagate globally. Wait and verify again.
The CNAME is configured at the DNS provider, but the domain is still inaccessible
Pointing your DNS to the Alibaba Cloud CDN CNAME address does not mean CDN acceleration is fully configured. CDN requires both of the following conditions to function correctly:
Add the accelerated domain name in the CDN console: Log on to the CDN console, navigate to the Domain Names page, and add the accelerated domain name with the correct origin configuration.
Configure the CNAME record at your DNS provider: Point the domain's DNS resolution to the CNAME address assigned in the CDN console.
If you only completed step 2 (DNS configuration) without adding the domain in the CDN console, CDN nodes cannot recognize requests for this domain and the service does not take effect. Confirm that the domain has been added to the CDN console and that its Status is Enabled.
After configuring CDN, images load slowly or resources are not accelerated
CDN only accelerates resources that are requested through the CDN accelerated domain name. It does not automatically replace resource URLs in your website code. If loading remains slow after CDN configuration, follow these steps:
Check resource URLs: Open your browser Developer Tools (
F12) and check the Network panel. Inspect the request URLs for images, CSS, and JavaScript files. If these URLs still point to the origin server address (for example, an OSS endpoint or source IP), those resource requests are not passing through CDN.Update resource references: Ensure that the static resource URLs in your frontend code use the CDN accelerated domain name. For example, change
https://oss-bucket.oss-cn-hangzhou.aliyuncs.com/image.pngtohttps://cdn.example.com/image.png.Verify CDN is serving the resource: Access a specific resource through the CDN accelerated domain name, then check the response headers in Developer Tools. If the
X-Cacheheader value isHIT, the resource is being cached and served by CDN.
Troubleshoot DNS resolution conflicts and configuration errors
If CDN does not take effect due to DNS misconfiguration, check the following common scenarios:
Multiple CNAME conflicts: If the same hostname has multiple CNAME records, DNS resolution conflicts occur and requests may go directly to the origin server. To resolve this, disable any CNAME records that do not point to Alibaba Cloud CDN. Ensure only one CNAME record exists for the hostname.
Wildcard domain and subdomain conflicts: After configuring wildcard domain acceleration (for example,
*.example.com), if individual subdomain DNS records exist separately (for example, a specific A or CNAME record forwww.example.com), those subdomains may not be served through CDN. To resolve this, delete the individual subdomain DNS records and wait approximately 10 minutes for DNS changes to take effect.Third-party DNS or NS record conflicts: If you use a third-party DNS service such as Cloudflare and encounter errors like
Error 1001, or if your NS records do not point to Alibaba Cloud DNS, requests may be intercepted or fail to reach Alibaba Cloud CDN nodes. To resolve this, verify the authoritative DNS servers (NS records) for your domain and ensure they point to Alibaba Cloud DNS, or correctly configure the CNAME record for CDN access. Clear your local DNS cache after making changes.Missing HTTPS configuration: If HTTPS access fails but HTTP access works normally, an SSL certificate has not been configured for the domain in CDN. Log on to the CDN console, go to Domain Names, select the target domain, and configure the SSL certificate under HTTPS.
Troubleshoot CDN status anomalies or no traffic
If the CDN console status does not match expected behavior or monitoring shows no traffic, check the following:
CNAME status switches frequently: This may be caused by DNS configuration conflicts or incomplete DNS propagation. NS record changes can take up to 48 hours to fully propagate. If you see HTTP 304 status codes, this is normal caching behavior — it indicates that the resource has not been modified since the last request. To force a full page refresh, press
Ctrl+F5in your browser or test in an incognito/private window.Monitoring shows no traffic: Beyond DNS conflicts, verify that requests are using the CDN-accelerated domain name rather than the origin server address. Use a second-level domain name to configure CDN for testing. Test in an incognito/private browser window to eliminate browser cache interference.
Domain expiration: If the domain name has expired or has registration issues, DNS resolution to CDN nodes fails regardless of CDN configuration. Check the domain expiration date using the Alibaba Cloud WHOIS lookup service.