How to setup Amazon CloudFront CDN Free
What is CloudFront CDN? Why do we need? The main feature of CloudFront CDN is deliver your content from the nearest server. Basically, People uses CloudFront CDN for speed up our website and mostly load balancing because of speed is the most important factor in SEO.
CloudFront CDN setup is some tricky but you can create easily after reading 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 server they trade all the digital products. Read more about Amazon web services visit wiki aws(Amazon Web Services).
How can you setup 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 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 setup 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.
After creating aws account here is the step by step process to setup your aws CDN.
- First term,Type CloudFront in the search bar and you find service CloudFront and click on it.
- After clicking on the CloudFront, you see an option create Distribution click on this link.
- click on the web content delivery network
- You will see that fill your domain details, origin domain name which domain you want to surf with cdn.
as you see fill detail as I fill for my domain name.you can choose protocol policy which type you want.
- you can choose compress content via your cdn then choose yes.
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 according.
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 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.
Now all the process is done and click on create distribution. Now your cdn takes some time to start and after 10-15 minute 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 provide 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.
choose the provision cert. and click on get started.
Request a public cert. for you cname.
Put your domain name and then click on next.
now you created 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.
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 cdn.domain.com(which one you created in aws CloudFront.)
your CloudFront address must be this type- d43nczd.cloudfront.net
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 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 domain.com to cdn.domain.com.
You are working on CMS WordPress website then you setup it easily. WordPress empower with plugins. you can do almost anything with plugins they make things easy for users.
There are mainly two plugins which are widely used to connect the CDN to your website.
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 may be 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.
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.
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 access & secret id leave it as it is, don’t click on create distribution. Fill the CloudFront URL which one you created and also fill you 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.
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.
You can include directory which one you need to surf by your cdn. Click on the save setting and then you CDN must work properly
The Amazon CloudFront CDN setup is easy as I describe here I assume that all the doubt has cleare. 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 always with you.
I also use CloudFront CDN to surf my wordpress website Please subscribe to my blog to get the latest articles directly into your inbox.