Tutorials Web Hosting

5 Reasons Why Your Website Needs a CDN Today

4.5/5 (4)

As a web designer, you know that a good relationship with your customer starts with trust. And what conveys trust better than a great looking website? If your website looks absolutely amazing, your visitors will immediately trust you.

But good design is only one part of the trust.

One thing which loses the trust and frustrates your website visitors is a slow website.

After design, page-loading speed is one of the most important factors which contribute to the success of a website.


Why is speed so important?

The importance of a fast website built with a premium template is a factor has been studied over and over again.

Sites which load slowly create a negative perception. As the page loading time of a site increases, the site’s conversion rate starts to get affected negatively.

Have a look at this chart:

cdn

Page loading time vs Conversion - Credit: Soasta

As you can clearly see from the diagram above, as a page takes longer to load, the conversion rate goes down drastically. The best conversion rate happens at a page load time of 2.4 seconds. Unfortunately, most websites, in fact, take much much longer to load.


What is a CDN? How can it help speed up my website?

A CDN is a content delivery network. A network which is optimized for content delivery.

There are many benefits to using a CDN. But how does a CDN make a website load faster?

It’s simple really - a CDN is designed to handle the traffic of a website much better than most hosting services.

Most shared hosting services are typically optimized towards delivering a stable generic environment (at the lowest cost to the hosting service). Your website typically runs on PHP or other popular hosting environments.

However - It’s not been specifically tuned for page-loading speed most times. Infact, shared hosting services are typically slow - they suffer a resource bottleneck problem - too many websites competing for the same resources.

On the other hand, a CDN’s primary function is to make websites load fast. Their actual infrastructure setup is designed such that they help deliver a lightning fast website.

But how does a CDN actually speed up my site?


How a CDN speeds up your site

There are a few reasons why a website is slow

  • the shared hosting server is overwhelmed and the response time is too slow
  • large images and content of your site take a lot of time to download
  • the website uses many different scripts/plugins and images which have not been optimized for speed
  • the hosting server location of your site is in very far away from the visitors of your website

There are other reasons, but these are the primary ones.

You can take steps to resolve each of these problems individually, but we’ll focus mostly on the last two here.


Your shared hosting server responds slowly

Shared hosting servers are not meant to be fast.

They are meant to be cheap.

To drive down the costs, shared hosting means that the number of different websites hosted on the same server is quite high.

Therefore, on shared servers, each time somebody visits your website, your website is competing for resources with ALL of the websites hosted on the site. Typically it takes more than a second to start serving your website’s contents.

cdn

When you’re trying to make a website fast, a response time of a second is a very bad situation.

So let us make some recommendations

  • If your website is hosted on WordPress, find a reliable WordPress hosting company, with good reviews. Don’t go for the cheap options.
  • Try going for a premium plan, such as a VPS. In this way, your site will have enough resources and respond within a few milliseconds.

The images of your site are not optimized for the web

One of the reasons why your website loads slowly, is because of the images hosted on your site.

Using images on your website is great advice. Images help to break up large chunks of text and help improve readability. You’ve also probably heard the phrase: “An image is worth a thousand words. Yes, images are important to the success of your site. Yet, they also have a problem. Images which are not optimized can have a drastic negative effect on the loading time of your site.

In an ideal world, we would remember to save each file in a web-friendly format, optimizing large images and compressing them to a size which is small without losing any of the quality of the image. In reality, this process is cumbersome and most people simply don’t have the habit. Others are simply unaware that images should ALL be optimized. But, there we can come with a solution which automatically optimizes images. In fact, CDNs are equipped to resolve this problem without any manual intervention. Image compression and optimization is usually a built-in feature of a CDN.

You simply don’t have to worry about optimizing the images. You handle the creating of a great-looking website with stunning imagery. The Content Delivery Network will handle the compression and optimization of the images.


Your website is using a lot of scripts

This is another one which slows down your website significantly.

If you are just starting out with your website, you might enjoy discovering new plugins and testing them out on your website. But each plugin has an impact on the loading time of your website.

Even web designers might fall into this trap. Using many plugins to fulfill the functionality required by the customer is delivered has its side effects on website speed.

Each plugin installed on your site adds Javascript files, CSS files and affects the performance of your site.

You’ll see the effects of many plugins, in the form of a lot of requests if you use such sites as GTMetrix or Pingdom Tools:

cdn
There are fixes for this of course:

  • Keep your site as few plugins as possible
  • Perform optimization on the plugins through combining, compressing and minifying scripts
  • Enable HTTP/2 for faster loading times

A CDN can’t help you decide which plugins to keep and which plugins to remove. But, a CDN is able to perform on-the-fly compression and minification of scripts; this makes the overall size of your site smaller and therefore, faster.

The third and very important recommendation is the setting up of HTTP/2. HTTP2 is something which is a whole topic of it’s own so we’ll recommend a couple of great articles on WebDesignerdepot and on DART Creations blog.

HTTP/2 has been developed to improve the loading time of websites, specifically those websites which have a lot of resources to serve.

Most CDN services allow you to easily enable HTTP/2 on your website. However, HTTP/2 has the further complication of having to install a secure certificate. If you enable the secure certificate via the CDN’s SSL/TLS mechanism, you avoid all of the complication and cost which is associated with certificates. Not only that, CDN’s typically optimize the SSL/TLS handshake (which is a heavy operation), to make sure that even with HTTPS in place, there is no overhead.

Enabling HTTP/2 is then a simple switch. This gives your site an instant boost in page-loading times.

There’s still one problem which can severely slow down the speed of your website.

What is it and how do you fix it?


The physical location of your website server

Ok, if you’ve followed our advice so far - your website should now be much faster than it was before you started reading.

But, there is one thing which can still affect negatively your website’s loading speed.

Have a look at the image below.

cdn

The above diagram shows the typical time it takes for website data to travel from the US to Europe. If your website is hosted in the US, any visitor outside of the US will experience this problem. It also happens if the situation is the other way round, your server is in Europe but your visitors are in the US or elsewhere.

Why are we sharing this diagram with you?

Essentially, the distance your website’s content has to travel has a direct effect on the loading speed of your website.

If your website is aimed at a local audience, such as service in your town or country, you have a simple solution to this problem - choose a good hosting service which is physically close to your target audience. If you are targeting users in London, host your website on a good server in London.

However, this is not possible if your website caters for an international audience. You can’t chose a server location which is close to ALL of your website visitors. However, there is an effective solution. A CDN service is aimed specifically at fixing this problem.

Let’s revisit the previous diagram, referenced from Incapsula CDN’s website, one of the main players in the CDN services industry.

cdn
How a CDN speeds up your site by reducing distance traveled

The CDN’s infrastructure is designed specifically to reduce the distance that content has to travel to reach the target audience.

CDN’s create a network of hundreds of servers in different locations around the globe. These caching servers will create a local copy of your images and static files such as Javascript and CSS files to these edge locations.

When a user visits your website, the heavy files will get sent from a location which is as physically close as possible to your visitor.

This fixes the problem of distance and gives your site a very significant advantage in terms of loading speed.

The diagram below shows exactly what we mean.

As you can observe, even if your site is hosted in a different country than your visitors, the caching servers will still serve your content from a location which is nearby.

cdn

Typical distribution of a CDN network


How to setup a free CDN

The great thing about using a CDN is that you can quickly improve the website loading time of your website for free, particularly if your website is still in it’s initial stages.
CDN services typically offer a free plan. This plan will provide the essential caching functionality we discussed above. Besides speed, CDN’s also improve your website’s security too, through the security features deployed by CDNs.

As your website expands beyond the free plan, you can then upgrade to a plan which suits your website’s needs better.

There are a couple of ways of implementing a CDN for your website. This depends on the specific CDN you will be using.


Install a CDN plugin

The first way of setting up a CDN is by using a CDN plugin. When signing up with the CDN service, you will get a URL specific to your site. This will be the new “location” of the static images of your site.
The CDN plugin will then be used to rewrite the URL of static resources such that they will be served from the CDN rather than from your hosting server.

https://www.example.com/images/logo-default.jpg

is now rewritten as

https://cdn.example.com/images/logo-default.jpg

You might need to perform a few small changes to the DNS entries of your site. This is so that cdn.example.com will resolve to the URL provided by your CDN.

cdn

You can use the CDN Enabler plugin if you’re using a CDN with a URL rewriting option. KeyCDN (the authors of this plugin), MaxCDN or Incapsula all offer this method.

cdn

Once you’ve installed this plugin, you’ll need to do is enter the URL provided by your CDN service, and your CDN is set up!
cdn


Install a CDN as a reverse proxy

Another, even better way of installing a CDN is using what’s called - a reverse proxy.

This also requires some changes to your DNS. The CDN you use will typically guide your to the DNS changes you’ll need to perform..

To explain how a reverse proxy functions, we’re once again going to use an image.

cdn

With a reverse proxy, the CDN server receives the request when a user visits your website. It then passes the request to retrieve any dynamic content to your site. It then sends the dynamic content together with all static resources to the visitor.

This setup is better because it removes a lot of heavy load from your hosting server - making your website much faster in the process.


Conclusion - are you ready to make your website better?

As we’ve seen in this blog, installing a CDN is not expensive as one may think. Besides that, the page-loading speed boost given to your site will provide a better user experience for your visitors.

If you’re looking to speed up your site, a CDN is a must-have.


Related Posts

Check The Best Rated Web Tools And Services

Top 15 WordPress Plugins for Digital Marketing in 2017

12 Mind-Blowing WordPress Plugins You Should Know About

43 Dangerous WordPress Plugins Blacklisted by Sucuri in 2017


tm

P.S. Don't forget to check out our marketing agency WordPress themes.

Leave a Reply

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