Once the above steps are taken care of, you will need to determine your S3 bucket URL. To do this prepend your region to ‘.amazonaws.com’ and append your bucket name. For example:
Next, login into your MaxCDN control panel and create a new Pull Zone, ensuring you enter a unique name and your S3 bucket URL:
On success, you will be greeted with the following notice:
With MaxCDN configured, let’s move onto WP Offload S3.
Configure WP Offload S3
Login to your WordPress dashboard and navigate to AWS > S3 and CloudFront. Scroll down to the Domain option and check CloudFront or custom domain. Enter your CDN URL, which can be found from the MaxCDN zone configuration page (pictured previously).
Save the changes and clear your page cache if you have one enabled.
Testing Everything Works
Upload a new image to your Media Library and then open it in a new tab (Right click and select Open Image in New Tab). Bring up the Developer Tools by hitting CMD ALT I and navigate to the Resources tab. After refreshing the image a few times (at least twice in order for MaxCDN to store it within it’s cache), the following headers should be added to the response:
- Server: NetDNA-cache/*
- X-Cache: HIT
If those values match, your content is now successfully being served from MaxCDN. If not, go back and check through the previous steps.
If you wish to use a custom domain instead of the one provided by MaxCDN, please follow these steps.
Add a new CNAME within your DNS control panel, which points to the CDN URL.
After allowing ample time for the DNS changes to propagate, log into your MaxCDN account and navigate to the desired Pull Zone. On the settings tab add your custom domain.
Log back into your WordPress dashboard and navigate to the WP Offload S3 screen. Update the custom domain field with the new value.
If you wish to use a CNAME alongside HTTPS, you will need to setup SNI, which can be found from the EdgeSSL tab within your zone control panel.