CDN for Dummies – A Stupid Easy Guide

I have been getting a lot of questions over the past couple months about how to setup a CDN, what it does, and if you really need one. Some of my previous articles about CDNs were obviously a little too technical. Looking around the web, there don’t appear to be any really good beginner’s guides, or dummy proof guides, on what a CDN is and how to set one up. Now don’t get me wrong, I am not trying to offend anyone. Everyone has there own expertise and perhaps you are just starting to learn about these things. Which is perfectly OK! Don’t feel embarrassed to ask for help, no matter what stage of the game you are in with your website and marketing. So check out this stupid easy CDN for dummies guide below.

What is a CDN?

So obviously the very first question you might have if you are just starting out is what in the world is a CDN? I am going to explain this to you how I did to my Mom, which trust me, took a few tries. A CDN, stands for Content Delivery Network. And to put it as simple as possible, a CDN makes your website load fast all around the world. Have you ever wondered how certain companies, like Starbuck’s website, always loads fast no matter where you travel? That is because they utilize a CDN.

Web Hosting

Every website requires a web host. Let’s say you purchase web hosting from a company like SiteGround or Kinsta. When you create your website, they hold the contents of your site on a server in a data center with a bunch of other servers. These are usually large warehouses where companies rent hundreds of servers to keep all their data on. In our example let’s say your website is on a server in a data center located in Dallas Texas.

web hosting data center

Web Hosting + CDN

Think of a CDN as an add-on to your web hosting. A CDN doesn’t replace it, rather it integrates with your web host to make your website load faster. When you deploy a CDN it automatically copies parts of your website, like your images and scripts, and stores them across a bunch of different servers in different data centers around the globe. When people visit your website, it is now loading from different countries, like France, Australia, the USA, etc. It automatically loads from the server that is physically closest to them.

cdn network map

How Does this Help Speed Up Your Website?

Now that images and scripts from your website are loading from different countries across the globe, how exactly does this speed things up? And the answer is… latency. Think of latency as a highway. The longer the highway, the greater the latency, and the longer it takes to get to the end of it. This is the same with physical distances between data centers. The further the server is away from where you are loading the website, the further the data has to travel to get to you. And this creates additional latency and delays in loading your website. If someone lives in Paris France, and your website is hosted in Dallas Texas, your website will still load super fast because the CDN has a copy of everything stored in a data center in Paris. Make sense?

A CDN also does all sorts of other stuff to speed up your website such as caching, Gzip, etc. But don’t worry you don’t need to know what that is. It is all done behind the scenes automatically for you.

Do You Need a CDN?

This is kind of like asking, do you want your website to load faster? Of course you do! I wrote another post a while back about why everyone should be using a CDN. I will go through a couple of the reasons below.

1. Performance Benefits

Obviously one of the best reasons to use a CDN is because of performance. If you want your website to load fast, then this is a no brainer. Here is a quick little test I did on one of my sites.

Without a CDN

website without cdn

With a CDN

As you can see with a CDN I managed to decrease the load times by 56.64%! Or to put it simply the website is now 2x faster.

digital-ocean-with-cdn

2. SEO Advantages

One of the biggest SEO advantages to using a CDN is because of speed. Google loves fast websites and takes this into consideration with its ranking algorithm. Fast websites also usually always have longer time on page durations and lower bounce rates. By increasing your speed you can increase your rankings!

Accelerating websites is extremely important. Faster websites mean satisfied customers. PageSpeed becomes significant for rankings . — Matt Cutts

Also by optimizing your website to load faster it will increase the frequency in which Google crawls your pages. The faster Google crawls your pages, usually in turn means the sooner your content will be indexed and show up in Google. Then there is Google image search. By serving your images from a CDN you ensure that Google can access your images faster.

3. Better Conversion Rates

If you want an easy way to increase your conversions and sales, make sure you have a fast website! Let’s take a look at some of the stats.

A 1 second delay in page response can result in a 7% reduction in conversions. — Kissmetrics

If you were able to increase your website by 3 seconds, that means an approximate increase of 21% in conversions!

57% of online consumers will abandon a website that takes more than 3 seconds to load. —  Web Performance Today

If your website is taking longer than 3 seconds to load it could be dramatically affecting your sales!

4. They Are Cheap

cheap cdn

A big misconception about CDNs is that they are expensive. This is not true at all. This blog gets over 60,000 visitors a month and at bare minimum I only pay $2.41 a month for my CDN (I use KeyCDN). That is half the cost of a cup of coffee per month. Is $2.41 a month worth implementing a CDN and gaining a 56% speed increase? Um, ya

5. Reliability

Nothing is worse than your website going down or being offline due to technical difficulties. With a CDN requests to your website are always routed to the nearest available server. If one happens to be down, it simply passes the request onto the next one. This creates redundancy to ensure less downtime and a pleasant web experience. And don’t worry, this is all handled automatically behind the scenes. You don’t have to do anything.

cdn reliability

src: imgflip

6. Easily Deployable

Another misconception is that CDN’s are complicated to setup. Well, go through my tutorial below and I will debunk that myth. CDN’s can be deployed on almost any platform in just a matter of minutes! WordPress, Drupal, Joomla, Magento, Typo3, etc… if a platform exists most likely you can get a CDN deployed on it.

How to Setup a CDN

cdn setup

OK, now for the fun part! Let’s get a CDN up and running on your website. I will walk you step by step through the entire process. And if you have any questions feel free to ask below in the comments. In my example I am using WordPress, as that is what 25% of the internet is using, and because I love WordPress.

Step 1

keycdn

The first thing you need to do is signup for KeyCDN as that is who I am using and recommend. Feel free to check out my full review on KeyCDN. They have a 30-day free trial (no credit card required) and you can even grab $10 in additional free credits below.

Get $10 in Free KeyCDN Credits

Step 2

Now in your KeyCDN dashboard the very first thing to do is create a Zone. So click into “Zones” on the left hand side on click on “New Zone.”

keycdn new zone

Step 3

Now give your zone a name, you can choose whatever. Make sure the zone type is set to “Pull” and then put your full domain name down in the Origin URL box (note: if you are running over HTTPS already, make sure you include the HTTPS://). If you are wondering what “Pull” means, it basically is another word for copy. A pull zone means it will copy your images and scripts automatically for you. Then click “Save.”

add zone keycdn

Step 4

Now on your Zones page you will see your new zone that you just created. You will want to copy your Zone URL to your clipboard as you will need this later. Or you can open up a new tab and leave this open.

zone URL copy

And for the basic CDN setup, that is it for the KeyCDN side! Pretty easy, only 4 steps.

Step 5

Now we need to hookup KeyCDN to your WordPress website. Download and install the free WordPress CDN Enabler plugin. In your WordPress dashboard click on “Plugins” and “Add New.”

wordpress add plugin

Then search for “CDN Enabler” and it should be the first one that shows up. Click on “Install Now.”

wordpress search cdn enabler

Then click on “Activate Plugin.”

activate cdn enabler

Step 6

Now in your WordPress dashboard click into “Settings” and then “CDN Enabler” as we need to hook it up.

wordpress settings cdn enabler

Now in the CDN URL box paste your Zone URL which you copied back in Step 4. Then click on “Save Changes.”

cdn enabler settings

And that is it! You now have a CDN running on your WordPress website. You can follow the additional steps below if you want, but they are not required.

celebrate cdn

src: giphy

Optional Steps

There are a couple optional steps you can also take if you want to get a little more advanced. The first is to setup your CDN so that it looks like cdn.yourdomain.com instead of using the http://zonename-13c4.kxcdn.com. This can be beneficial for SEO and branding. And the second is to enable HTTPS, so it is https://cdn.yourdomain.com. Running over HTTPS can also be beneficial for SEO as well as performance advantages. Follow the steps below to do both of these together at the same time.

Step 1

The first to do is you need to create a CNAME record. You don’t need to know what that means, just know that is makes the cdn part of your cdn.domain.com work. You can think of it as an alias. To do this we need to login to where you registered your domain name. In my example I am using NameCheap, but the steps will be very similiar if you have your domains with GoDaddy or someone else. So at NameCheap click into “Domain List” and into the domain you are working with. Then click into “Advanced DNS.” Then add a new CNAME record. In the host column put “cdn” and in the value column put in your Zone URL which you got back in Step 4 of the setup process. Then click “Save.”

namecheap cdn cname record

CNAME in cPanel

Some of you might be using cPanel instead. If so, you can create the CNAME by following the steps below.

  1. Sign in to your cPanel account.
  2. Under the “Domains” section, click on the “Simple DNS Zone Editor” icon.
  3. Select your domain from the drop-down menu.
  4. In the “CNAME” section, type in the name and CNAME you wish to use.
  5. Click on the “Add CNAME Record” button to save your changes.

Step 2

Now we need to enable HTTPS on your domain. So back in your KeyCDN dashboard next to your Zone click on “Manage” and then “Edit.”

manage zone keycdn

Step 3

Then check the box next to “Show Advanced Features.”

advanced cdn features

Step 4

Scroll down and under “SSL” select “letsencrypt.” This allows you to enable HTTPS (SSL) for free on your domain. Scroll down and click “Save.”

enable let's encrypt

Step 5

Now we need to create an alias in your KeyCDN dashboard to tell it about the CNAME you created with your domain registrar. So under “Zonealiases” click on “New Zonealias.”

keycdn new zone alias

Step 6

Then input your cdn.yourdomain.com in the “Alias” field and select your Zone from the dropdown. Then click “Add.” (If you see any warnings after clicking add you might need to wait a few minutes. When you create a CNAME with your domain registrar it takes a little bit to work around the globe)

add zonealias

Step 7

Now we need to update the URL in the CDN Enabler plugin. In your WordPress dashboard click into “Settings” and then “CDN Enabler.”

wordpress settings cdn enabler

Step 8

In the CDN URL field update it with your new https://cdn.yourdomain.com and then check the box for “CDN HTTPS.” Then click on “Save Changes.”

https cdn enabler

Now you have your images and scripts loading securely over HTTPS from KeyCDN. And that is it! As you can see setting everything up is pretty easy and only takes a few minutes. Sit back and enjoy the speed.

cdn setup finished

src: memegen

Have any questions? Feel free to drop them in the comments below and I will do my best to answer them.

GET MORE STUFF LIKE THIS

Marketing, WordPress, Blogging Tips, SEO and Reviews, once a week.

Thank you for subscribing.

Something went wrong.

329 Shares
Tweet
Share
Share
Buffer