In recent times, the world of web design has seen an increase in the use of static HTML layouts – in other words, pages that are delivered to the user exactly as they are stored on the server. (Our own new website is static, by the way).
But what are the implications for search engine optimisation (SEO), and how do static websites compare to the more common dynamic ones that assemble pages on-the-fly? Is one better than the other?
In today’s post, we’re going to look at how static sites work, how they differ from dynamic layouts – and whether either approach is innately better for ensuring a strong presence in Google’s search results pages.
What is a static HTML website?
In much the same way that ‘sober’ really just means ‘not drunk’, ‘static HTML’ really just means ‘not dynamic HTML’.
Let’s unpack that.
Most of us are familiar with content systems such as WordPress and Joomla – these are dynamic HTML systems. What this means is that when the user visits the website, the page is constructed dynamically from lots of bits and pieces – with blog posts and content pulled out of database tables, and the page layout assembled from fragmentary template files (perhaps with the page header pulled from header.php, put together with main_body.php, and so on).
When you publish a blog post in WordPress, for example, it doesn’t just ‘go on the site’: the text you wrote is sent to a MySQL database and stored in a table. Then, when a visitor loads the website later, the text is pulled back out of the table and combined with the template files to show them the finished page.
When a second visitor arrives, the server does the same thing again – requests all the bits, assembles them together, and sends the finished page to that user’s browser.
By contrast, a static site doesn’t do any of that. The page exists as a page, and when the user visits the site, that’s what they get. The server doesn’t do anything fancy behind the scenes at all.
What are the SEO implications of a static website?
In a lot of respects, there isn’t much difference between optimising a dynamic or a static website for search engines. In both cases, it’s usually a simple matter to edit meta-data, add alt attributes to images, set canonical URLs, and so on.
One advantage inherent in the setup of a static HTML website, however, is loading speed – a key ranking factor for Google. Even a ‘vanilla’ (unmodified) basic WordPress website can utilise around thirty database queries in order to get the various bits and pieces it needs to assemble the page – and though each of these requests takes a matter of milliseconds, it all adds to the time it takes for the page to render.
Of course, almost nobody uses the default WordPress theme, and it’s very likely that most custom themes make use of many more SQL requests than that – with plenty of them using 100 or more.
Dynamic sites are popular because they make content editing so easy for the webmaster, but then the scaffolding needed to provide that functionality is burdened onto each of the users. In some cases it may not be worth providing such a streamlined backend for one webmaster who only publishes a post every six weeks, when the necessary flipside is that potentially hundreds of visiting readers will need to make numerous database and file requests to view the public pages each time.
The static site approach flips things the other way around – it’s a bit less elegant for the website owner to update, but that might not matter as much as providing the fastest and most efficient page loads for all the people who then read the published site. If a page is edited once and viewed a hundred times, in many situations it makes more sense to do most of the loading when editing rather than when reading.
To be clear, there are many very good uses for dynamic pages. For example, anything that involves dynamic content! A social media feed or an e-commerce search function are great uses for dynamic setups that need to make repeated database requests to present the most useful output for a user’s specific needs. (These types of pages, we should add, are rarely considered key SEO landing pages).
But for a brochure website that barely ever changes, it may just be more efficient for page loading to take a static HTML approach.
Performing SEO tasks for a static website
Depending on the complexity of the site, editing a static HTML page to add content or make SEO tweaks can be a simple or a technical matter.
For a very basic site, it may just be a matter of just editing the code of a .html file and updating it on the server – no extra tools or tricks required. (In a way, most of the websites seen in the 1990s were really static HTML pages – we just didn’t call them that because a widespread concept of ‘dynamic HTML’ wasn’t a thing at the time).
This means that common SEO tasks like updating meta-descriptions, adding canonical tags and implementing breadcrumbs don’t need to be done with special plugins. It may require some HTML coding chops, but with a simple static page you can just jump right into the code and do what you need to do.
Of course, for a more complex site, this basic approach quickly becomes unworkable. Adding a new blog post might involve adding a new .html file, editing the blog post index page to include the new entry, manually adding the article to the ‘Latest Post’ box on the homepage, updating the sitemap(s), editing the RSS feed, and any of a dozen other manual tweaks depending on the structure and layout of the website. (Woe betide you if you should then decide you want to change the post’s title, as you’ll have to go and do all that stuff all over again).
In these cases, updating the site will likely necessitate the use of a static site generator (SSG). A static site generator is an interface the webmaster can use for editing (superficially a bit like WordPress or another standard CMS) which then automatically regenerates the static HTML files for the whole site to reflect the changes.
This process can take a few minutes to happen, so it’s not the most responsive editing method in the world, but it’s likely worth it for the speed, responsiveness and bandwidth savings you’ll get on the public-facing website.
As a great bonus, static HTML sites are extremely secure – there’s nothing to hack. Did you know that 90% of all website hacks happen on WordPress sites? With so many out-of-date installations and insecure plugins, a complicated dynamic CMS can present a goldmine of opportunities for a potential attacker.
In conclusion, both static and dynamic sites can be optimised well for search engines. Although static sites have a small advantage due to their innate speediness, either style of website can be made into an SEO success.
Just as a good mechanic will be able to fix all kinds of cars, we love helping all types of websites reach their full search engine potential – no matter what makes them work under the hood.