We’ve created the fastest related posts ever

When we say “related posts for WordPress“, we say “bad performance”. Without using an external service like ElasticSearch, it’s practically impossible to have related posts work fast in WordPress. That’s why we’ve always stayed away from including any related posts plugin on our site. It’s also the reason we haven’t tried to come up with a solution ourselves before. In the upcoming release of Yoast SEO Premium, this will change. We found a way to have blazing fast related posts! Let me explain how we did that.

The fastest related posts ever

Our solution has a frontend and an admin component. Let me start by asking a very simple question:

On a content page, what would be the fastest implementation of related posts you could think of?

The (somewhat dull) answer:

Simple, old-fashioned links.

You simply don’t need to generate related posts, if you already link to your related content in your text. Not only is this better for frontend performance, it also benefits SEO. It’s simply better to link directly to your related content in a meaningful context, than to use a generic related posts box somewhere else on your page.

Of course this is easier said than done. The real problem related posts widgets solve is that you no longer have to think about related content yourself. So yes, we still need an algorithm to suggest related content, we just don’t need it on the frontend. Instead, we need to bring this functionality to the editor. This way, we can suggest the writer of an article which related posts he/she might want to link to in their text. We call these *internal linking suggestions*.

Why suggesting related content is costly

So, I guess we haven’t gotten rid of the problem of generating related content in a performant way. The thing we can’t seem to get around, is that we’ll have to do one, or more, very heavy queries to the database at some point. To suggest related links, we need to compare the content of one post with that of all the other posts on our site. The WordPress database isn’t optimized for such queries though. To do this in one operation is costly, and in case your site has a lot of content, that may slow things down substantially.

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO for WordPress pluginBuy now » Info

Indexing content, one post at a time

About a year ago, we moved our content analysis from the server side to the browser. This had a lot of advantages, but a slight inconvenience was that we could no longer calculate the SEO score for a post on the server. This calculation now has to be done in the browser for each post separately. This way we’ve already managed to dramatically improve server side performance with regard to our content analysis tool. When we started thinking about our prominent words algorithm, we realized this would also allow us to easily index content. Saving the most prominent words of every post to the server would make it very easy and cheap to query related content.

Continuous improvement

By leveraging our content analysis tool and utilizing the processing power of the browser to index content, one post at a time, we’ve managed to drastically reduce the heaviness of the queries needed to find related content. Now, we haven’t run any benchmarks yet, but it’s clear that this solution is much faster and easier to scale, without taking any serious performance hits.

In Yoast SEO Premium 4.0 – launching soon! – we’re shipping the first version of our internal linking suggestions tool. We’ll continue tweaking the algorithm to make sure our internal linking tool is the best and most performant related content tool available for WordPress.

Read more: ‘Related posts need to make sense, not just be there’ »

Advertisements

Author: Search Engine Optimisation Company

Our team have been offering SEO expert services to clients since the early days of the internet. Whilst the tactics have evolved over the years, our overall goal by no means has and thats making sure our users web pages to rank on page 1 for appropriate keywords at the same time only using honest and long term strategies. Plan to Dominate the Search Engines? While many agencies are convinced that they have to resort to black hat SEO tactics to get results, we can get the 1st page rankings for all of our customers despite the fact that constantly guaranteeing we stick to strategies that are not frowned upon by the the search engines. What happens when you turn to black hat strategies? Without a doubt, you will get some early success, however the internet search engines will quickly discover what you are doing and you can face severe penalties which includes having your website banned with the google search results altogether. We work within guidelines of leading search engines such as Google, Yahoo and Bing! so you never need to be concerned about receiving any penalties as a result of the work we carry out for you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s