How to setup Amazon CloudFront CDN for Free

Setup amazon cloudfront cdn free


Cloudfront CDN
Source: Amazon AWS

What is CloudFront CDN? Why do we need it? The main feature of CloudFront CDN is to deliver your content from the nearest server. Basically, People use CloudFront  CDN to speed up our website and mostly load balancing because speed is the most important factor in SEO.

CloudFront CDN setup is some tricky but you can create easily after reading a fully detailed article.

In the online market, you can see that the prices of CDN are very high if you want to use CDN free then you must try amazon CDN that is best and supercharge your website in the low price in there you need to pay whatever you will use. Amazon is the largest seller of servers they trade all the digital products. Read more about Amazon web services visit wiki AWS(Amazon Web Services).

How can you set up CDN on CloudFront in amazon AWS

you need an account of amazon AWS, Amazon gives 12 months free tier to our customers you can take the benefits of the free tier.

You can read all free tier information on their own page they provide many services in the free tier. you get the CloudFront also in this free tier for 1 year. you will get the benefits in the CloudFront is

  • 50 GB of Data Transfer Out
  • 2,000,000 HTTP or HTTPS Requests

These benefits are a lot. if you are starting a blog and you have no earning then you can use it in the free tier after the free tier charge applies according to use How much data transfer through CloudFront.

You need to set up CloudFront in AWS manager, first of all, you need to create an AWS account and need to verify it.  In the verify term they want to verify your debit/credit card to deduct 2rs from your account and after 3-4 days they return the money to your account. 

Cloudfront setup

After creating an AWS account here is the step-by-step process to set up your AWS CDN.

  • First-term, Type CloudFront in the search bar and you find service CloudFront and click on it.
cloudfront Search console
Source: Amazon AWS
  • After clicking on the CloudFront, you see an option to create a Distribution click on this link.

Cloudfront create Distribution


  • Click on the web content delivery network
Cloudfront Select delivery method
Source- Amazon


  • You will see that fill your domain details, an origin domain name which domain you want to surf with CDN.
Create Distributioin
Source: Amazon AWS


as you see fill detail as I fill for my domain can choose the protocol policy which type you want.


  • you can choose compress content via your CDN then choose yes.
cloudfront cdn
Source: Amazon AWS

All fields will be auto-filled if you want any changes in these fields you can change easily. If you want to change TTL that is the cache expiring time you can choose your accordingly.

If you have a streaming website you can choose smooth streaming that helps you to refrain from buffering.

  • Choose the alternative Cname of your domain who is the image of the CloudFront CDN URL. images and script surf through your Cname. If you do not want t make a Cname usually you can choose the CloudFront address to surf your website.

Cloudfront CDN

Now all the process is done and clicks on create a distribution. Now your CDN takes some time to start and after 10-15 minutes your CDN will be ready to use.

Also, Read –  Bluehost Web Hosting Review 2018

Using the https website

If you are using a fully secure https website and you are using cname for surf your content then you need an SSL certificate for your cname.

Aws provides free SSL for cname or our hosted domain name that if you host your domain on Amazon then they give you free SSL.

 How to activate SSL on Cname

You need to create an SSL certificate by using aws certificate manager. open the aws certificate manager.

Aws certificate manager(ACM)

choose the provision cert. and click on get started.

Amazon certificate manaer
Source Amazon aws

Request a public cert. for your Cname.

Public certificate
Source Amazon AWS

Put your domain name and then click on next.

now you created a free SSL cert. please verify your domain via DNS or email which you want.

After validation, you need to set it on your CDN click on the edit distribution, and choose the custom SSL certificate. Under the custom cert. you will find cert. which one you created in AWS certificate manager.

Click on the certificate and apply the settings. It will take some time to activate your cert.

Cname Setup

You need to set up your cname like cdn.yourwebsite.tld. you need to add a cname record in your dns records.

for exa- you cname is one you created in aws CloudFront.)

your CloudFront address must be this type-

Create a Cname DNS record in your DNS manager and put the value in DNS manager that is in your hosting panel.

You have successfully created your cdn if have any error that occurs in any above-listed steps please inform me as soon as I will help you.

Connect to your website

Now the last point, connect the CDN to your website. If you are using an Html coding website then you need to change the source code of the website and change it to your new URL like to

You are working on a CMS WordPress website then you setup it easily. WordPress empowers with plugins. you can do almost anything with plugins they make things easy for users.

There are mainly two plugins that are widely used to connect the CDN to your website.

  1. W3 Total Cache
  2. Wp Super Cache

I recommend using any one of these two plugins. These are the caching plugin that provides the of cache your content and that makes your website speed and reduce server load also.

Setup in W3 Total Cache 

If you have a WordPress website maybe read the name of this plugin because this is a famous plugin and 1 million + installed.

First of all, go to the performance tab in the left side of your WordPress dashboard and click on general setting.

W3 tota cache CDN tab
source: W3 total cache

Scroll down and seek the cdn offset. check on enable CDN and select the Amazon CloudFront in pull zone.

now save the settings and purge caches.

After that, you have seen a message on the top of dashboard like that.

W3 total cache
Source: W3 total cache

Click on specify here.

Now that the point if you have not created a CDN in the AWS manager then you can create it through w3 total cache plugin to create access and secret id by IAM manager in AWS console.

If you followed these steps which I write in above then you need to fill in access & secret id leave it as it is, don’t click on create a distribution. Fill the CloudFront URL which one you created and also fill your Cname and save settings.

WP Super Cache

Wp super cache is easy to use you can easily set up. install the plugin and go to setting and Wp Super Cache.

wp super cache
Source: Wp super cache

Click on the CDN tab.

Click enable CDN support and fill your site URL as I filled in the off-site URL put your cname record you can put there CloudFront CDN URL which you find in the Amazon aws console.

Cdn setup
Source: WP super cache

You can include a directory which one you need to surf by your CDN. Click on the save setting and then you CDN must work properly

Final Word

The Amazon CloudFront CDN setup is easy as I describe here I assume that all the doubt has cleared. Cloudfront CDN boosts the speed of your website. In the blogging field almost top blogger using CDN for boosting up your site performance.I assume that all the doubt must be cleared, In these steps, you face any problem please comment below. I also use CloudFront CDN to speed up my WordPress websites.


About Sonu

Hey, I'm Sonu Yadav a passionate blogger, I am working on blogs from  2016 and write here about Wordpress, SEO, Internet and much more. My main motive to provide quality information to our visitors and other resources. You can like and follow us on Twitter and Facebook.

View all posts by Sonu →

3 Comments on “How to setup Amazon CloudFront CDN for Free”

  1. Outstanding pߋst however I was wannting to know if yοu could write a
    litte more on this subject? I’d be very grateful if you couⅼd elaborate a ⅼittle bit moгe.

    Thank you!

  2. After Implementing on my website CSS file are not loading.
    When I see my website on the mobile search icon, Menu icon and social sharing icon are not loading. Please, can you help me to solve this problem?

Leave a Reply

Your email address will not be published. Required fields are marked *