Set Up a CDN Using Amazon CloudFront | How To SEO


Set Up a CDN Using Amazon CloudFront | How To SEO

Set Up a CDN Using Amazon CloudFront –

Sometimes using a caching plugin alone isn’t enought to get your WordPress page speed to a reasonable level. Fortunately Amazon CloudFront can be used as an easy and affordable way to improve load times considerably.

To watch the first of two parts, go here:

In this video, I show how to setup a CDN using Amazon CloudFront with about 10 minutes of work.

You will need:
– W3 Total Cache
– Amazon S3 Account (for CloudFront)
– Access to your Domain DNS Editor

Before you start, be sure to run a test on your site at to create a point of reference.

1. Login to Amazon account
2. Click on name in top corner and then click on Security Credentials
3. Click Access Keys and copy the Access Key ID
4. Click the Show button for Secret Access Key (or retrieve if you already have one). Copy this key.
5. Go to WP – Performance – General Settings
6. Scroll to section marked CDN Type and select Amazon CloudFront from the Origin Pull area. Now check Enable – Save all settings
7. Performance – CDN – Scroll to Configuration
8. Enter Access Key ID and Secret Key from Amazon S3
9. Click Create Distribution

10. Go back to Amazon and navigate to CloudFront console
11. You should see the new Distribution in the Distribution List
12. Wait until the Status goes from In Progress to Active (10 min)
13. Click on the “i” icon and then copy the domain that has been assigned in the General tab

14. Go to your Cpanel, scroll to Domains section, and select Simple DNS Zone Editor
15. Create an alias in the Name field for the CNAME
16. Enter the original URL from CloudFront in the CNAME field then click Add CNAME Record

17. Go back to CloudFront and click the “i” button, then edit under the General tab.
18. Enter your CNAME into the box labeled “Alternate Domain Names (CNAMEs)” then click the Yes Edit box in the bottom right corner

19. Return to W3 Total Cache to the CDN tab
20. Add the CNAME that you created in the box “Replace site’s hostname with:” #1. Then Save All Settings
21. Click Test CloudFront Distribution and it should turn green
22. Enable the settings to be cached and served by the CDN under the General settings area (same screen). Recommended settings are:

– Host attachments
– Host wp-includes/files
– Host theme files
– Host custom files

Save All Settings

Now just refresh your home page and right click to view page source. You should see most of your website files are pointing to your CDN URL.

NOTE: After step #21 it will take another 10 to 15 minutes before the Amazon server has fully deployed. During this time your site will appear broken. RELAX!!! It’ll be fine once the server fully deploys.

Now go check your site at GT Metrix to see how much of an improvement the CDN has made.

Keep up to date with all my SEO training videos here:

For more How To SEO training videos, subscribe to my YouTube channel:

Bradley Benner —
Video Rating:5

Validate wordpress site with w3c validator easily

Validation of WordPress site with is important for SEO. In this video tutorial you will learn how to validate a Wordpres site with W3 validator easily.
Video Rating:5


  1. followed ur tuto and after everything is green on the amazon cloud thing, my website is screwed. like everything is messed.

    what do you reckon should be done. i turned off cdn and everything is back to normal

  2. Wow! Wow! Wow! My site went down from 11.29 sec to 1.85 secs. Can't believe how easy it was to follow these very clear steps… Thanks for sharing this Bradley… You are the man…!!! 🙂 Wish I could upload screenshots of the before and after times… All pages loading in under 2 secs – even the gallery page with 71 images… Check the after results for yourselves at – Thanks again Bradley – I would never have figured this out by myself!

  3. Hi what settings should I use in w3 total cache and amazon cloudfront to ensure that my SEO info isn't affected?

  4. Hey,

    This tutorial was awesome, however I found that after following through with these steps some of the icons used on my page disappeared. Do you have any suggestions on how to fix this?

  5. You video saved my ass. I am not a tech savvy person and I was soooo stuck. Now I am enlightened and going hot dog. i came close to setting it up right but forgot to add the cname even though i read you have to add it. So many ways to do things it makes you pass out. What a feeling to see the deployed done show up and the site isn't crashing. yeehaw

  6. Hello, maybe someone can help me, when I click "create distribution", it just says "Creating…" and doesn't do anything. It's been 20 minutes since I clicked and still creating…

  7. Hi, Great Video Bradley, btw for the wordpress site, is it better use amazon ec2 or amazon rds?

  8. Hey Bradley, there's a new Bucket field in the W3 CDN section now. When leaving it blank and trying to Test the setup, I get "Error: Empty bucket." But when trying to create a bucket with the provided button, it also doesn't work and gives the same message. Any ideas? Thanks 🙂

  9. my page went from 81 to 85% but the Gtmatrix is still showing the "Use a Content Delivery Network (CDN)" box  empty….Âż?

  10. Excellent tutorial. I can definitely notice a difference in speed, but my GTmetrix (and pingdom) speed test results are still poor. Any thoughts?

Comments are closed.