Purge cache by hostname
Purging by hostname means that all assets at URLs with a host that matches one of the provided values will be instantly purged from the cache.
- Log in to your Cloudflare dashboard ↗, and select your account and domain.
- Select Caching > Configuration.
- Under Purge Cache, select Custom Purge. The Custom Purge window appears.
- Under Purge by, select Hostname.
- Follow the syntax instructions:
- One hostname per line.
- Separated by commas.
- You can purge up to 30 hostnames at a time.
- Enter the appropriate value(s) in the text field using the format shown in the example.
- Select Purge.
Purging by hostname deletes the resource, resulting in the CF-Cache-Status
header being set to MISS
for subsequent requests.
If tiered cache is used, purging by hostname may return EXPIRED
, as the lower tier tries to revalidate with the upper tier to reduce load on the latter.
Depending on whether the upper tier has the resource or not, and whether the end user is reaching the lower tier or the upper tier, EXPIRED
or MISS
are returned.