SEO basics: What is a content delivery network (CDN)?

A content delivery network (CDN) is a network of servers in different geographic locations working together to get content to load faster by serving it from a location near the visitor. Here, I’ll explain what this all means and what a CDN can do for you and your SEO.

What does a CDN do?

A CDN caches static content. Static content is files like HTML, CSS, JavaScript and image files that stay the same for every user. These files don’t have to be dynamically generated based on a set of rules — that’s dynamic content; static files are just there and everyone uses these. By making these static files available on a CDN with many servers all around the world, you can get them to your visitors super fast.

Picture this: you’ve hosted your site on a server in San Francisco, California. I hear you asking: “But I have a web host, why would I need a CDN?” Well, whenever you load your site from your house near Oakland, it loads lightning fast. You’re physically close by, right? But do you think someone from Mumbai, India would have the same experience if he or she were to visit your site? Probably not. Why is that? Among other things, latency.

The longer the distance between a server and a client — a.k.a. your browser —, the longer the latency will be. Latency is the time needed for the server to respond to a request. In suboptimal conditions that latency will keep getting worse. You can use a content delivery network — or CDN — to move your site closer to your visitor, so to say. The result? Less latency and a fast loading site. But a CDN can do a lot more, and we’ll get to that in a minute.

no cdn vs cdn wikipedia
On the left a typical situation without a CDN. Every visitor requests the site from the same server, no matter how far away they are. Right: with a CDN, every user requests the same site from a location near them. CC image: Wikipedia

What are the benefits of using a CDN?

There are several reasons for using a CDN for your site. Remember, you can do a lot of complicated stuff with a CDN, but most people will use it to get that nasty latency down and speed up the loading times of their sites. Here are several reasons to use a CDN:

  • Speeds up your site
  • Reduces bandwidth costs
  • Adds scalability: improves availability and uptime
  • Improves security

A CDN speeds up your site

For most people, the speed bump a CDN can deliver will be their main focus point. We’ve talked about that first reason already. Everyone wants a fast site and site owners do everything in their power to make their sites as fast as possible. A fast site offers a great experience for everyone. Plus, Google loves fast sites!

A CDN reduces bandwidth

The other reasons might be less obvious. A CDN helps you to get your bandwidth costs down because it serves up static content to users for their servers, not yours. This can have a drastic impact on your costs for web hosting. Often, traffic comes in waves and if the traffic exceeds the limits set by your hosting plan, you have to pay — big time. Of course, you have to pay for a solid CDN so you won’t keep a lot of extra cash in hand, but it does give you a firmer grip on what you’re spending.

A CDN can add a layer of security to your site

Adding a CDN in front of your site is a great way to improve security. The CDN provider has all kinds of tools that help with that. It can serve as a kind of firewall to protect your site from going down during a so-called Distributed Denial of Service attack (DDoS), for instance. It helps you guard against the most common threats out there. There are even specific settings to keep hackers out of your WordPress sites.

A CDN is scalable and improves availability and uptime

By hosting part of your website’s content, a CDN can help you enhance the uptime and availability of your site. Also, many CDN providers also use tactics to make sure that your site doesn’t go down, whatever happens. Load balancing, for instance, can help your site stay online whenever you have a sudden, massive spike in your traffic.

Does using a CDN have any implications for SEO?

 Your SEO won’t suffer if you activate a CDN. It might even help your rankings a bit because your site speed might get a big boost. In addition, by installing a CDN you can also use state-of-the-art technology like forcing a secure HTTPS connection and using the new HTTP/2 protocol to improve your site speed and uptime. In general, users should be happier if your site is excellent, snappy and secure. You should, however, take care that you implement it correctly. Most providers have specific instructions to set up a CDN without hurting SEO.

What CDN should I use?

There are numerous CDN providers out there. You should try and find one that offers the best mix of performance, features, and price for your specific situation. We use Cloudflare at Yoast, but you could also consider some of the other well-known CDN providers like, for instance, Sucuri, MaxCDN, Microsoft Azure or Amazon CloudFront.

Most CDN providers have easy-to-follow setup instructions for WordPress sites, so you should be up and running in a couple of minutes. Some even offer WordPress plugins to improve the process even more. After setting up the account, you can get to work to improve the speed and security of your WordPress site.

Conclusion

A CDN is a great tool to improve the loading speed of your site. Not only that, but it also adds a layer of security to your site and improves uptime and reliability. If you are not using a CDN yet, you might be missing out. Pretty much every site can benefit from a CDN, so please investigate if it might help yours.

Read more: Hosting guide: how to pick the right host for your site »

Coming up next!


22 Responses to What is a content delivery network (CDN)?

  1. IAS
    IAS  • 6 years ago

    Hi, thanks for your useful sharing. I am thinking to upgrade to vps hosting. Do I still need a CDN with vps?

  2. Ramesh Kota
    Ramesh Kota  • 6 years ago

    Wondered to see that the CDN is having this kind of role in SEO. Thanks for the blog

  3. Noz
    Noz  • 6 years ago

    Good article and straight to point.. thanks

  4. Keerthan
    Keerthan  • 6 years ago

    Great Info! CDN does speed up a site!

  5. Erlin
    Erlin  • 6 years ago

    In many cases when i’ve used a CDN (Cloudflare) I got a big spike in requests & load time on my Webmaster tools.

    I’m using it now tho, just not sure how to setup all the technical part properly. Is there a company or someone who can set it up properly for us non-technicals?

    Thanks for another great post BTW!

  6. Serge-Jérôme
    Serge-Jérôme  • 6 years ago

    Great article on the CDN, thank you very much.

    • Edwin Toonen

      Thanks for reading!

  7. Rudy Labordus
    Rudy Labordus  • 6 years ago

    I’ve personally found a CDN terrific… when added correctly. But even with the ‘easy step by step instructions’ it can be quite confusing. You do need a little technical know-how (or some help).

    • Edwin Toonen

      Hi Rudy. Yes, CDNs are great and yes, they take a bit of work to set up right. There is a lot of information available and most providers have great support staff that can help you.

  8. lauren17
    lauren17  • 6 years ago

    Is there any chance adding an extra plugin to WordPress would negate the affects of the CDN speeding things up?

    • Edwin Toonen

      You don’t have to install a plugin, it just makes the process easier. You can always do it by hand if you want to restrict the number of plugins on your site.

  9. Augustus
    Augustus  • 6 years ago

    Thank you for a clearer explanation of CDN but most of the times, CDN and SSL use to cause issues that you will need to disable one for the other to work, is there anything you have to say about this?
    I am talking from Experience.

    • Philips E.
      Philips E.  • 6 years ago

      I’ve had that experience too. But I later figured it had to do with my CF settings. I now do have a couple of SSL-enabled sites still loading via cloudflare.

      Make sure your SSL is active for all your domains i.e. wildcard SSL if you are using a different domain to serve your assets and make sure they’re all enabled in the CF DNS setting. Not everything CNAME and A NAME on your domain needs to be on CF. Disable the irrelevant ones.

      Under SSL setting, make sure you use Full, not Flexible. Set Always Use HTTPS to On. Disable HSTS. Set Automatic HTTPS Rewrites to On.

      When you’re done, purge your cache and test.

      • Edwin Toonen

        Thanks for the clear explanation, Philips!

  10. Ed
    Ed  • 6 years ago

    Great read Edwin, thank you!
    Qucik question if I may?
    In Google Search Console I have both properties attahced (cdn.example.com or http://www.example.com) but not sure where to sepcify images in sitemaps? From the CDN URL or the normal site URL? (cdn.example.com or http://www.example.com) – ie which is the best place to put the image sitemap information? Thanks Ed

  11. tuhamworld
    tuhamworld  • 6 years ago

    Thanks for the informative post..

    May i ask if there’s Clouflare wordpress plugin or does one have to connect using DNS nameservers?

    • Philips E.
      Philips E.  • 6 years ago

      Even if you install the plugin, you cannot use it without a Cloudflare account. So create an account first at cloudflare.com. What the plugin does is simply provide you and interface to manage basic cloudflare settings in your WP Admin without having to log in to your cloudflare account settings page. For e.g. in the plugin, you can temporarily or permanently disable CF, flush the cache etc.

    • Edwin Toonen

      Hi! You can do both. For WordPress users, the quickest to get going is probably by using their plugin.

  12. Standa
    Standa  • 6 years ago

    Thanks Edwin. When should CDN be used, and when should not? I want to use but my friends say that should only be used when accessing sources from overseas (my website is the main source of access in my country – Vietnam).
    I heard that using CDN will slow down the download speed. Is it right?

    • Edwin Toonen

      Hi Standa. Almost every site can benefit from a CDN even if you’re focusing on one country only. The speed boost can be huge, not to mention all the security features you’re getting.

  13. Matthew Summers
    Matthew Summers  • 6 years ago

    Just out of curiosity here: you mentioned that “you can do a lot of complicated stuff with a CDN” besides dealing with latency – what do you have in mind?
    Thanks for the informative post!

    • Philips E.
      Philips E.  • 6 years ago

      He already mentioned them.
      – Reduces bandwidth costs
      – Adds scalability: improves availability and uptime
      – Improves security

      I think the best way is to find out is to create a CF account (even if you don’t plan to use it yet), then look through the settings. You’ll be surprised.