KeyCDN
KeyCDN is a content delivery network with a straightforward zone-based pricing model and a public API. WP Media Cloud integrates with KeyCDN to rewrite media URLs to your KeyCDN zone and pull bandwidth statistics into the Dashboard tab. KeyCDN can be used as a CDN layer in front of any storage provider WP Media Cloud supports.
Before you start#
You will need:
- A KeyCDN account at keycdn.com.
- A KeyCDN Pull Zone pointed at your storage bucket’s public URL.
- Your KeyCDN API key.
- Your storage provider already configured in WP Media Cloud with a working connection test.
Step 1: Create a KeyCDN pull zone#
Log in to the KeyCDN dashboard and go to Zones. Click Add Zone. Configure the zone as follows:
- Zone Name — a unique name for the zone
- Zone Type — select Pull
- Origin URL — the public URL of your storage bucket. For example:
- Amazon S3:
https://[bucket-name].s3.[region].amazonaws.com - Wasabi:
https://s3.[region].wasabisys.com/[bucket-name] - Backblaze B2: your bucket’s public URL
- DigitalOcean Spaces:
https://[space-name].[region].digitaloceanspaces.com - Hetzner:
https://[bucket-name].[region].your-objectstorage.com
- Amazon S3:
Click Save. KeyCDN will provision a zone URL in the format [zone-name]-[hash].kxcdn.com. Note the Zone ID and zone URL — you will need both.
Step 2: Find your API key#
In the KeyCDN dashboard, go to Account > API. Copy your API key. KeyCDN uses HTTP Basic authentication with the API key as the username and x as the password. WP Media Cloud handles this automatically — you only need to provide the API key.
Step 3: Configure KeyCDN in WP Media Cloud#
In your WordPress admin, go to WP Media Cloud > Settings and find the CDN section for your storage provider. Select KeyCDN as the CDN type. Enter the following:
- API Key — your KeyCDN API key
- Zone ID — the numeric ID of your pull zone, shown in the KeyCDN dashboard
- Zone URL — the zone URL in the format
https://[zone-name]-[hash].kxcdn.comor your custom domain if you have one configured
WP Media Cloud can fetch your zones automatically using your API key. If the wizard is available for your provider, entering the API key and clicking the zone fetch button will list your zones and populate the Zone ID and Zone URL fields.
Save settings. All media URLs will be rewritten to use your KeyCDN zone URL.
Step 4: Test CDN delivery#
Go to Media > Library, click on any offloaded image, and check the file URL in the attachment details panel. It should show your KeyCDN zone URL rather than the direct bucket URL. Open the URL in a browser to confirm the file loads.
Dashboard analytics#
When KeyCDN is configured as your CDN, WP Media Cloud’s Dashboard tab shows bandwidth statistics pulled from the KeyCDN API:
- Total bandwidth — total bytes delivered through the zone over the selected period
- Bandwidth chart — daily bandwidth breakdown (cached bytes plus uncached bytes combined) for the last 7 days
Storage size and file count are not available from the KeyCDN API and are not shown. The Dashboard shows your local offloaded file count instead.
Troubleshooting#
CDN URL is not rewriting
Confirm the Zone URL is entered correctly in WP Media Cloud settings without a trailing slash. Save settings and reload a page with media to confirm.
Zone URL returns 404 for files
The Origin URL in your KeyCDN pull zone is incorrect. Confirm the origin URL matches the public URL structure of your bucket and that the bucket is publicly accessible. Test the origin URL directly in a browser before checking the CDN layer.
API key not accepted
Confirm the API key is copied correctly from Account > API in the KeyCDN dashboard. KeyCDN API keys are alphanumeric and case-sensitive.
Zone list not loading in the wizard
WP Media Cloud calls the KeyCDN zones API to list your zones. If the list does not load, confirm your API key is correct and that your server can make outbound HTTPS connections to api.keycdn.com.
Dashboard shows no bandwidth data
Confirm the Zone ID is correctly entered in settings. If the zone is new, KeyCDN may not have any traffic data to report yet. Bandwidth stats appear once traffic has been served through the zone.