.. But what if the website can’t handle that much traffic? That would reflect in 4xx and 5xx error codes, unresolved pages or complete downtime. As we know, 404s are not a big deal SEO-wise, but customer dissatisfaction can affect your bounce rates and impact your overall strategy in the long run.
Website speed is also one of the ranking factors that Google takes into account. Here’s what Matt Cutts said on the official Google Webmaster Central Blog back in 2010:
You may have heard that here at Google we’re obsessed with speed, in our products and on the web. As part of that effort, today we’re including a new signal in our search ranking algorithms: site speed. Site speed reflects how quickly a website responds to web requests.
As webmasters, we should keep website speed into account and consider it an important part of every SEO strategy. Here’s a short guide on analyzing and improving the site load time of a website.
Testing The Speed Of Your Website
There are several tools that you can use in order to test the load time of your website(s), such as Pagespeed Tools and YSlow. A good alternative would be checking GTmetrix out, which combines the best of both worlds:
A standard test would outline several different sections:
Pagespeed Score – a rank between 1-100% based on the Pagespeed chart (higher is better);
YSlow Score – the result would be within 1-100% as well, validating additional criteria provided by YSlow;
Page Load Time – the amount of time for loading the page. GTmetrix uses different test servers in multiple locations, so this may vary, but lower is always better (studies show that there is an average of 25% abandonment rate for sites loading for 4 seconds or longer);
Total Page Size – the size of the generated HTML of your page, plus all of its assets (scripts, styles, fonts, images);
Requests – the number of requests to resources linked within your HTML document – assets and images required for rendering your site successfully;
List of Recommendations – a handy list of recommendations by GTmetrix for common problems that affect your load time.
Following the recommendations is a straight-forward way of improving the load time for your website. However, some of them are not entirely clear, and more often than not are outside of your control – unless you adhere to a set of best practices or compromise certain features of your site during the performance optimization process.
Website speed is often assessed on desktop machines and laptops for standard business websites or blogs, but there are other considerations that affect mobile users and eCommerce stores as well. Kissmetrics has conducted a detailed research on how loading time affects the bottom line. I also believe that Stellasoft have an interesting post on the matter, too.
Factors Affecting the Website Speed
There are numerous factors that affect the website speed, such as:
The template/theme in use;
Additional features that include extra assets;
The hosting provider and your hosting plan;
Configuration arguments for your host/website;
A slow website is a byproduct of several factors, and you can experiment with each of them until you get the best performance results without affecting the user experience for your readers.
Each CMS loads a good amount of code that should be processed by the web server – which inevitably takes some time. Your theme provides unique styling through a set of CSS stylesheets and fancy scripts, among a few images such as your logo, featured images for your posts, or a favicon. Your host also plays a major role in forming the final speed, defining;
the time for processing an initial request
a series of arguments that could optimize a site for higher traffic
caching layers handling a larger number of signed-up users or articles
Quick Tips for Speeding Up a Website
1. Use a caching plugin
Most popular CMS offer third-party solutions that help out with caching your website. In a nutshell, cached pages are generated once and then a static version is served to guest visitors for a limited amount of time.
If we take an online magazine as an example, its homepage usually lists several posts from multiple categories, among a number of additional features (such as the current weather, the latest news from relevant sources, or the last current number of registered users). Each of those results in a long number of code iterations, as well as a large volume of database queries fetching the latest entries to date.
However, if the magazine doesn’t post often, the homepage will show the same results over the course of a few minutes or even a couple of hours. A caching plugin will take a snapshot of the homepage and serve a clean HTML with the pre-generated data, thus massively reducing the server load, reducing the load times, and allowing for more visitors browsing the site simultaneously.
If you rely on WordPress for your website (currently powering 27% of the Internet), a couple of popular choices are W3 Total Cache and WP Super Cache. A reliable alternative (although premium) is WP Rocket, supporting a certain set of edge cases that occur with specific hosts or various plugins out there.
2. Enable gzip compression
Gzip compression can be enabled for a website on an application or a server level, which reduces the volume of data transferred while serving a website. Think of it as archiving a folder on your computer and sending it via email – it would be more compact and faster for downloading by your colleagues or friends, while they can still access the information easily by decompressing the content.
Modern browsers are used to serving gzip content for optimization purposes and do it blazingly fast – providing you with better UX especially on slower networks or mobile devices.
3. Use a Managed hosting provider
Cheap hosts or generic hosting providers often don’t provide the best performance. Luckily, there are managed hosting providers that specialize in a given platform and fine tune the system for best performance.
An example in the WordPress space is Pagely, specializing in scaling WordPress for large brands. Through a combination of server adjustments, they strip down the standard server layer and configure their instances for higher load, allowing them to host websites receiving over a hundred million visitors a month. The infrastructure of a managed provider is custom tailored to the platform’s needs, often cutting the load time in half, in addition to providing additional benefits such as specialized security fixes for your plugins and automatic updates.
One of the hosting-and-network-related challenges is the Time-to-First-Byte (TTFB) issue, or the amount of time it takes a server to start sending data over to a visitor’s browser. It’s a combination of code quality, server load times, network speed, bandwidth availability and a few more, but managed hosts usually specialize in keeping the TTFB to the minimum, which affects all of your websites and their pages together.
4. Resize your images
A large percentage of websites online list thumbnails while using the original uploaded photo, instead of resizing it. A large blog or an online magazine may very well display 40 or 50 high-res images on the homepage which could add up to 10MB of page size, making it nearly impossible to render for under 30-40 seconds on a mobile device.
Given the bandwidth limitations and poor user experience, resizing your images is a great way to improve the speed time of your website:
Analyze your media-heavy pages and make sure that you’re rendering small images;
Register thumbnail sizes that your CMS can provide for you (helping out with cropping or scaling), and serve them instead;
Or use an automated solution like Imsanity that compresses and resizes your images for best user experience online.
5. Don’t overcomplicate your feature set
Often website managers try to provide as many features as possible – accessible by their users, or simplifying their administrative experience. Some of those plugins may be poorly developed or simply heavy, which drastically adds up to your page load time.
If you have a test clone of your website (also known as a staging environment), try to deactivate all of your extensions and test the website speed with and without plugins. A list of 20-30 active plugins can add several seconds of extra load time, which can be avoided by deactivating plugins that are not essential, replacing them with alternatives, or hiring a professional development company that would build a custom solution which works much better.
6. Stick to a simple look and feel
Plenty of templates available for your website serve as a Swiss Army Knife – providing a complete set of everything that you can think of. Multipurpose themes cater for several markets, and you may end up with a theme that includes a list of features for the real estate or financial market while you’re looking for a simple business website or a blog.
Therefore, sticking to a simple and clean theme is often beneficial for your website speed.
Fewer features would decrease the computation while rendering your page;
Less styling mean less CSS, hence lower page size and fewer external requests;
Clean themes don’t add as many background patterns or parallax images or sliders, which is a huge win speaking of speed.
Relying on a minimalist classic view will let you focus on your quality content while serving results instantaneously to your readers.
7. Load scripts asynchronously
Business owners don’t have control over the majority of the code running their website, but due to marketing and advertisement purposes, a lot of 3rd party snippets are being incorporated across a website or at all pages (Google Analytics, other tracking tools, data reporting engines, lead forms and the like). Here’s a sample chart from Readspeaker explaining how async requests work and how to avoid render delays:
Whenever possible, load scripts in the footer and try to load them as async resources, instead of synchronously loading in the site. The standard behavior (unless otherwise specified) would interrupt the HTML parsing while scripts are executing, hence increasing your page load time.
There is a good reason for the default processing order. Some scripts may adjust your document by adding new containers or restyling everything to follow, which is why browsers are patient and want to avoid concurrency issues.
If your script can be loaded without rushing, this would decrease the amount of time for loading your page. Here’s a sample guide from Google on asynchronous ad code insertion. Some of the caching plugins (or additional tools) allow for adjusting those on-the-fly, but best case scenario this is being done on a code level.
8. Minimize and combine your assets
Let’s review the homepage of Yahoo. It loads 267 remote requests, and you can see how resources are downloaded in chunks in this waterfall chart:
Most popular browsers support 6 or 8 simultaneous connections, and additional requests need to wait for a download to complete before moving to the next resource in the queue. Which adds a massive load to the page load time (reported as up to 22 seconds for Yahoo).
A common best practice is minifying and combining resources in order to reduce the amount of separate connections to each third-party source.
Minifying is compressing each script or style by trimming all whitespace, replacing variable names to shorter strings or even characters (lower end file size) and optimizing other aspects for performance. Combining comes right after by appending several files to a single file, hence resulting in less remote requests as a result.
This can be done on a code level, but is also doable through certain minification and combining extensions, tools, or plugins. Keep in mind that, due to code specifics, this may cause regressions with certain scripts or override sections of the website, so proceed with caution and test carefully.
9. Leverage Browser caching
Browser caching is a helpful asset that reduces the bandwidth of downloaded resources.
It is normally enabled by default on most browsers and can be activated with the right expire headers on a server level (usually done in code, or by caching plugins). Essentially what it allows you to do is serve the initial version of your website once, and then reuse most of the assets locally for following page requests.
For instance, after loading the homepage of an optimized website, navigating to an internal page will be faster, since the browser won’t request again the logo in the header, the styling of the menu, or the footer carousel with testimonials. Reusable assets will be gathered from the local browser storage, hence reducing a number of requests needed to the remote server.
Setting up the right expire headers may be tricky, as regularly updated websites may cause regressions with certain assets not flushed. There are workarounds there, so it’s advised that hard caching is mainly used for assets that would stay the same for quite some time (like your company logo that you don’t change daily or weekly).
10. Avoid redirects
Redirects are a common strategy used by SEO experts in order to bring more link juice to a certain page or refer canonical resources, or satellite website links. That said, redirects produce additional requests, which may recursively make the load time slower for integrated resources (such as embedded widgets for weather or currency conversions, or complex ads).
Reducing the number of redirects will improve the speed time, and ensure that no security warnings would be triggered by the browser if it identifies that as a potentially malicious activity, thus affecting your traffic as well.
11. Set up a CDN
Content Delivery Networks are services that connect with your website, gather the assets and distribute them to a large number of zones across the world. Popular solutions are Cloudflare and MaxCDN, both providing alternative data centers in North and South America, Europe, Asia, and Australia (some reaching out to Africa as well).
Distributing assets to a CDN will reduce the traffic load to your main web server and allow for more concurrent users to browse the website simultaneously, without waiting for their turn in line. Moreover, website visitors will be able to download assets from your website from their closest location – reducing additional network time overseas (for instance, a visitor from Paris opening a New York-hosted website can download all images, styles, and scripts directly from a CDN endpoint in France or Germany, instead of going all the way to the US and back, talking to the original server).
CDNs can drastically reduce the load on your server and page load times to your website, and can additionally provide security features, limiting the number of bot attacks or crawlers playing with your website.
You can find out more right here.