How To Intergration Aws CloudFront CDN With Magento


What Is Amazon CloudFront CDN ?

CloudFront Amazon web service which used to Sppeding up websites and this is easy wins setting up your magento store to you AMAZON CDN . CDN can be used to deliver static files js , css , images or content deliver from global network of edge locations .

Cloudfront caches content on servers across the entire would , and serves content tp your customers near by on their location , resulting is an overall faster page load . it’s low cost
pay only for what you use Visit to get more information about pricing.


Integration takes 15-50 min , depending on your knowledge

For setup cloudfront you’ll need an AWS account . Once you’ve set up your acccount , got AWS Managment Console and Select Aws Cloudfront .
aws cloudfront magento
1. Click On Create Distribution. this will start yout process of creating custon CDN For Your MAGENTO site .
magento cdn amanzon
2. You’ll wanto to create a ‘Web’ Distribution For Speed up distribution of static and dynamic content . Select web and click on Get Started
Origin ID: The Origin ID is an AWS internal ID, it won’t be used except to identify the distribution, but should be unique
Origin Protocol Policy : HTTP Only
HTTP Port: 80
HTTPS Port : 443
CLick On Continue
magento amazon cloudfront
Creating Default Behavior
Path Pattren : Deafault(*)
Origin :
Viewer Protcol Policy : HTTP and HTTPS
Object Caching : Use Origin Cache Headers
Forward Quert Strings : No

Distribution Setup
Alter DOmain Name (CNAMEs) : THis Field Is Not Required . If you want use your own doamin name insted of the AWS CloudFront Domain Name For The Url Enter There .
Click On Continue Now CLoudfront will take 15mins for setup. status of your distribution will change from “in Progress” to “Deployed” in the cloudfront dashboard.
cdn magento amazon
youcan use this domain to deliver conttent or your configuerd(
cpanel cname record
Config CNAME Record
Go to You Cpanel Click On Simple DNS Zone Editor in Add A CNAME Record .
Name –
Click Add CNAME Record

Configure Magento

Go To Magento Admin Panel -> System -> Configuration -> Web-> Unsecure

Base Skin Url –
Base Media Url –
Base JavaScript Url –

Go To Magento Admin Panel -> System -> Configuration -> Web-> secure

Base Skin Url –
Base Media Url –
Base JavaScript Url –

After Changes This Refresh Site Cache And Check Your Site If Css Not Loding Properly (Your website not loding well) . go to magento root folder after go to your theme stylesheet.css(yoursite css) change all url (/css/) to full domain name ( change all url in css file again refresh your site cache and check again . if your are facing again problem comment please i will help you :)


In some days i write about maxcdn too.|
Read this too:

Memcached Integration With Magento

1 comment
  1. hello,

    Thanks for your guide!

    I want to know how can I setup this for my staging site with subdomain?
    I have made all changes. Admin is working fine but in front css/js files are not loading.
    What should I make settings in Amazon CloudFront and my magento admin to make it working with subdomain.

    Thanks in advanced!

Leave a Reply

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

Previous Post
some useful tips for speed up magento website

some useful tips for speed up magento website

Next Post

Autologin in Prestashop

Related Posts