Content Delivery Networks and SiteGround CDN Explained (Webinar Q&A + Video)
Table of Contents
Your website speed is a crucial part of your online success. To help you optimize your website loading time even further, we recently launched our own SiteGround CDN for our clients. Since many of you were curious about this in-house solution, we organized a live webinar with our Product and Technology Lead to answer the most common questions about our latest speed-boosting CDN service, available for free with each of our hosting plans as a Basic version, and as a paid upgrade Premium version. Here are the answers to the frequently asked questions by our webinar audience, as well as to those that we didn’t have the time to answer during the live session.
What is a CDN?
Every website lives on a server somewhere around the world. For example, SiteGround offers several data center locations in the U.S., Europe, Asia and Australia, which you can choose from when purchasing our web hosting services. When your website visitors open your website, they connect to the server that hosts your website. The closer your visitors are to your host server, the faster your website loads, and the better their user experience. However, the purpose of a website is to be accessible and fast from every point of the world, 24/7/365. For this purpose, a CDN exists.
What does CDN mean? It’s a content delivery network that caches parts of your website or the entire website and distributes it on servers that are closer to your visitors. Basically, it keeps copies of your website in many locations around the world. Thus, if you have an active CDN, every time a user visits your site, it will be loaded from a location that’s the closest to them instead of loading it from the origin server. As a result, a CDN service tremendously reduces page loading times and speeds up your website.
What are the benefits of using a CDN for your website?
Websites with international visitors
If your website has a lot of international traffic, it will be distributed well among different CDN locations. For example, when we launched our SiteGround CDN in locations where we didn’t have data centers, the response time for end users improved drastically – between 6 and 8 times for some websites, and even 10 times for others. Currently, SiteGround has 14 CDN locations all over the world (including the newest CDN location in Sao Paulo, Brazil, as well as our new data center and CDN location in Madrid, Spain) that optimize website performance for international visitors.
Websites with users in remote areas
In many locations around the world, people do not have access to fast internet. Thus, a CDN is very beneficial for users in remote areas, where the internet connection is not so good. When they want to load a website, they will be connected to a server which is closer to their location and thus the website will load faster.
Websites that change content frequently
A CDN caches your website content on a server close to your site visitors and delivers this cached version to them every time they visit your site. So the period you want the CDN to keep a cache of your files is important. If you set your CDN to keep the cached copies for too long – for example, one month – but you make changes to your site frequently within this timeframe, then they won’t be displayed live until you clear the cache manually. Similarly, if you set the cache time to be too short, then it will pretty much not be working as it should be, because the idea behind it is to store a cached version for a particular period of time. Therefore, it’s good to choose a period of time that will suit your site depending on how frequently you intend to make changes to it. For instance, SiteGround CDN cache time to live is set by default to 12 hours, and you can easily customize cache time to live to your own needs on the Premium version.
You also need to consider your website software application. For example, for WordPress websites, we have the SiteGround Optimizer plugin which connects to WordPress in such a way that when you make changes to your site (e.g., change a post or theme, install a plugin, etc.), the plugin detects those changes in real time, it connects to our CDN and flushes only the respective pages that have been changed. This is super handy! For any other type of CMS/application that you may use on your site, we honor the standard cache headers of your application. If your application allows you to set a certain amount of time for caching your pages and resources, then our CDN will honor that time.
CDN Benefits for websites with no international traffic
Even websites with no international traffic will benefit from using a CDN. For instance, if your business is in the U.S., you may have website visitors from the East coast, from the West coast and the central states. If you have a US-based website with us, it will be hosted in our data center in Iowa. In this case a visitor from New York for example will have to wait some more time compared to other users, if you don’t have a CDN enabled. Switching on our CDN service that offers several CDN locations in the US will make your website load much faster for all US-based users. A similar case scenario applies to pretty much all the rest of the continents in the world.
How does SiteGround CDN compare to third-party services?
Compared to a third-party provider, SiteGround CDN offers many benefits for your website, because it is a service developed around three main pillars:
Let’s assume you’re using a third-party CDN provider that’s not integrated with your hosting provider’s services. Then, you’ll need to manage the hosting from one place and configure the CDN settings from another place which often may cause issues. What is more, you’ll have to apply different configurations on your own, depending on the CDN provider you use. For example, in certain cases, when you enable a specific CDN provider, you need to go and reconfigure all of your images to be loaded from specific URLs, in order for those images to be loaded from the CDN.
Therefore, we built our SiteGround CDN in a way that doesn’t need much configuration to be enabled. In fact, you just click one button and it starts working. What is more, it is super easy to use. We’ve given you the smart defaults and from then on you can change some of the things depending on your website needs with just a few clicks. Our CDN allows you to enable it without technical knowledge required, as well as use and change its functionalities hassle-free, with a click of a button.
Another benefit of our CDN is that it makes your website load blazingly-fast because it’s based on the same cloud network which our hosting services are based on – the Google Cloud network. What is more, by utilizing this network, data travels securely through it. Using the same private network allows us to improve website performance and offer fast website loading speed.
- Safety net for issues
Usually, a lot of website owners use a CDN service. If something goes wrong with this service, their whole website and/or business depends on it. Therefore, we believe it’s important that we have full control over any potential issues that may arise and thus, we built our SiteGround CDN in-house. Since it’s an in-house built product, our support team will be able to fix a potential issue with it, as it is a core service we offer.
- Room for expansion
There is always room for improvement and when the time comes for a new feature or our clients require a new functionality, we’ll be able to add them, as we’ve already built the service ourselves and know its technical specifics. We will consider and evaluate feature requests based on the business case and the feature type. What is more, we’ll be able to do it in a timely manner, as we’ve built the whole CDN for a year and a half (including the research phase). This gives us the confidence that we can expand the service as much as we want to.
Do you need to first disable other CDNs?
In the general use case scenario, it’s enough to have the domain pointed to the SiteGround Central DNS and enable SiteGround CDN. In this way, the DNS will route the requests to our CDN, even if you have Cloudflare enabled, for example. However, in some cases, the apps are configured to use CDN subdomains for static resources, for example, or in other custom CDN setups, it would be better to disable the other CDN and enable only SiteGround CDN.
Can you use SiteGround CDN with our SiteGround Optimizer plugin for WordPress?
A lot of you already use our top-rated SiteGround Optimizer plugin for your WordPress sites. Since the plugin offers multiple website caching benefits, resulting in optimized WordPress website performance, we get a lot of questions about how that would work with our CDN. One of the perks that both of these tools were developed in-house by our team, is that they are designed to be compatible and complement each-other. For example, if you have SiteGround CDN enabled, purging the cache from the SiteGround Optimizer will purge the cache both on the CDN and your origin server. This is true for every type of our CDN plan. Keep in mind that this will not be working for combinations with other CDN providers, i.e. the SiteGround Optimizer plugin won’t flush the cache on another CDN provider.
Website Caching and SiteGround CDN
Is it best to use several of your options or is CDN alone enough?
Your website would be optimized for the best performance, if you have Premium CDN with the following features enabled: Advanced dynamic caching and “Always online” mode to ensure that the CDN edges will serve cached copies of your pages, if there’s a problem with the site on the origin server. What is more, when hosted with us, our Dynamic cache feature will be enabled by default for your site. If you’re using WordPress for your website, you can also take advantage of our SiteGround Optimizer plugin which offers powerful caching options that complement the rest of the above-mentioned features.
Is dynamic content cached statically or is it computed at the CDN edge?
Dynamic cache means that after the PHP on the origin server processes the PHP request and generates the HTML, the origin server sends this HTML as a response and the HTML itself is cached on the CDN edge servers. The default cache time to live (TTL) on the CDN edges is set at 12 hours. However, you can always change the cache TTL from your application or .htaccess file. Alternatively, if you have the SiteGround CDN Premium, you can customize your cache TTL with just a few clicks.
What happens to sites that pull data into the site real time, e.g. a real estate site?
The answer to that question would depend on whether you want to pull the data each time, or pull the data and then cache it. If you want to pull and cache the data, it’s better to use our Premium CDN with dynamic cache. However, if you want to pull the data from the remote source on each request without caching it, and to deliver the freshly pulled data to your client, then you don’t necessarily need dynamic cache.
What is and isn’t delivered by the CDN local node?
If you use the free CDN, only your static files will be delivered from the CDN edge cache. If you use Premium CDN, you can also have dynamic cache. This caching logic is similar to the SiteGround hosting server’s cache logic. Just like it is on the SiteGround hosting server, logged in users, carts, checkout pages and others are bypassed by the cache. What is more, if you’re using WordPress, you can also download the SiteGround Optimizer plugin to exclude specific pages from the cache.
Does it matter for the CDN, if the website is WordPress or not WordPress content-based?
The simple answer to this question is no, the CDN is respecting the cache-control headers and you can pass such headers to control the CDN cache, no matter what application you’re using. The cache files generation and manipulation works the same way for every application.
However, for WordPress sites we do more and automate cache flushing for example. Certain WordPress pages are excluded by default too. We do advise WordPress users to go for the Premium CDN combined with the WordPress Optimizer plugin.
How quickly does a cached page update over the CDN when a page is updated?
If you’re using WordPress with our SiteGround Optimizer plugin, you can take advantage of all caching features and purging options, such as “Purge cache” or “Auto-purge” from the plugin. If you’re not a WordPress+SiteGround Optimizer user, there won’t be an auto-purge, so you’ll need to purge the cache from your Site Tools > CDN section. The cache purge usually happens immediately but in some cases, you might need to allow 30 seconds for the cache to be purged on all CDN edges.
How to choose between SiteGround Free CDN with each hosting plan & Premium CDN Version
Can you touch on the difference between free version and premium version?
Our SiteGround CDN is an in-house built solution that comes with each of our hosting plans completely free of charge. The free plan allows you to take advantage of different functionalities, such as caching of your website static content; up to 10 GB bandwidth CDN traffic per month; immediate initiation of purge of all cached resources for your website (the cache purge usually happens immediately, but in some cases you might need to allow 30 seconds to purge the cache on all edges); development mode to temporarily suspend caching, make changes to cacheable content and see those changes right away.
What is more, SiteGround CDN also comes with a Premium version that offers even more benefits for your website. The Premium plan allows for advanced dynamic caching; unlimited CDN traffic; activation of the CDN for all your domains (including subdomains and parked); custom time to live for you to choose for how long website resources are cached; “always online” feature that will keep delivering the already cached pages, in case your website starts returning errors.
What happens if you exceed the traffic quota on the Basic plan?
As mentioned above, the traffic quota on the Basic plan is limited to 10 GB per month. If you reach that limit, the Free CDN will automatically stop working. Yet, 10 GB is enough for all the small to medium-sized businesses hosted with us, because that was one of the conclusions during the SiteGround CDN Beta period. If your website makes more traffic than that, you’ll definitely need to upgrade to the Premium version.
How to set up SiteGround CDN?
The setup of SiteGround CDN is easy – you can enable it with the click of a button from your Site Tools > Speed > CDN section.
How will this process affect the existing DNS entries?
In order to use our CDN, you need to be using our central DNS service. To do that, you need to make sure that your domain is pointing to our name servers: ns1.siteground.net & ns2.siteground.net. Read some more information on how to change the name servers of your domain. Why do we need to be in control of the whole DNS zone for your domain name? So that we know exactly how to configure the service without breaking anything else, such as Microsoft Office 365, or Google Workspace, or a similar service.
What will we do? We’ll only change the DNS A records for your domain name and for www.yourdomainname.com. Thus, by enabling the CDN, we’ll change the IP address to which your domain name resolves, but other than that, there won’t be any other changes. All the traffic for your domain name and for www.yourdomainname.com will be routed to the closest CDN location, but no other related services should be affected. That’s the perk of us controlling all these services, such as web hosting, DNS part, and CDN part – we can guarantee to some extent that we will not break other connected services.
Note: If you are migrating your DNS management to SiteGround’s Central DNS please make sure that you manually create all needed DNS records via the Site Tools interface before actually pointing your domain name to ns1.siteground.net and ns2.siteground.net.
Do I have to run my server to www or can I do it without www?
There’s no need to convert your website to a www version (if it’s not), as SiteGround CDN works either way.
Does the CDN give you any extra server resources?
If you use the SiteGround CDN, it will allow you to better utilize the existing resources of your hosting plan. This means that extra resources will not be added but your current hosting plan will probably be able to handle a bit more traffic.
What is the best way to set up SiteGround CDN for client sites?
The setup process is a piece of cake. As mentioned above, as long as the domain is using our name servers, it’s a matter of a few clicks in your Site Tools.
Can you enable the CDN once for all sites you run?
If you have more than one website, the SiteGround CDN should be enabled separately per each individual website from the SiteGround Site Tools panel.