The definitive guide to higher rankings for WordPress sites
Optimizing your site using the tactics and best practice outlined in this article will help you improve your rankings, gain more subscribers or sales, and have a better website in general.
Because good SEO should be ingrained in all aspects of your online marketing and PR, this guide covers quite a lot of ground! It’s a long read, so feel free to use the table of contents below to jumping around.
Table of Contents
- The definitive guide to higher rankings for WordPress sites
- 1 Get your basic WordPress SEO right
- 1.1 Optimize your URLs
- 1.2 Optimize your page titles
- 1.3 Optimize your descriptions
- 1.4 Optimize your images and media
- 1.5 Manage your XML sitemaps
- 2 Optimize your templates
- 3 Advanced WordPress SEO and duplicate content
- 4 A site structure for high rankings
- 5 Conversion optimization
- 6 Comment optimization
- 7 Off-site blog SEO
- 8 Measuring results
- 9 Conclusions on WordPress SEO
1 Get your basic WordPress SEO right
Out of the box, WordPress is a pretty well-optimized content management system. A basic setup can provide a strong foundation – even without extensive customization, theme optimization and plugins. That said, there are a few things you should do to increase your chance of ranking, refine your workflow, and make sure your website is perfectly optimized.
By putting the right basic settings in place, and applying a few simple techniques, you can ensure that you have a strong foundation to build upon!
1.1 Optimize your URLs
1.1.1 Pick the right permalink structure
Your permalink settings define what format your page and post URLs will take, which can have a big impact on SEO.
So if you’re creating a new site, one of the first things you should do is change your permalink settings, which you can find in Settings → Permalinks.
If you don’t change your settings from the default, all of your pages and posts will have URLs which look like
example.com/?p=123. Whilst this is perfectly okay, it’s not particularly nice, and it might impact how users and search engines perceive the quality and relevance your pages.
Changing the permalink structure alters the components, ordering and structure of your website’s URLs. It’s important to select the right structure when initially setting up your website, as changing it later can cause SEO issues.
We usually recommend that people use a structure which creates URLs which look like
example.com/category/post-name/, depending on how much importance they anticipate placing on the categorization of their content. For most sites, choosing either of these options will be perfectly suitable.
For the first option, you can just change the permalink setting to
/%postname%/, like so
To include the category, you can select “Custom Structure” and change the value to
If you previously had
?p=<postid> as your permalink WordPress will take care of all the redirects for you. This is also true if you change from
If you have an established site and change from any other permalink structure, you might want to consult our article on changing your WordPress permalink structure and the tool that you’ll find within it.
1.1.2 Choose WWW or non-WWW
You need to think about what you want your site to show up as www.example.com, or simply example.com. Make sure that in your general settings, in Settings → General, the version you want to show up is properly reflected:
From an SEO perspective, there’s little difference either way. Additionally, most hosting and server setups will automatically redirect requests for the ‘wrong’ version, to the version you’ve selected. That makes this primarily a branding consideration – which approach feels best for your site?
From a technical perspective, there’s not a huge amount of difference, either. Some setups might have some minor headaches if they omit the ‘www’ component, but these are increasingly rare.
1.1.3 Remove stopwords
When you publish new content, you may also wish to consider removing ‘stopwords’ from your permalinks. These are words like “a”, “and”, and “the”.
When done carefully, this may make your permalinks more readable, and easier to use or link to. Posts with especially long titles may benefit from this approach.
For posts which have already been published, we’d recommend being careful when changing permalinks. If people have already linked to your pages, changing the URLs may make a mess. Even though WordPress will sometimes redirect users to the new location (Yoast SEO Premium handles this automatically, and more reliably), changing URLs can impact performance.
1.1.4 Make sure you’re using SSL and HTTPS
Historically, adopting SSL (getting an HTTPS URL, and a green padlock icon in the browser URL bar) was an optional tactic. Many sites, arguably, didn’t need the extra level of security which SSL provides.
Now, however, having a valid SSL certificate installed is mandatory — search engines may ‘penalize’ sites without valid SSL certificates and setups (and/or show warnings next to their search results). It’s also generally good practice for all websites to use SSL, to prevent hackers and third parties from intercepting requests and data.
Additionally, many modern site speed and performance techniques require a valid SSL/HTTPS setup. To take advantage of new, faster web technologies (like HTTP/2), browsers like Google Chrome and Firefox require the website to have a valid SSL certificate.
If you want to move to SSL and ensure that your site is served correctly over HTTPS, we have an article with tips & tricks for moving to HTTPS right here.
1.2 Optimize your page titles
Each page’s title – the contents of the HTML
<title> tag – can be one of the most important factors for ranking well in search results. Not only is it the literal title of the tab or browser window, but it’s also the first line people see in the search results. It describes what your page is, or is about, and acts as an advert which encourages users to click.
On many websites, the default structure for posts and pages isn’t necessarily the most optimal approach for SEO. A title like “My blog » Cooking » Carbonara recipe” isn’t as compelling or effective as “My 20-minute delicious carbonara recipe | My Blog”.
It’s critical that you think about the structure of your titles, as well as the content of the title on each individual page. Typically, it’s worth considering that:
- Search engines may put more weight on the early words – so trying to get your keywords near the start of the title might make you more likely to rank well.
- People scanning result pages see the early words first. If your keywords are at the start of your listing your page is more likely to get clicked on.
For more info on how to create enticing titles for your posts, read our article on crafting good titles for SEO.
1.2.1 Define your page title logic
You can control your SEO titles with our Yoast SEO plugin. There are two parts of the plugin that control these. First of all, as soon as you install & activate the plugin, you get an ‘SEO’ section in your admin.
Navigate to SEO → Search Appearance and you’ll see a bunch of tabs for different types of pages on your site.
For each post type and taxonomy, you can set a so-called Title Template (as well as meta description templates but we’ll get to those later).
For posts on our site this looks like this:
This allows you to use components and variables to control what how your page titles should behave by default (and of course, these can be overridden on a page-by-page basis).
For example, in the image above, you can see how we’re automatically grabbing elements like the
title of the page, to stop us from having to manually write titles from scratch for every page.
There are all sorts of variables you can use in the titles and meta description, and they’re all listed and explained in the help tab on the page.
For advanced users, there are some additional cool features. For instance, you can use
cf_<custom field name> to drop in any custom field – either from a post meta value or a user meta value.
NOTE: When you use these templates, be sure to check that your title tags behave as expected when viewed on the site – if they don’t, you may have a problem with the way your theme is built, and you might need to check the “Force rewrite” checkbox in our options – or you can follow these instructions to modify your templates.
1.2.2 Optimize your individual pages and posts
So now that we’ve set decent templates, we can start to optimize individual posts and pages. For that we use the snippet preview area, which is added by the Yoast SEO plugin:
This preview will automatically take the values you’ve already filled in in your blog post and apply them to your template, but you can also override the title completely using the title field just below it:
The input will show a warning below it if your title is becoming too long. The title length is not a fixed amount of characters but rather limited to the length of the display in the search results.
For titles the following things are important:
- They should always contain your brand, preferably at the end, so people may recognize you in consecutive searches.
- They should always contain the keyword you think is most important for the current post or page, which we’ll call the focus keyword from now on. The focus keyword should preferably be close to the beginning of the title.
- The rest of the title should entice people to click.
- Bear in mind that search engines may change how they present your title, alter its content, or ignore it entirely if they think it’s not relevant to the page, ‘spammy’, or poorly structured.
1.3 Optimize your descriptions
A meta description is primarily used search engines to show a description of your page in the search engine results, usually below your page title.
Tailoring and writing a descriptive meta description can encourage users to click your results in the search engine, even if you’re not necessarily ranking in the top position. It’s an advert, and your opportunity to impress.
Writing compelling, informative descriptions of your page content for every page on your site is best practice and gives you the opportunity to attract more visits.
Whilst it might feel like a lot of work to craft descriptions for every single page and post, it’s worth the effort.
If you don’t provide a meta description, the search engine will generally try to find the keyword which was searched for in your page, and automatically pick a string around that (and highlight the searched phrase in bold in the results page).
Automatically generated snippets (whether by plugins, or search engines) rarely as descriptive or as compelling as hand-written ones. So, we recommend that you use the meta description field you find in the Yoast SEO plugin to write a meta description. Make sure it entices the reader to click through and make sure that it contains the focus keyword of your post or page at least once.
1.4 Optimize your images and media
An often overlooked part of WordPress SEO is how you handle your images. By thinking of how you name and format your files, and writing descriptive accessible text descriptions, you can get yourself a bit of extra traffic from the different image search engines. Next to that, you’re helping out your lesser able readers who check out your site in a screen reader, to make sense of what’s otherwise hidden to them.
You should avoid using generic stock photography whenever possible (as research shows that users believe these to be less trustworthy and authentic, which could impact your SEO), and, to use large, clear, high quality media.
Using the proper alt attributes for images is also something that is checked in the content analysis functionality of our Yoast SEO plugin.
1.5 Manage your XML sitemaps
To tell Google and the other search engines that your site has been updated, you can use XML sitemaps. Our Yoast SEO plugin automatically configures your XML sitemaps, so you don’t have to worry about anything. We generate sitemaps for your different post types, including your images, and make sure that it generates and loads really quickly.
We intelligently split your sitemaps up into smaller bits, so Google only has to fetch one new XML “sub”-sitemap when a post is published.
You can check and manage which types of your content, archives and templates should be included in your XML sitemaps in your SEO → Search Appearance settings. Content types which are set to not show in search results will be automatically excluded from your XML sitemaps.
Lastly, our XML sitemaps support has a pretty complete API, allowing developers to add or change functionality through their plugins and themes. Our own Local SEO, News SEO and Video SEO extensions (which generate their own, specific sitemaps) are built on this API, and, other plugins frequently build their own solutions on top of our system.
2 Optimize your templates
2.1 Configure your breadcrumbs
You’ll probably want to add breadcrumbs to your posts and pages. Breadcrumbs are the links, usually above the title post, that looks like “Home > Articles > WordPress SEO“. They are good for two things:
- They allow your users to easily navigate your site.
- They allow search engines to determine the structure of your site more easily.
These breadcrumbs should link back to the homepage, and the category the post is in. If the post is in multiple categories it should pick one.
To get breadcrumb navigation to show you on your pages, you may need to adapt your
page.php files in your theme, and include the code for breadcrumbs from our Yoast SEO plugin. You find the settings and instructions on how to do that in the SEO → Search Appearance section.
2.2 Use headings correctly
HTML heading tags are used to structure webpages, and can be helpful in describing a page’s layout and focus to users and search engines.
Using the wrong kinds of headings, or using them in the wrong order, can make your content harder to understand.
The headings which you use in your post content should ‘flow’ naturally, as they describe different parts of the page and content. The page you’re reading right now is a great example of how headings should be used to break up different sections!
Although most themes for WordPress get the basics right, it’s worth making sure that your template sets your post title is an
<h1> tag, and that you’re not using
<h1> tags anywhere else in your page or your post content.
To learn more about why proper headings are important please read this article on headings and SEO and our article about the heading structure for your blog (from which a lot applies to non-blog WordPress sites too).
2.3 Clean up your code
2.4 Aim for speed
A very important factor in how many pages a search engine will spider on your blog each day is how quickly your site loads. A lot of different factors affect your site speed, but there are some easy things you can do to get started.
- Optimize the template to require as few database calls as possible. We’ve highlighted how to do this in our post about speeding up WordPress.
- Install a caching plugin. We recommend you use W3 Total Cache if you’re technically savvy, or WP Rocket if you’re not.
- Caching plugins works even more magic when combined with a CDN like MaxCDN or Cloudflare. Read more about WordPress CDN stuff here.
Also, be aware that underpaying for hosting, is not wise. If you actually want to succeed with your link-bait actions and want your blog to sustain high loads, go for a good hosting package. If you want to know more be sure to read our article about WordPress hosting.
2.5 Rethink that sidebar
Do you really need to link out to all your buddies in your blogroll sitewide? Or is it perhaps wiser to just do that on your front page? Google and other search engines these days heavily discount site wide links, so you’re not really doing your friends any more favor by giving them that sitewide link, nor are you helping yourself: you’re allowing your visitors to get out of your site everywhere, when you actually want them to browse around a bit.
The same goes for the search engines: on single post pages, these links aren’t necessarily related to the topic at hand and thus aren’t helping you at all. Thus: get rid of them. There are probably more widgets like these that only make sense on the homepage and others that you’d only want on subpages.
Someday you will probably be able to change this from inside WordPress, right now it forces you to either use two sidebars, one on the homepage and one on subpages or write specific plugins.
2.6 HTML sitemaps
For some sites, an HTML sitemap might be nonsense, especially when your site is really a blog, for more corporate type sites with several levels of pages an HTML Sitemap might actually be very beneficial for both users and search engines. We’ve written an article on how to create an HTML Sitemap Page Template which would be a good start to get one going for your WordPress site.
3 Advanced WordPress SEO and duplicate content
Once you’ve done all the basic stuff, you’ll find that the rest of the problems amount to one simple thing: duplicate content. Loads of it in fact. Out of the box, WordPress comes with a few different types of taxonomy:
- date based
- category based
- tag based
Next to that, it seems to think you actually need to be able to click on from page to page starting at the front page, way back to the first post you ever did. Last but not least, each author has his own archive too, under
/author/<author-name>/, resulting in completely duplicate content on single author blogs.
In essence, that means that worst case scenario, a post is available on 5 pages outside of the single page where it should be available. We’re going to get rid of all those duplicate content pools, by still allowing them to be spidered, but not indexed, and fixing the pagination issues that come with these things.
3.1 Noindex, follow archive pages and disable some archives
Using the Yoast SEO plugin, make sure to prevent indexing (or even existence) of archive pages that do not apply for your site. You do this under SEO → Search appearance, where you’ll find the following options on the “Archives” tab:
The settings above are the settings for our site. As you can see, we’ve completely disabled the date based archives, as we don’t use those. Any date based link will redirect to our homepage because of this setting. We’ve left the author archives untouched, but we have set the subpages of those archives to be noindex, follow by default. So you’ll never land on page 2 of an archive on our site from the search engines.
On smaller sites, it might make sense to noindex either the category or the tag structure, but in our experience noindexing those on yoast.com does little to no change at all.
There is one type of archive that is noindex,follow by default as well in the Yoast SEO plugin: the search result pages. This is a best practice from Google for which a setting is left out as you should just have that anyway.
A lot has changed in how Google handles paginated archives when they introduced their support for
rel="prev" links. We’ve written an article about that:
rel="prev" for paginated archives, which is a bit too technical to fully list here, but suffice to say our Yoast SEO plugin takes care of all the needed changes automatically.
3.2 Disable unnecessary archives
If your blog is a one author blog, or you don’t think you need author archives, use WordPress SEO to disable the author archives. Also, if you don’t think you need a date based archive: disable it as we have. Even if you’re not using these archives in your template, someone might link to them and thus break your WordPress SEO…
Thirdly, you’ll want to make sure that if a bot goes to a category page, it can reach all underlying pages without any trouble. Otherwise, if you have a lot of posts in a category, a bot might have to go back 10 pages before being able to find the link to one of your awesome earlier posts…
There’s an easy fix, in fact, there are several plugins that deal with this. Our favorite one by far is WP-PageNavi, maintained by Scribu, one of the best WordPress developers around. If you have the Genesis Theme like we do here on Yoast.com, you can just enable numeric navigation under Theme Settings → Content Archives.
In February 2009, the major search engines introduced the
rel="canonical" element. This is another utility to help fight duplicate content. WordPress has built-in support for canonical link elements on single posts and pages, but it has some slight bugs in that. It doesn’t output canonical links on any other page. With our Yoast SEO plugin activated, you automatically get canonical link elements for every page type in WordPress.
4 A site structure for high rankings
Blogs are spidered so easily due to their structure of categories, tags etc.: all articles are well linked, and usually, the markup is nice and clean. However, all this comes at a price: your ranking strength is diluted. They’re diluted by one simple thing: comments.
4.1 Pages instead of posts
You’ve probably noticed by now, or you’re seeing now, that this WordPress SEO post is actually… not a post. It’s a page. Why? Well for several reasons. First of all, this article needed to be a “daughter”-page of our WordPress page, to be in the correct place on this blog. Secondly, to rank for the term [WordPress SEO], this article has to have the right keyword density. And that’s where things go wrong. Comments destroy your carefully constructed keyword density.
That’s why we decided to make our most important articles into pages. That way, you can easily update them and do a new post about what you’ve changed.
4.2 New wine in an old bottle
If a post on your blog becomes incredibly popular and starts to rank for a nice keyword as this one did for WordPress SEO, you could do the following:
- create a new page with updated and improved content
- change the slug of the old post to
- publish the new page under the old post’s URL, or redirect the old post’s URL to the new URL
- send an e-mail to everyone who linked to the old post that you’ve updated and improved on your old post
- wait for the links to come in, again;
- rank even higher for your desired term as you’ve now got:
- more control over the keyword density
- even more links pointing at the article
- the ability to keep updating the article as you see fit to improve on its content and ranking
Some among you will say: I could have 301 redirected the old post to the new one with the same effect. True. Except: you’d lose the comments on the old post, which is in our opinion a sign of disrespect to people who took the time to comment, and 301 redirects take quite a bit of time sometimes. Of course, you should treat this technique with care, and not abuse it to rank other products, but we think it can be done in everyone’s benefit. For instance this article: if you came here through a social media site like Facebook, expecting an article about WordPress SEO, that’s exactly what you got!
4.3 Linking to related posts
Internal linking is incredibly important to help Google understand your site structure. You should not only show related posts under your post but also create links in your text to other related posts. The more links a post or page gets, the more important it will be to the search engine. In Yoast SEO we now have a text link counter, if you see that one of your essential, or cornerstone articles, has very little links, you can start working on that right away.
In Yoast SEO Premium we even offer an internal linking tool that helps you find the right posts or pages to link to.
4.4 Go easy on the tags
One of the most common issues we encounter on sites is the overuse of tags. Note that a tag in and of itself does not improve your SEO. The only way it improves your SEO is by relating one piece of content to another, and more specifically a group of posts to each other. Read more about using tags and categories for SEO.
5 Conversion optimization
Get those readers to subscribe!
A lot of bloggers still think that because their blog is a blog, they don’t have to optimize anything. Wrong. To get people to link to you, they have to read your blog. And what do you think is easier: getting someone who is already visiting your blog to visit regularly and then link to your blog, or getting someone who visits your blog for the first time to link to your blog immediately? Right.
One of the things we’ve found to be very important, and more bloggers seem to have found this, is that an RSS subscribe button is very important, as is offering a way to subscribe by e-mail. We offer a weekly e-mail subscribe options, using MailChimp, and have found that people tend to click through on those the most.
Another thing to be very aware of is when people might want to subscribe to your blog. If they’ve just finished reading an article of yours, and really liked it, that would be the ideal time to reach them, right? That’s why more and more people are adding lines like this to the end of their posts: “Liked this post? Subscribe to our newsletter and get loads more!”
Another great time to get people to subscribe is when people have just commented on your blog for the first time, for which purpose we use our own comment hacks plugin. Which leads us to the next major aspect of WordPress SEO:
6 Comment optimization
Get those readers involved
Comments are one of the most important aspects of blogs. As Wikipedia states:
The ability for readers to leave comments in an interactive format is an important part of many blogs.
Comments are not only nice because people tell you how special you are, or that you made a mistake, or whatever else they have to tell you. Most of all they’re nice because they show engagement. And engagement is one of the most important factors of getting people to link to you: they show you they care, and they open the conversation, now all you have to do is respond, and you’re building a relationship!
6.1 How you get people to comment
The easiest way of getting people to do anything is: ask them to do it. Write in an engaging style, and then ask your blog’s readers for an opinion, their take on the story etc.
Another important thing is your comment links. Is your comment link “No comments »”? Or is it “No Comments yet, your thoughts are welcome »”? Feel the difference? You can change this by opening your
index.php template, search for
comments_popup_link() and changing the texts within that function.
6.2 Bond with your commenters
Another thing to do is thank people when they’ve commented on your weblog. Not every time, because that gets annoying, but doing it the first time is a very good idea.
Justin Shattuck thought the same and created the Comment Relish plugin which sends an email after someone has made his first comment, unfortunately, this plugin is no longer maintained. Another option, which is maintained and is also a bit less obtrusive/spammy, is to install our comment redirect plugin. This plugin allows you to redirect people who have made their first comment to a specific “thank you” page.
6.3 Keeping people in the conversation
Now that people have joined the conversation on your blog, you should make sure they stay in the conversation. That’s why you should install the subscribe to comments plugin, that allows people to subscribe to a comment thread just like they would in a forum, and sends them an e-mail on each new comment. This way, you can keep the conversation going, and maybe your readers will be giving you new angles for new posts.
7 Off-site blog SEO
If you’ve followed all of the above WordPress SEO advice, you’ve got a big chance of becoming successful, both as a blogger and in the search engines. Now the last step sounds easy but isn’t. Go out there, and talk to people online.
7.1 Follow your commenters
There’s been a movement on the web for a while now that’s called the “You comment – I follow“. They want you to remove the nofollow tag off of your comments to “reward” your visitors. Now we do agree, but… That get’s you a whole lot of spam once your WordPress blog turns into a well-ranked blog… What we do advocate though, is that you actually follow your visitors! Go to their websites, and leave a comment on one of their articles, a good, insightful comment, so they respect you even more.
If you think that’s a lot of work, do realize that, on average, about 1% of your visitors will actually leave a comment. That’s a group of people you have to take care of!
7.2 Use Twitter
Twitter is a cool form of micro-blogging / chatting / whatever you want to call it. Almost all the “cool” people are on there, and they read their tweets more often than they read their e-mail if you even knew how to reach them through e-mail.
To boot, if you use Twitter Tools, all of your posts can be announced on Twitter, which will usually get you quite a few early readers! People will feel even more happy to comment on Twitter, which might get you into an extra conversation or two.
7.3 Find related blogs, and work them
If you want to rank for certain keywords, go to Google, and see which blogs rank in the top 10 for those keywords. Read those blogs, start posting insightful comments, follow up on their posts by doing a post on your own blog and link back to them: communicate! The only way to get the links you’ll need to rank is to be a part of the community.
8 Measuring results
A good SEO campaign relies on not only implementing changes but also measuring the impact of those changes, seeing what works and doing more of that. Two great Analytics packages to measure results are Google Analytics and getClicky. We have an article on how to track your SEO with Google Analytics. Useful plugins for these analytical packages are MonsterInsights and our Clicky plugin.
You can also measure results by tracking rankings, the problem with rank tracking though is that it’s hard to determine “real” rankings because of personalized and localized search results. Really the best outcome of being great at WordPress SEO is to get more traffic.
Another great source of data is Google Search Console. By exporting and sorting through your search queries and impression data, it’s easy to identify opportunities where you could focus on improving clickthrough rates, content, and/or rankings. Here’s a handy guide to get started with Google Search Console.
Be sure to read our article about cornerstone content for advice on how to identify and take advantage of these opportunities!
9 Conclusions on WordPress SEO
This guide gives you a lot of stuff you can do on your WordPress site. It goes from technical tips, to conversion tips, to content tips, to conversation tips, and a whole lot in between. There’s a catch though: if you want to rank for highly competitive terms, you’ll have to actually do most of it and create great and compelling content in the process.
If you want to keep updated on the latest news about WordPress, SEO and our plugins, then subscribe to our newsletter right now.
You might also want to read: