Purge an Azure Content Delivery Network endpoint
Important
Azure CDN Standard from Microsoft (classic) will be retired on September 30, 2027. To avoid any service disruption, it is important that you migrate your Azure CDN Standard from Microsoft (classic) profiles to Azure Front Door Standard or Premium tier by September 30, 2027. For more information, see Azure CDN Standard from Microsoft (classic) retirement.
Azure CDN from Edgio will be retired on Januray 15, 2025. You must migrate your workload to Azure Front Door before this date to avoid service disruption. For more information, see Azure CDN from Edgio retirement FAQ.
Azure Content Delivery Network edge nodes cache contents until the content's time to live (TTL) expires. After the TTL expires, when a client makes a request for the content from the edge node, the edge node will retrieve a new updated copy of the content to serve to the client. Then the refreshed content in cache of the edge node.
The best practice to make sure your users always obtain the latest copy of your assets is to version your assets for each update and publish them as new URLs. Content delivery network will immediately retrieve the new assets for the next client requests. Sometimes you may wish to purge cached content from all edge nodes and force them all to retrieve new updated assets. The reason might be due to updates to your web application, or to quickly update assets that contain incorrect information.
Tip
Note that purging only clears the cached content on the content delivery network edge servers. Any downstream caches, such as proxy servers and local browser caches, might still hold a cached copy of the file. It's important to remember this when you set a file's time to live. You can force a downstream client to request the latest version of your file by giving it a unique name every time you update it, or by taking advantage of query string caching.
This guide walks you through purging assets from all edge nodes of an endpoint.
Purge contents from an Azure CDN endpoint
In the Azure portal, browse to the CDN profile containing the endpoint you wish to purge.
From the CDN profile page, select the purge button.
On the Purge page, select the service address you wish to purge from the URL dropdown list.
Note
You can also get to the purge page by clicking the Purge button on the content delivery network endpoint blade. In that case, the URL field will be pre-populated with the service address of that specific endpoint.
Select what assets you wish to purge from the edge nodes. If you wish to clear all assets, select the Purge all checkbox. Otherwise, type the path of each asset you wish to purge in the Path textbox. The following formats for paths are supported:
- Single URL purge: Purge individual asset by specifying the full URL, with or without the file extension, for example,
/pictures/strasbourg.png
;/pictures/strasbourg
- Wildcard purge: You can use an asterisk (*) as a wildcard. Purge all folders, subfolders and files under an endpoint with
/*
in the path or purge all subfolders and files under a specific folder by specifying the folder followed by/*
, for example,/pictures/*
. - Root domain purge: Purge the root of the endpoint with "/" in the path.
Tip
Paths must be specified for purge and must be a relative URL that fit the following RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax.
In Azure CDN from Microsoft, query strings in the purge URL path are not considered. If the path to purge is provided as
/TestCDN?myname=max
, only/TestCDN
is considered. The query stringmyname=max
is omitted. BothTestCDN?myname=max
andTestCDN?myname=clark
will be purged.
- Single URL purge: Purge individual asset by specifying the full URL, with or without the file extension, for example,
Select the Purge button.
Important
Purge requests take approximately 2 minutes with Azure CDN from Edgio (standard and premium). Azure Content Delivery Network has a limit of 100 concurrent purge requests at any given time at the profile level.