How to Make Your WordPress Blog Search Engine Friendly

SEO basics graphicsThe success of a WordPress blog is dependent on several factors and search engine optimization is one of them. If you're struggling to attract organic traffic for your blog despite publishing quality content on a consistent basis, probably you're not paying attention to the SEO basics. Though this guide is aimed at self-hosted WordPress users, publishers and bloggers using other content management systems can also take advantage of the generic SEO advice included in this tutorial. After applying the WordPress SEO tweaks mentioned below, overnight results are not guaranteed. It takes time for search engine crawlers to reindex the blog and to reassess the SEO tweaks applied on the site. Some of these SEO hacks can be applied instantly while others are a bit time-consuming. Whatever is the case, the application of these search engine optimization tips will positively affect your WordPress blog in the long run. Let's move ahead and make sure that our WordPress blog is correctly optimized for search engines from the core.

SEO basics graphics We write for humans, and they look for the information through different channels on the Internet. One such means is a search engine.

As a website owner or a professional blogger, we cannot afford to ignore the fact that organic traffic is and will remain the primary source of visitors for almost every site despite the addition of new and unique dimensions to this ever-changing web ecosystem.

Read Also:
Common Internal (Cross) Linking Mistakes to Avoid While Creating Blog Content

If your blog is well optimized for search engines, you are bound to get more organic traffic and that too - on a consistent basis bringing you more sales and conversions. So, let's get started and see how to prepare our WordPress blog for a good presence on all the popular search engines.

Optimize Title Tag Structure for All the Important Pages

Catchy headlines attract the immediate attention of the readers. Visitors from search engines are more likely to click your post if you've crafted a perfect title for each and every article. By default, the structure of the title tag isn't SEO-friendly.

<title><?php wp_title(); ?><?php bloginfo(‘name’); ?></title>
This way, your blog's title tag is formatted as Your Blog Name » Title of the Page, which is the least you require to optimize your blog posts. On a fresh WordPress installation, this setting is applicable to every page generated by the CMS.

You can easily override the default settings with the optimized version either with the help of plugins or through directly hard-coding the following code in the header file header.php of the child theme. The effect of this title tag configuration is site-wide.

if (is_home()) { 
echo bloginfo('description'); echo ' | '; echo bloginfo(’name’);
} elseif (is_archive()) { 
echo the_search_query(); echo ' | '; echo bloginfo(’name’);
} elseif (!(is_404()) && (is_single()) || (is_page())) { 
wp_title(''); echo ' | '; echo bloginfo(’name’);
} elseif (is_category()) {
echo single_cat_title(); echo ' | '; echo bloginfo(’name’);
} elseif (is_month()) {
echo the_time('F'); echo ' | '; echo bloginfo(’name’);
} elseif (is_tag()) {
echo single_tag_title(); echo ' | '; echo bloginfo(’name’);
} elseif (is_404()) {
echo 'Not Found | '; echo bloginfo(’name’);
Once applied, this custom code ensures that you get the most optimized title for each type of page generated by WordPress. It will also help you rank better in search results as well as in grabbing the attention of the potential visitors.

Write Contextual and Optimized Meta Descriptions

There are several important meta tags associated with a web page and one of them is the description meta tag. If written carefully and correctly, this meta tag can play a very important role in grabbing the attention of visitors while being listed in the search engine result pages.

Single Google search engine result Every search engine displays results in the form of content preview snippets which include the web page title with a short page description as shown in the image above.

Sometimes this description text is picked from the meta description tag and sometimes it is picked from the article's content body. The deciding factor for picking the description text is largely dependent on the search term/query typed by the visitor.

The more relevant and alluring is your description, the more is the probability that visitor will click and open your blog post. An optimal length for description is anywhere between 160-320 characters.

Get a Better Permalink Structure

The default permalink structure of WordPress pages helps neither a visitor nor search engines. It's cryptic and is generated dynamically associating post id as a variable to the URL of the post. An example is shown below.
To give a better understanding of what exactly a post is all about, you must change the default permalink structure. You can change it through Dashboard → Settings → Permalinks option.

Pro Tip: Switch your blog to a secure HTTPS version for a better SEO score.

Select Custom Structure sub-option to provide your own permalink structure. Some of the popular permalink structures are shown below. It's up to you which one you prefer to go ahead with.

Notice a trailing forward slash at the end of each permalink structure. This indicates the end of URL and helps in reducing additional HTTP requests by the server which in turn speeds up page loads.

Write Custom and SEO-Optimized Post Slugs

Every WordPress post is accessed through an absolute URL where the last part of the link describes the post topic. By default, it's generated automatically from the post title at the time of writing the article.

Generally, it is not optimized for search engines and includes unnecessary and sometimes redundant words and phrases. Fortunately, we can easily modify the post slug (as shown below) to get an optimized post URL.

Custom post slug within WordPress post editor You can see that editing a post slug is quite simple and can be done right within the post editor. It's an extremely important step (from SEO perspective) while writing a post and shouldn't be skipped at any cost.

In the example shown above, after editing, the custom post slug will be:
The unedited post slug will be something like this:
At a glance, one can easily deduce that the first URL having a custom post slug is comparatively much better both for the human eyes as well as for the search engine crawlers.

Try to keep your post slug as short as possible and make sure you're including a key phrase associated with the respective post. The best way to come up with a custom post slug is to include a phrase, a general visitor may type-in to search for the information available in the blog post.

Pay Attention to Anchor Texts (For Both Internal and External Links)

Using optimized anchor texts is a powerful tactic and is often overlooked by newbies. Here I'm talking about a clickable link text/label created within a blog post. Sometimes they're pointing outside your domain and sometimes they're referring your old content.

Whatever is the case, an optimized anchor text helps both the visitors and the search engines to assess the page content it is pointing to.

Anatomy of a hyperlink Use a key-phrase consisting up to 2-6 words which correctly indicates what information it is referring to. If you look carefully, you may find some optimized anchor texts right within this post. Can you identify them?

Use NoFollow Attribute for Select Links

When used properly, rel="nofollow" attribute for hyperlinks can help spread link equity evenly across your website's domain. It helps in preventing the flow of link juice to unwanted directions. Here are some important situations where you may use this attribute for maximum SEO benefit.

  • Social account links - Almost every website include links to its social media profiles on every web page. There's no point passing link juice to these destinations. So, make sure you add the nofollow attribute to these links.
  • Redundant links - It may happen that two or more than two links point to the same page within a single blog post. There's no need to pass link juice for every duplicate entry. Simply nofollow each one of them except the one with the optimized anchor text.
  • Advertisements - Now, this one is quite obvious! Isn't it so? Paid links should never pass link juice else you may end up getting your site banned on search engines. If you're having a paid link on your blog, nofollow it without giving it a second thought.
  • Comments and user-generated content - All the blog comments and other types of user-generated content (e.g. forum threads) should be nofollow too. If you're a WordPress user, most probably, these links are automatically assigned a nofollow attribute by the CMS. Still, there's no harm once cross-checking it.
  • Grey links - Sometimes, you may write about a site/blog to which you may not want to pass the link juice. This can be a spammer, a hard-hitting rival, or a shady site. In such cases, don't hesitate to use nofollow to avert passing of the link juice.
If you're not sure about a specific link, it's better to leave it in the default state. Make sure you once audit all the nofollow links on your blog, every quarter of the year.

Add Important Robots.txt Directives for Bots and Crawlers

A robots.txt file is a simple text file generally present in the root directory of any website. As the name suggests, this file control how spiders and various bots crawl and index your blog.

It's a very powerful tool through which you can avoid indexing of unnecessary and duplicate content. It can also be used to deny access to sensitive directories and files. Here's a sample robots.txt file one can use for his WordPress blog.

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /wp-*
Disallow: /feed/
Disallow: /trackback/
Disallow: /rss/
Disallow: /tag/
Disallow: /cgi-bin/
Disallow: /*trackback
Disallow: /*.css
Disallow: /author/
Disallow: /comments/
Disallow: /*?*
Disallow: /*?
Disallow: /*.php$
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$

User-agent: Googlebot-Image
Allow: /wp-content/uploads/

User-agent: ia_archiver
Disallow: /

User-agent: duggmirror
Disallow: /

Sitemap: https://wwww.yourdomain.tld/sitemap.xml
The directives included above blocks access to sensitive and unnecessary directories. It also allows image indexing crawlers to access the uploads directory.

Sitemap location is also provided in this file. Feel free to edit, remove, or modify these directives as per your needs.

Address Canonicalization Issues (If Any) Without Any Fail

Another problem that needs your attention is multiple URLs pointing to the same web page. This can be a huge blow to all of your on-site optimization efforts if it is not corrected in time. To understand it better, take a look at the following list of URLs.


On the surface, it may look as if these URLs are pointing to the same location, but search engines may see them as different destinations.

If not configured properly, this may lead to confusion and conflict for the crawlers leading to duplicate content issues which may also result in page rank split across multiple URLs for the same destination.

The end result will be a penalty for duplicate content which in turn will trigger a drop in search result rankings. How to get rid of this problem such that all similar URLs lead to one single URL of your preference avoiding any kind of confusion for spiders?

The solution is to use few directives within .htaccess file. Like robots.txt, this file is also present in the root directory of your blog.

If you want all your non-www URLs to automatically redirect to the www version or vice versa, you can use the following directives in your .htaccess file that issues a 301 permalink redirect for every single URL across your domain.

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

#Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.tld$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.tld/$1 [R=301,L]

#Redirect www to non-www
RewriteCond %{HTTP_HOST} !^yourdomain\.tld
RewriteRule (.*) http://yourdomain/$1 [R=301,L]
This is just one simple example that deals with the canonicalization issue. There are several other things you may want to tweak or configure through .htaccess directives.

For example, you may want to block hot-linking of media files that takes away your precious bandwidth and increases server load. It can be done with a simple directive through the .htaccess file.

Include Breadcrumbs Navigation on the Blog

Breadcrumbs are hierarchical (horizontally-aligned) navigation links that aids in easy browsing within a website as shown below. These links help you get an idea of where you are and what can you expect as you go down further or backward.

Example of breadcrumbs on a website Breadcrumbs can be made resembling the actual physical directory structure or it may be based on the logical partitioning of different content sections. In any case, it gives a clear view of the site structure and gives a better browsing experience to the visitors.

Breadcrumbs included in search engine result pages From an SEO perspective too, breadcrumbs integration is recommended by the experts. These navigational links aids in better crawling of the site.

In case, some of your pages are not indexed due to unknown sitemap errors, these breadcrumbs make sure your every single page is indexed properly. Google also picks up breadcrumbs and include in result pages as shown above.

You can include these breadcrumbs either with the help of a plugin or by using a theme that supports it out-of-the-box.

Avoid Breaking Comments into Pages

WordPress gives you an option to paginate your post comments. By default, this option is disabled and I'll strongly suggest you keep it that way.

In fact, most blogs (with a low or medium volume of comments) don't need this. The problem with comment pages is the generation of duplicate content.

Comment settings for WordPress Each comment page (except the first one) is a duplicate entry of the original post. Unless until you get a very high number of comments, keep this option disabled, otherwise you may risk getting your blog penalized for generating duplicate content.

Switch to Post Excerpts Instead of Full Post Body

By default, home page and different types of archive pages display full post content in their listings. This essentially leads to duplicate content with master copy on a single post page and a duplicate copy appearing on an archive page.

This situation may hurt your SEO efforts and may negatively affect your search rankings. To resolve it, display post excerpts instead of full text on these pages. There are two simple ways to do it.

Post excerpt option via screen options To use the first method, open the post editor and click the Screen Options link and check the Excerpt box. This instantly activates the excerpt input field on the same screen.

Before publishing the post, you can write a custom excerpt in this box. For best results, keep the excerpt's text different from the opening paragraph of the post. Try to keep the excerpt length below 60 words.

More tag within a blog post The second method is much simpler than the first one. While writing the post, you can insert a More tag at the desired place. You can insert this tag quite easily through a button as indicated in the image above by a red arrow.

If you're working in the text mode, insert the <!--more--> HTML tag at the desired place. All the text above this tag is automatically interpreted as an excerpt by the content management system.

Use SEO-Optimized Images

Almost every blogger uses images in his posts. These images add value to the content and make it more attractive for the readers. But, from an SEO perspective, few things need to be taken care of while using images for your blog posts.

Read Also:
How to Make Your Blog Photos Attractive and Sticky for the Readers

Firstly, make sure you do not upload the original images as it is. The key here is to first optimize a photo for a smaller file size. Thereafter, upload the optimized version of the image on the blog.

This reduces the page size which in turn speeds up the loading of the page. It's necessary because Google considers page speed as one of the ranking factors.

Image alt text setting in WordPress Using a compressed and optimized image is half the job done. For each uploaded image, provide an ALT text (as shown above) which correctly describes what the image is all about.

This helps in getting your images to get a good presence in image search results which is another good source of organic traffic for your blog.

Keep the Sitemap Up-to-Date and Accessible

And last but not the least, make sure your blog's sitemap is in a healthy state. Keep it updated so that bots and crawlers can easily get the information about your site's structure and content.

You can use a popular sitemap generation plugin that automatically updates the sitemap, every time you publish new content.

Sketch of a sitemap Make sure you've set the correct file permissions for your sitemap else indexing bots will not be able to access it at all. A simple directive within robots.txt (mentioned in one of the previous sections) file indicates a crawler about the location of the sitemap file.

Over to You

This completes the guide with some of the most essential search engines optimization techniques necessary for every WordPress blog. Lastly, make sure you're consistently publishing useful content for your readers. Without it, all your SEO efforts will go in vain.