Optimizing WordPress for Search Engines

Dec 14 2009 by Matt Alexander | 102 Comments

So, you have this amazing WordPress site, but for some reason the search engines just don’t show you much love. You post killer content, make it easy for users to share via their social networks, and people are subscribing to your RSS feed, indicating that they’re like what they’re reading. If you’ve tried everything to drive traffic to your website, and search engines still ignore your site, maybe you need to evaluate how search engine friendly your website is.

Optimizing WordPress for Search Engines

In this article, I will go over a few steps you should take to optimize your WordPress installation for search engines. While WordPress has good SEO features out of the box, these tips will help you maximize your search engine results while also making sure your site is the best it can be.

1. Optimize your titles

By default, WordPress usually puts the title of your blog before the actual post title. Since most search engines only display the first 50-64 characters of your <title> tag, you want the actual blog post title to come first.

For example:

Tips for Making WordPress Friendly to Search Engines - YourSiteName.com

is better than:

YourSiteName.com - Tips for Making WordPress Friendly to Search Engines

Always be sure that the title of your post comes before anything else. Two main reasons are:

1. Search engines will like you more if the title of the post comes first. This helps them put more importance to the keywords in the title.

2. A descriptive and optimized title is one of the most important aspects of your page SEO. The title lets the search engine and users know exactly what this page is about before they visit it.

Optimize your titles

Use the All In One SEO plugin to keep the proper title formats over an entire blog without having to edit any template files. The above screenshot shows the settings we currently use on WPSwitch.

2. Use good meta descriptions

Most bloggers who use WordPress never do much on the SEO side for meta descriptions because they believe that the auto generated descriptions that comes standard with WordPress is good enough; but that’s not truly the case if you’re concerned about effective keyword indexing on search engines.

Use good meta descriptions

Your best chance of getting a high ranking on a per-post basis is by manually typing in a good description for every article you write. Again, I would suggest using the All In One SEO plugin as it allows you to do this very easily. By combining a keyword-rich title with a matching description, you are bound to see an increase in search traffic.

Use good meta descriptions

As you can see in the two screenshots above, by optimizing meta descriptions, one of our pages is able ranked highly (withing the first 5-10 results in Google) for a particular search term. Now that you know the importance of a detailed and keyword-rich description, I hope you see some great results.

3. Rewrite your URLs with permalinks

Permalinks are enhancements to your existing URLs that can improve search engine optimization by presenting your post, page, and archive URLs as something like:


rather than


Changing the default web addresses/URLs that WordPress generates to something more readable is effective to search engine optimization because it is presumed that URLs are taken into consideration when indexing and prioritizing search results. Often, these URLs are called "pretty URLs" because they’re much more readable and gives the users a clue as to what the web page will be about (as in the above comparison of URLs).

Making your permalinks friendlier and readable requires little more than a short trip to your WordPress admin panel. Once you are there, go to Settings > Permalinks and edit the settings as shown in this image below:

Use good meta descriptions

I prefer to include the category in my title and write the URLs like this:


This would result in a format that looks like:


if you want it even shorter you can exclude the category and just use the following value for the Custom Structure setting:


If you are now just setting up a new WordPress site, then you are set to go. If your site has been up for a while, than I suggest using the redirection plugin so that your visitors will not get the 404 page after you rewrite your URLs to pretty URLs.

4. Use breadcrumbs

Using breadcrumbs on a WordPress site is often overlooked but can be a huge benefit for your readers and for SEO. Links with good key words that relate to the post topic and links to internal web pages is one of the ways search engines determine the relevance of a web page to search terms.

Use breadcrumbs

By using breadcrumbs, you make it easier for the readers to navigate and help the search engines to discover the structure of your website. On WPSwitch, we use the Breadcrumbs Plugin written by Joost De Valk. It only takes about five minutes to set up. (Find more helpful WordPress plugins).

5. Generate an XML Sitemap for search engines

An XML Sitemap is a listing of all the pages and posts on your website. This helps the search engine crawlers get a machine-readable structure of your websites. Having a properly structured sitemap has great benefits in the search engines.

Thanks to the massive amount of plugins, generating a sitemap with WordPress is super easy. I suggest using the XML Sitemaps.

Generate an XML Sitemap for search engines

This plugin will generate a special XML sitemap that will assist search engines like Google, Bing, Yahoo and Ask.com in more extensively and accurately indexing your posts and pages. The plugin supports various WordPress generated pages as well as custom URLs. Additionally, it notifies all major search engines every time you create a post about the new content by pinging them.

6. Describe your post images meaningfully

Another often-neglected item in WordPress SEO is using proper and keyword-accurate alt and title attributes with images in a post or page. Adding a short description of your image using proper keywords can boost your search engine hits through image searches like the one from Google Images. Since you are using WordPress, adding alt and title attribute values to images is easy.

While saving your image, be sure to give a short and simple name with a dash between each keyword. For example, if you have a picture of a California Redwood tree, name it appropriately, such as california-redwood-tree.jpg or california_redwood_tree.jpg instead of something vague and non-descriptive like postimage03.jpg or screenshot20.jpg.

(read about tools for optimizing your images).

Once you place your image in a WordPress post or page, it will automatically use the title given as the proper alt description.

Describe your post images meaningfully

If it does not fill it in automatically, you can type a description in the title input field. By implementing these image attributes, it will also make it easier for people who use a screen reader to browse your site.

In summary: don’t neglect your images, name them properly, and assign meaningful title and alt attributes to them.

7. Link to related posts

One favorable method for helping search engines find content that is relevant to a given web page is adding a "related posts" section that links to other posts that have a connected subject.

By doing so, you also have the primary benefit of showing your readers other posts that they may want to read as well.

Many WordPress plugins will automatically generate a list of related posts for each of your posts. There are way to many too mention here, but you can find a list in the WordPress plugins section at WordPress.org just by searching "related posts".

WPSwitch currently usees the Yet Another Related Posts Plugin and it works very well. This is our favorite because it gives you a templating system that allows control over how the related posts are displayed.

8. Use good keywords in post headings

Search engines give more weight to keyword items depending on what type of heading that is being used. To get the most juice out of your titles, make sure the post title is an <h1>.

The name of your blog should only be an <h1> on your front page. On single, post, and category pages, it should be no more than an <h3>, some even choose to use other HTML elements such as a <p> element to keep the markup semantic. The title of your site does not need to carry as much weight as the topic you are writing about.

To make sure your site name is only an <h1> on the home page, you can use the code below and modify it to work with your theme in the header.php file. This checks to see if you are on the home page or other pages and decides what heading tag to use. Most people use this link for the logo of the site linking back to the index.

<div id="logo">
<?php if(is_home()) : ?>
  <a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a>
<?php else : ?>
<a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a>
<?php endif;  ?>

When fixing your headings on posts or pages find the code that looks like this:

<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>

Headings are super easy to edit and are found in the single.php and page.php and various archive pages of your WordPress theme. If your current theme does not use headings in this manner, I suggest you take a few minutes to make this easy change.

9. Avoiding duplicate content with robots.txt

With WordPress showing the same posts on multiple pages like the index, tag pages, archives, author pages, and category pages, it is very easy to have duplicate content. Duplicate content, in the eyes of search engines, is frowned upon. By creating a robots.txt file, you can completely avoid this issue.

If you want to create your own robots.txt file, you can use the following:

User-agent: *
 	Allow: /

Disallow: /wp-content/
 	Disallow: /trackback/
 	Disallow: /wp-admin/
 	Disallow: /archives/
 	Disallow: /*?
 	Disallow: /*.js$
 	Disallow: /*.inc$
 	Disallow: /*.css$
 	Disallow: */trackback/
 	Disallow: /c/
 	Disallow: /author/
 	Disallow: /tag/

User-agent: Mediapartners-Google
 	Allow: /

User-agent: Adsbot-Google
 	Allow: /

User-agent: Googlebot-Image
 	Allow: /

User-agent: Googlebot-Mobile
 	Allow: /

#User-agent: ia_archiver-web.archive.org
 	#Disallow: /

Sitemap: http://wpswitch.com/robots.txt

This is directly from the current Robots.txt we’re using over at WPSwitch. If you use this, be sure to change the Disallow: /c/ to whatever category structure you are using like /category/, for example.

We also disabled indexing of all .js, css, and .inc files that shouldn’t be search-engine crawlable.

A much easier way if you are not code-savvy is to use the Robots Meta plugin. This modifies the default one made by WordPress from your original install.


I covered just a few easy ways to create WordPress sites that search engines will love. I know this seems like a lot of busy work, but if you sit down for a few hours, the return of your time investment will be worth your time. If you feel overwhelmed by the many things listed here, you don’t have to do them all at once. Take a few minutes out of every day and do them one at a time. By the end of the week, you will have an SEO optimized blog that you and the search engines will be proud of showing in their search results.

Need help? Got questions?

If you still need some help or simply don’t have the time to make these changes, just give me a shout in the comments here or on WPSwitch and I will see what I can do to help you.

Related Content

About the Author

Matt Alexander is a passionate Web junkie from Dallas, TX specializing in WordPress blog design. He is currently a full time freelance designer and blogger at WPSwitch. If you need some help with WordPress you can always find him on Twitter.



December 14th, 2009

Very useful plugins.. thanks for sharing…

Malvinder Virdi

December 14th, 2009

Nice one dear., got here via Twitter….

Callum Chapman

December 14th, 2009

Great article Matt! I need to generate an XML Sitemap!


December 14th, 2009

Thank you for this article.
It’s very useful for me right now!


December 14th, 2009

I prefer to use simply website.com/post-title.

I’ll have to play around with my Robots.txt to include a few disallows because I do notice certain areas that don’t need to be crawled.



December 14th, 2009

Great. This is what I am looking for my entire life. Thanks man. You are genius!

Adam Wilson

December 14th, 2009

Nice post, but I have to totally disagree with the following:

2. Use good meta descriptions

Even google state that they do not use this as an indication for rank. (non the less, it’s still a good idea, as CTR is sure to be improved.)


December 14th, 2009

thank you very much !


December 14th, 2009

Thank you Matt for sharing all this usefull tipps with us. It was a good idea to bring some tipps for implementation of these special WordPress PlugIn. Thanx for the settings and the code snippet.


December 14th, 2009

Although Matt Cutts said WordPress had done about 90% job of SEO, to make some improvement is still worthy.


December 14th, 2009

Nice article. Very simple stuff that can have a great effect.
Thanks for sharing.


December 14th, 2009

Great article

Think i will be implementing these on my site this week!


December 14th, 2009

Great tips Matt. Quick question – where do you put the robots.txt file? and should the last line be the path to your sitemap.xml? or as-is in your example.

Ray Wenderlich

December 14th, 2009

Great post – I went through my blog and made these steps. Thanks very much!

Azterik Media

December 14th, 2009

Great post! Getting ready to head over to do a redesign of my site following these tips. Thanks for taking to time to put this together.


December 14th, 2009

Good post, I am going to go over a few of these steps to update my blog.

Ted Goas

December 14th, 2009

Good tips overall. Found a few new lines to put in my Robots.txt file.

Sitemap: http://wpswitch.com/robots.txt

That right? Should that point to your xml sitemap?


December 14th, 2009

This permalinkstructure may causes some performance-problems in WP.

Kevin Donnigan

December 14th, 2009

Great post! I just implimented all of this onto my site. Took less than an hour. Although, I only have 3 posts I had to update with the images tips. Cool XML plug-in too. Thank you so much!


December 14th, 2009

Great article – Will definitely be using on my future clients’ sites!


December 14th, 2009

Good post. I think a lot of people overlook the use of H1 and H2 tags for optimizing. Great way to add keywords, and great way to make posts more visually appealing and organized.


December 14th, 2009

very good post…even for professionals


December 14th, 2009

Good points. I use these same tools (with the exception of breadcrumbs which I am thinking about adding, haven’t because I usually do %postname%). All-in-one SEO is great, as is YARPP, Robots and XML sitemaps. I use SEO slugs as well to get the articles out of my links.

Robert McGuire

December 14th, 2009

These are all good things to do with any WordPress blog and for every post. But all of them are dependent on the content of your posts. If your posts are lousy or ill-formatted, then all these pointers won’t help as much as they normally could.


December 14th, 2009

Great post! Love that you brought up #6, people often forget about this!

Designer Aaron | wisnet.com

December 14th, 2009

Actually, here’s the article about Facebook and how it like’s the Meta title…as well as the description.


December 14th, 2009

Very helpful information Matt, thank you!


December 14th, 2009

We use this same permalink structure with all of our WP sites. Thanks for the other useful suggestions. Good post!


December 14th, 2009

Great post, short and informative, without too much jargon. I would love to see a version of this about Joomla….that would solve my problems…

Matt (wpswitch)

December 14th, 2009

@workdose You put the robots.txt in the first level of your site. such as http://mysite.com/robots.txt

Diane Bourque

December 14th, 2009

Excellent post. While I do most of this, there’s a few tips that I did not know about that I will add to my site. Thanks so much for sharing this.

Blogger Den

December 14th, 2009

Another great post for Six Revisions, I’ll have to submit this to Blogger Den as I’m sure it’ll hit the front page! :)


December 14th, 2009

Hi Matt,
How do you put no-follow tags in some places like the contact, about and other pages where the crawlers don’t need to go to? I heard that i have to tweak the css code to do this? Is there a plugin for this?


December 15th, 2009

Wow I had 6 out of the 9 suggested tips already done 6/9 that is not bad. Thanks for the rest three. lol

Shahriat Hossain

December 15th, 2009

Some tips are very helpful for me, Thanks.


December 15th, 2009

RT @Young Although Matt Cutts said WordPress had done about 90% job of SEO, to make some improvement is still worthy.


December 15th, 2009

Very useful article, thanks.

bono calacal

December 15th, 2009

Great post. I did not know about item #9 there. Thanks for sharing.



December 15th, 2009

Matt that was a great read. I really enjoyed the All in One SEO “Crash Tutorial” if you will as well as the Robots.txt. This will come in handy! Cheers


December 15th, 2009

Great post, Very useful tips.. thanks for sharing


December 15th, 2009

Very useful post.

now i will update my blog properly with this steps

Roger Duck

December 15th, 2009

Good WordPress SEO is critical to building a blog audience and you have covered the essentials. Great read.


December 15th, 2009

I’m building my way into the blogosphere and I did 80% of mentioned above in my new blog. This tips are very useful! Thank you!

2experts Design

December 15th, 2009

Really smart post, I will update things on my blog, thanks for great tips.

Jannis Gerlinger

December 15th, 2009

Hey, very good ideas! Thank you so much!


December 15th, 2009

Thanks for this article, i am considering doing summit on the net and ord press looks like a useful vehicle. i have saved this article in my browser for ease. thaks again. MK

Tyron Bache

December 15th, 2009

Great article thanks! Just what I was looking for :)


December 15th, 2009

Nice list!
I want to change the permalinks of my blog but can not do it. Cause all the links to my site will get break. Currently it is “Day and Name”.
whatever the list is awesome….


December 15th, 2009

Thanks for the great list Matt. I have already performed most of the steps you provide. But still there are just a few who come over my site.

Anyway, thank you very much, already bookmarked. God bless and more power.


December 15th, 2009

Great post wordpress can make seo quiet simple with a few tweaks that you mentioned above.

Chris McCorkle

December 16th, 2009

“2. Use good meta descriptions”

And make sure the content in your meta description is relevant to the content on the page! NEVER use the meta description as an introduction to your site, omitting the intro itself on the page!

“6. Describe your post images meaningfully”

If you’re using a transparent gif to space out cells, divs, etc, don’t forget to give them an alt tag too: alt=”" – the W3C validator will love you for it!

Also, very important for WP+SEO newbies out there: proper SEO does NOT mean you’ll instantly get a #1, #2, or even #9 ranking for searched terms relating to your site. Don’t forget to create great content and spread the word… you’ll (hopefully) get some backlinks and plenty of traffic to come along with it! SEO and marketing is a constant struggle to some, and an invigorating adventure to others. Don’t give up!


December 16th, 2009

Really helpful post – for websites in general, not just WordPress. I am off to build an XML sitemap!


December 17th, 2009

Very useful post!

On the way to better SEO :)


December 17th, 2009

Very useful article. Thanks!

Josh Tuck

December 17th, 2009

Interesting point on the order of content when writing the . I had not heard that before, so thanks for that tip!


December 18th, 2009

nicely explained.. i mostly use the post/article name as title of the page + save the images with post-name-01/02 and so on..


December 20th, 2009

Great article. From my experice, wordpress is the best CMS to be optimized for search engines. Thanks for the article.


December 22nd, 2009

Thanks for the tips, I like the duplicate content point.


December 27th, 2009

I would also suggest HeadSpace2 for SEO with WordPress. Here’s my guide to setting it up: http://gulati.info/2008/12/wordpress-seo-headspace2/


December 27th, 2009

Some good points. The WP super cache is also very good. Now page load speeds will be a ranking factor it is a good plugin.


December 28th, 2009

Great Tutorial, thanks!

Lars Tong Strömberg

January 3rd, 2010

Useful and pedagogic post. Thx!

PVC Stolarija Elatio

January 6th, 2010

Great tips. I now they will be usefull for my web :-)


January 7th, 2010

great post…

Justin Moore-Brown

January 8th, 2010

Love the plug-ins! Didn’t even know about these, but I’ll definitely take some time to install and use these properly!


January 15th, 2010

The only error I find is the sitemap address in the last line of robots.txt. For the curious, see Google’s very own robots.txt file, to see how Google includes its own sitemaps:


January 18th, 2010

very helpful article. So also you can use google webmaster tools for the best seo results
thank you.


January 24th, 2010

Thank you for the precise instructions on #8. I needed the actual code and finally found it on your site. Thanks – it worked perfectly!


March 6th, 2010

About duplicate content – is it a bad idea to have the same post show up in mulitple categories?

Thanks for the great tips!


March 23rd, 2010

yes. thanks man. as a man who first use wordpress, i am looking for this code. I want to change H-tag for my site name. In my homepage i want use h1. but in my post, i want to move it. thanks. If you don’t mind, please look for my H-tag.


March 23rd, 2010

Thank you so much, I am always concerned with image optimization, now I know how to optimize it.

Blogging Tips

April 11th, 2010

Great tips. I appreciate your knowledge. I like the use of breadcrumbs. Thanks.


May 11th, 2010

Thank you very much for this article. I will install all the rest plugins I should have but didn’t do it before. Just one recommendation – category is not very suitable to have in the URL (suggested by WordPress)


July 19th, 2010

Fortunately i’ve applied like half of these optimization tips into my site. Really a life saver and very useful. One thing i really need now is increasing traffic and unique visitors. Anyway, great tips here. Thanks in advance!


August 30th, 2010

nice article thanks

Radu Stefan

September 1st, 2010

Verry useful information, I used it on my blog and already i see some seo results, thank you for the guide!

andrew barbara

September 10th, 2010

cheers for the tips, new to the blogging world so will put them into action :-)


September 18th, 2010

Thanks for the tips – really valuable! Looking forward to increased visibility on the search engines! :)

Daniel Developer

September 24th, 2010

Good job! I will go apply this tips in my blog.


October 14th, 2010

For the meta descriptions … All in one SEO field didn’t work at all … all it gave back was a bunch of dates and other nonsense … entering the description in the default Excerpt form did the trick


October 18th, 2010

Matt, this is probably the best wordpress article i have read. I have tweeted this as i think some of our budding wordpress clients could do with the help. One of the good benefits of SEO through WordPress is the Share This Buttons and the Autotwitter plugin. Anyhow.. great post, easy to understand and a good contribution.


November 8th, 2010

My question is are there any themes that out of the box are spectacualr performers? SEO wise.

Which WP theme is considered the best in terms of SEO?


January 12th, 2011

This was a great post thanks for sharing this information with us.


January 26th, 2011

Thanks, I get XML site map, but I have a fatal error with All in one with my very french new WP blog !!
Thanks for all your tips.

Gonzalo LLorens

February 19th, 2011

Great post!
thanks for sharing this information.A #ff for you ;P

Pawel Poturalski

February 19th, 2011

#9 – nice way to eliminate double content, thnks ;)

Kevin Thomson

March 5th, 2011

The Custom Permalink Plugin is also a great way of making URL’s SEO friendly as you can define the URL exactly as you want it.


March 24th, 2011

Your Information is really helpful.The Custom plugin and All one seo Plugin are very effective. We want some more information about google index process and related plugins


April 27th, 2011

Mr. Alexander. I want to question for you. how to configuration Robots Meta plugin for wordpress. I’m waiting and thanks


April 29th, 2011

Thank you. A friend of mine created a theme for me but is now too busy to help and I am self teaching myself. your points were well noted and I’ve already implemented the XML Sitemap. Concise, clear advice that I have not been able to find until now. thank you so much Matt!


May 31st, 2011

I am a new blogger. Thanks for your grate information! Your tips will help me much!

Ken Richards

May 31st, 2011

Good list of advice. The one thing that I just can seem to get to work is the description meta tag – Although I put a (good I think) description in, Google always seems to grab a chunk of the text instead – usually not a horrible choice, but not as good as the one I want.


June 1st, 2011

Great. you are post very informative. these will be very useful at the beginner level of seo optimization and also we want know about seo in wordpress.


June 25th, 2011

Your Information is really useful.The Custom plugins and All of the SEO Plugins are very nice. We want some more details on google index process and related plugins.

Ligo Saint

August 5th, 2011

Thank you for the precise instructions on #8. I needed the actual code and finally found it on your site. Thanks – it worked perfectly!

Ben Norman

August 15th, 2011

Great advice here. Especially with the advice on the Robots.txt file. Breadcrumb links have also been useful from my experience. Helpful for users.


October 20th, 2011

great advise for my blog cum site, but this is very difficult to manage seo work without a good seo plugin in wordpress.
thanks again


October 24th, 2011

Very Good tutorial about Seo! I come to know many new things form your post. Thanks a lot!


November 7th, 2011

Thanks for all your tips, and I’m glad that I practise al of them :)


November 24th, 2011

Very good tutorials especially with clear screen capture. Makes me more easy to follow. Thanks alot.


June 14th, 2013

Good tips for creating a SEO friendly site using WordPress. I would also recommend to try certain plugins to acheive this task. I have used Allinoneseo and SEOYoast plugin in WordPress. SEOYoast is good for adding meta tags, description and setting a focus keyword for your page.

Leave a Comment

Subscribe to the comments on this article.