There’s more to optimising a WordPress site for SEO than installing the Yoast SEO plugin. Here we discuss some aspects you may have overlooked.

WordPress Version

You want to be running the latest version, right? Well, maybe not. WordPress 5.0 was released in December 2018, and is a fairly major update. And WordPress 5.1.1 was released in March 2019. Great! Be careful, however, and don’t be in a hurry to upgrade. There are some plugins that we at The Content Guild regard as pretty essential in some situations, that have not yet been updated to work with WordPress 5.0, for example, Easy Table of Contents. See Long Pages and Table of Contents below for situations in which we recommend this plugin. Our advice? Stay with WordPress 4.9 for now, at least until all the plugins you need have been updated. (All the plugins, not just the majority.)

On the other hand, we would never advise downgrading, so if your site is already running version 5.0 or later, stick with it!

A note about HTTPS

Using HTTPS is a ranking factor for Google. Your production site should certainly be using HTTPS. The details of how to set that up depend on your hosting provider, and are out of scope of this article. But don’t overlook it.

Also, ensure you also set the WordPress address to refer to the HTTPS version of your site.

wp-general-settings.png

The examples in this article use HTTP rather than HTTPS, since the configuration here is purely for the purpose of demonstration. Don’t do that in production.

URL Structure

For SEO in 2019, URLs matter. Why is that? Surely you can ensure that the link text contains the phrase that matters for SEO? You can, but that’s not enough. The reason is that bare URLs appear in many places, for example when copied into Tweets, or appearing in other social media channels where you don’t control the link text. You have to ensure that your bare URLs make sense from an SEO perspective. Our advice? Go for a fairly shallow structure, and use short phrases including your keywords, and excluding any stop words.

Important note: do not change your WordPress permalink settings for a live site without thinking carefully about redirects. It is essential not to break links for existing ranking pages, or pages with incoming links. Read the section on Existing Sites below to see how to achieve this.

A Partial Solution

You might think therefore it would be enough to configure the Permalink settings in WordPress. The only settings which seem to make sense from an SEO viewpoint are “Post name”, if you have a tiny site with only single-level URLs (not recommended, as there’s no room for growth with this choice), or “Custom Structure”. Since we recommend allowing for a URL structure, not just a flat namespace, “Custom Structure”, using the category as the top-level path component for the URL would seem to be the best choice.

So let’s use a custom structure with category in the URL, as follows.

wp-permalink-settings.png

The next step is to add the required top-level URL path components as categories.

wp-art-of-seo-category.png

And finally, we can add a new post, or edit an existing post to have this category. Notice that the permalink does indeed now have the desired structure.

wp-art-of-seo-post.png

A Problem with Top-Level Posts

But there’s a problem which must be solved. This approach forces all URLs to have the same structure, and an attempt to have a top-level post simply fails, as shown below.

wp-attempted-toplevel-post.png

There are several WordPress plugins which allow for the level of customisation of URLs required for the structured approach discussed above. We have used and recommend Permalink Manager Lite. One particular advantage of this plugin is that it automatically redirects from the previous permalinks to the new scheme. Such redirects are absolutely vital to preserve the URLs of previously ranking pages, and this plugin avoids having to manage these redirections manually.

Once the plugin is installed and activated, simply edit each post that needs to be relocated, and click on the Permalink Manager button to edit the permalink. Note that the plugin allows full URL paths containing slashes, so any structure may be applied.

wp-permalink-manager-art-of-seo.png

Note too that the previous permalink automatically redirects to the new scheme.

When using this plugin, there is actually a choice whether to use the “Post name” permalink scheme or the “Custom structure”. Any pages which get automatically assigned URL paths different from what is required may simply be edited using the Permalink Manager, and redirections from the previous permalinks will be applied automatically.

Existing Sites

For an existing live site, here’s what you have to do. Either keep your existing permalink scheme, or delay changing it until you have used Permalink Manager Lite to manually change the permalink for each ranking page and page with incoming links. Once this is done, Permalink Manager Lite will have set up redirects from the previous URLs to the new ones, and it is safe to change the permalink scheme. Be careful, though, you don’t want to get this wrong. See also the section on redirects below for how to fix anything you may have broken already.

Long Pages and Table of Contents

Google have a very large number of ranking factors and are constantly tuning their ranking algorithm. Since 2015, this has included an artificial intelligence algorithm called RankBrain, which continually adjusts results to best meet user intent. This means that second guessing the details of their algorithm is in general a poor approach, as it is constantly changing, and therefore fulfilling user intent is the single most important strategy for SEO in 2019. The way to do this is to deliver comprehensive and well researched information on a topic, as a single page per topic. This is important, as Google returns links to single pages in the search results, not links to a collection of pages. That is, each page is evaluated on its own merits.

When writing about topics which are otherwise difficult to rank for, therefore, we strongly recommend folding all the related information on a topic into a single page for that topic, because if you’re writing about a topic of interest, you’d better be comprehensive. And that means long.

Beware, though, of the tension here. Google also notices if users bounce straight back off your page. It’s no good serving up long and detailed content if it’s not user friendly. User friendly content is punchy and to-the-point. How can we cover both bases - comprehensive, and punchy?

The obvious answer is to be careful to structure your long page, and ensure it is well indexed. That is, a table of contents, and internal links to the sections of interest.

HTML structure for a long page

Any H-tag can be given an id attribute, which makes it a named anchor or bookmark, and enables it as a link target via the URL fragment (the portion of the URL preceded by a # character). The H2 tags on a very long page should all have these attributes, to facilitate table-of-contents and links into specific sections of a page. With this, a table of contents can be inserted at the top of each long page. And other pages on the site should make use of URL fragments (# references) to link to specific sections of the long page.

Table of contents and id attributes in WordPress

The easiest way to do add id attributes in WordPress is to use the Easy Table of Contents plugin, which supports WordPress versions 4.4 to 4.9.8 (note: WordPress 5.0 is not supported). A table of contents may be added to any particular page using the plugin settings, which appear at the foot of the page in edit mode, once the plugin is installed and activated. We recommend only level 2 headings be included (as it is recommended to have only a single H1 on the page, which makes no sense to be in the table of contents). Note that the table of contents only appears by default when there are 4 or more headings on the page. (This is customisable in the plugin settings.)

Be careful to configure the plugin as you require. For example, by default, only pages get a table of contents, not posts. This is easily changed, as follows, on the plugin settings.

wp-easy-table-of-contents-settings.png

It is important that each id attribute is unique on its page. Which means each heading appearing in the table of contents should be unique on the page.

In order to activate the table of contents for a long post or page, simply use the plugin controls at the foot of the page in edit mode.

wp-easy-table-of-contents-post.png

Once the table of contents has been activated for a page, internal links to its headings may be inserted on other pages, using the URL hash fragment, e.g. for the whole page URL: https://mysite.somewhere/interesting-stuff/ a single section may be referenced like this: https://mysite.somewhere/interesting-stuff/#Thing_One Note: these should be inserted on pages as site-relative links, e.g. /interesting-stuff/#Thing_One

The table of contents appears on the page like this.

wp-easy-table-of-contents.png

Redirects

Care must be taken when restructuring an existing site. It is essential that all previously ranking pages, or indeed any with incoming links, have 301 redirects to the new URL. This can be handled by the WordPress Redirection plugin.

Adding redirects using the plugin settings is straightforward.

wp-redirection.png

The plugin also has some other useful features, for example, finding broken links (404s) on the site.

Improving Performance with a Cache

WordPress builds content dynamically on each query, and this can be slow. Page speed is an important Google ranking factor in 2019, on both desktop and mobile. The slow WordPress dynamic content building is easily avoided by using a caching plugin, such as WP Fastest Cache.

Note that there are some steps required to use WP Fastest Cache with a CDN such as CloudFlare. The CloudFlare configuration may be done manually rather than entering CloudFlare credentials into the plugin.

Note that WP Fastest Cache is inactive until explicitly enabled on the settings page. There is some useful third party advice on choosing the most appropriate settings.