WordPress Search Engine Optimization (SEO)

It looks like a lot of the people who comment here have their own WordPress blogs. I was recently asked by Lou Dalo:

What Do You Do to Make Your Blog Search-Engine Friendly?

If you are a marketer and you don't have even a simple blog, you are committing marketing suicide.

Reasons Why:
Product Launches, Name Recognition, Sales Momentum

Reason #1: Thanks to pinging, new blog posts get indexed in a matter of hours, not days. This means if you link from a blog post to a new product, that sales letter gets indexed quickly as well.

If you own a blog... try it! Make a post, then later in the day go to Google and type in the post title as a search phrase. I guarantee you, within 8 hours your blog post will be listed.

Reason #2: Many people will do research on a product and Google your name before they buy something. In 2004 I added Simple PHP Volume 1 into the eBookWholesaler membership site and got a flood of sales and newsletter opt-ins... even though there was no link to my site!

People Googled my name and found my site. If you have a blog and mention your products, they'll find your blog when looking for your products.

Reason #3: On your blog you have a list of all your products so people who have bought product #1 can find product #2 and product #3 and product #4. This means you get repeat sales.

Register YourName.com This Instant...
Before Someone Else Grabs It and Makes It Into A Porn Site!

I could go on and on with the reasons. If YourName.com is available, register it now and stick a simple WordPress blog on it today. I don't care if you don't have anything to put on it yet. Through all of 2007, RobertPlank.com contained nothing but my personal resume. When I was ready to write a blog, I finally did.

Who cares if your blog is brand new and only has one post on it? If you are building a list like you should be doing, it doesn't matter if you take 6 months to write another blog post because you can send a quick mailing to your list and they'll come right back.

Great, you know how important a blog is, you have a blog setup, now let's make a couple of tweaks to give you a huge advantage other the 99% of bloggers who post garbage...

There is a lot of free info about WordPress search engine optimization floating around, but some of the information is crap.

I took some of the best advice and several of my blog posts have jumped from page 2 in Google to page 1. One went from spot #5 to spot #1.

Here is EXACTLY what I did to my blog to make it search engine friendly:

SEO Tip #1: Permalinks

If you only make ONE change to your blog today, make this change.

By default, WordPress tries to link to your posts using a numeric ID which I just hate.

What you need to do is go to Options, Permalinks... then specify a Custom permalink structure with this value:

/%postname%/

They will give you special HTACCESS code to upload to your site if you haven't messed around with permalinks already.

Making that change in WordPress will make your posts look like:

http://www.example.com/your-post-title

Instead of:

http://www.example.com/?p=38

SEO Tip #2: Edit the TITLE Tag

My most effective SEO change by far was changing the code for the TITLE tag.

By default, WordPress sets your TITLE tag as: Blog Name » Post Title. You don't want that. That's what's going to appear in the search engine results! If you write a post called "SEO" you want the title to be just "SEO" ... not "Site Name » SEO."

Edit your header.php template and replace your TITLE tag with this:

<title>
<?php if (is_home()): ?>
<?php bloginfo('name'); ?>: <?php bloginfo('description') ?>
<?php elseif (is_category()): ?>
<?php wp_title(''); ?>: <?php bloginfo('name'); ?>
<?php elseif (is_date()): ?>
<?php wp_title(''); ?>: <?php bloginfo('name'); ?>
<?php else: ?>
<?php wp_title(''); ?>
<?php endif; ?>
</title>

SEO Tip #3: Edit the META Tags

I added a meta tag inside the HEAD tag of the HTML code... again, in header.php... to prevent duplicate content penalties. This code:

<?php if ((is_home() || is_single() || is_page()) && (!is_paged())) {
echo '<meta name="robots" content="index,follow" />';
} else {
echo '<meta name="robots" content="noindex,follow" />';
}?>

... Will tell search engine robots to spider the front page, individual posts, categories, and so on... but STAY AWAY from pages where you can leave a comment... as well as categories. The contents of those pages are going to look almost exactly the same.

SEO Tip #4: Edit robots.txt

One last change I made to my blog was the robots.txt file. I told robots to stay out of the WordPress control panel and the template folders. This will make sure that the only search results for your site are REAL content pages, no junk pages.

User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content
Disallow: /tag
Disallow: /author
Disallow: /i/
Disallow: /f/
Disallow: /t/
Disallow: /wget/
Disallow: /httpd/
Disallow: /c/
Disallow: /j/
Disallow: /*/de/
Disallow: /*/ru/
Disallow: /*/nl/
Disallow: /*/zh/
Disallow: /*/ko/
Disallow: /*/ja/
Disallow: /*/pt/
Disallow: /*/it/
Disallow: /*/fr/
Disallow: /*/es/

# Google Image
User-agent: Googlebot-Image
Disallow:
Allow: /*

# Google AdSense
User-agent: Mediapartners-Google*
Disallow:
Allow: /*

You might want to take that last bit out if you use AdSense on your blog.

Thanks to Andy for pointing out that tips #3 and #4 can be very well managed using the meta robots plugin.

More WordPress Tips for Marketing Blogs

  • Use a blog template that shows the title of the site inside the H1 tag, and the post title inside the H2 tag.
  • Have your sidebar on the right side, not the left.
  • Link to previous posts when possible to make sure all your pages get indexed.
  • Put an opt-in form in place of where you would normally stick AdSense.
  • Send an e-mail to your list when you make a blog post to get them to comment on it. See the 10-comment rule.

If you've made the above changes to your blog, go ahead and leave a comment with the URL to your blog that's now all SEO'd out.

Filed in: Site Building

Comments (35)

Trackback URL | Comments RSS Feed

  1. Those are some great tips Robert. I agree on getting the yourname.com thingy. I boooked aritrimbasu.com in 2006 but I am not ready to blog yet! I do have some tech related blogs and I will implement your tips specially the meta and the robot.txt. Thumbs up!

  2. Donna Maher says:

    Robert, how many ways can I say “I love you for this post”??? I have been wracking my tired old brain for over two weeks trying to figure out HOW some people get page names instead of that dreadful, worthless /?p=whatever!

    I searched, read, I looked through multitudinous plugins, and never did find anything to help me!

    Then, I read your post today, got a HUGE grin on my face, went straight to my namesake blog and did *exactly* what you said. [Bear in mind that messing with the .htaccess file has always scared me a bit…lol]

    TADA! In less than 5 minutes, all my posts have NAMES now… not those stupid meaningless numbers and characters we both dislike so much.

    Thank you, thank you, thank you!

    (Oh, I’m going to do the other things too, but this newfound trick was my *biggie* for the week!)

    Blessings,

    Donna 🙂

  3. Aaron says:

    Here’s another tip. Do this in your custom permalink structure

    /%post_id%/%postname%/

    This way when you do email broadcasts to a specific page you can then just reference the post_id and still get the search engine benefits.

    http://examplewebsite.com/123

    instead of

    http://examplewebsite.com/this-is-my-really-long-blog-post-title

    Aaron

  4. Andy Havens says:

    Hi Robert,

    Thanks for the great tips. They were mostly easy to implement. Didn’t have to mess around with .htaccess for some reason. Nothing came up. It all took about 10 minutes.

    Now if I can only figure out how to stop wp from redirecting my index page when using a addon domain (hint hint)

    Thanks again,

    Andy

  5. Ian Sneddon says:

    Hi Robert

    You mention above, having your SideBar to the right, instead of the left. I can quite see why you would believe that to be necessary, from an SEO standpoint. However, with a little judicious use of CSS, you can still have the SEO benefit of your Post content appearing before the SideBar content, ‘on page’ and still have the Sidebar on the left hand side.
    This may appear ‘contradictory’, but it has been expounded on some of the more ‘esoteric’ CSS sites and indeed, I have seen it ‘in action’ in a Joomla template.
    Just thought I’d stir the ole grey cells a bit, just in case you were getting a bit ‘complacent’ LOL.
    Great tips BTW.
    New product idea ‘WP tweaks and tips??’
    You can send my 10% Idea Creation Fee to the usual PayPal address.
    Kind regards

    Ian

  6. Phil Rogers says:

    I take the permalink a little further because my blog has categories. So the permalink structure I use is
    /%category%/%postname%/

    Really useful tip about setting the title. Thanks for that.
    And the robots.txt, too. So often overlooked, but very important.

  7. Robert Plank says:

    Ian, are you talking about using the float property to pull that off? Because I have seen it work fine in some browsers and totally destroy the others. Unless you are talking about using the direction property… making the outer cells right to left and the inner cells left to right?

    I would call that a SPECIAL CASE. So many templates are made by “designers” with little or no thought to search engine optimization. Most designs with a left-hand sidebar are going to be written the normal way, then people use it and the text of their post body is 10 pages down in the HTML code.

    I thought about making a WordPress product about a year ago, but now there are so many, and just like in another comment I said I wouldn’t pursue any WordPress plugins… most people expect this kind of info to be free and won’t pay as often.

    Phil, my blog has categories too but if you are trying to target for keywords you want that permalink to be as short as possible.

  8. Andy Beard says:

    Hi Robert

    It looks like you might not have caught up with the Matt Cutts interview with Eric Enge on how robots meta noindex and robots.txt are being treated by Google.

    You might want to do some research into dangling pages.

  9. Robert Plank says:

    Andy,

    Maybe you could be more specific. It looks like that interview says if you add something to robots.txt, it will stop indexing it for updates but it will remain in the search results. So to really remove the wp-admin pages, you’d need to add:

    <meta name=”robots” content=”noindex,follow” />

    … Inside the HEAD tag of your /wp-admin/admin-header.php script… to get it out of the index.

  10. Andy Beard says:

    If you block them with robots.txt, then they won’t be crawled, so doing both isn’t a solution.

    If you use noindex follow, then the page won’t appear in search results, but any links from the page will be followed, back to internal pages, or potentially external pages.

    Thus you either have to have careful control of your sitewide sidebar and footer links, or use the add link attribute plugin to nofollow the links (more universal and easier on the hair every time WordPress is updated)

    I actually like duplicate content pages being indexed, because it can give you a competitive edge to rank for multiple terms with the same piece of content.

    As an easy and well known example, for most of the last year I have ranked near or at the top for day job killer, without any link building other than a couple of internal references.
    In addition my tag page dayjobkiller is ranking for searches on dayjobkiller.

    The same happens with Jack’s Social Power Linking with and without spaces.

    Other solutions for some of the problems include using lots of 301 redirects, or removing certain features such as author pages all together.

    The best shortcut to all this is to not try to reinvent the wheel unless it is something unique.

    http://www.joostdevalk.nl/wordpress/meta-robots-wordpress-plugin/

    For other meta stuff there are lots of options, but my preference currently is swaying to Headspace 2

    As an example of how pages blocked with robots.txt can still rank very well, try a search for WordPress SEO – that page of mine is now blocked because Google look on it as paid links, but since it was blocked it has actually risen in the rankings.

  11. Robert Plank says:

    Andy, you are a damn genius. I just added the meta robots plugin to my blog… super easy. But I’m staying far away from HeadSpace2… looks like overkill to me.

  12. Andy Beard says:

    Headspace might seem like overkill, but you can use it for unique meta descriptions in the SERP.

    You could use the custom excerpt and many plugins use that, but I use the custom description elsewhere, and have those generated automatically when I am lazy with another plugin, excerpts editor.

    The Headspace programmer also has a really good plugin for handling 301 redirects automatically, and tracks 404 errors. That is something anyone considering changing their URL permalink structure should be careful about.

  13. Lowell says:

    Robert,

    Thanks, the genius of PHP strikes again. Great post! I’m gonna check my robots.txt file and try messing with some of the php in my templates to see what happens.

    Also thanks to Andy for jumping in.

  14. Wow, feel like I just took an advanced course in blog optimization. Robert, I hope maybe a future release of yours contains all these nice PHP tricks? Also wanted to thank you for your recent PHP blackhat release. I’ve been able to put all the scripts to good use.

  15. Robert Plank says:

    Kenneth, I’m not sure. I’m really against creating a product that depends on someone else’s product, especially something like WordPress that could be totally different in a future version 2 or 3 years from now.

    I like to make my products as futureproof as possible. I have barely touched Simple PHP Volume 1 in 5 years, and the scripts in that book still work perfectly fine.

  16. Geoff says:

    Awesome information, thanks

  17. Thanks Robert. Tips 1 & 2 are instantly noticeable. I tried doing tip one before and it crashed the entire blog. I had to delete everything and start over. Obviously I did something wrong and was a little leary of trying it again, but it worked fine this time.

    Great advice.

    Steve

  18. Robert Plank says:

    Steve, the same thing happened to my friend Steven Schwartzman when he tried to make the change on his blog.

    It turned out when he copy and pasted the code into his htaccess file, he did it wrong and some of the lines ran together.

    So, if your whole site seems to crash like that, don’t worry… it’s just the htaccess file.

    Backup the htaccess file if there’s something important in there or erase everything in there otherwise.

  19. nuera says:

    I agree all the tips.. nice post! now I found the way to optimize my wordpress blog…

    thanks….

  20. Holy Cow!
    THAT was a COOL post!!
    Thank You!!

    Some short comments:

    Like Phil, I use /%category%/%postname%/
    Because the catagories are keyword relevant as well.
    (or they should be. LOL)

    Andy said:
    “The Headspace programmer also has a really good plugin for handling 301 redirects automatically, and tracks 404 errors.”

    Tracks 404s AND handles 301s!
    What plugin is that?

    Finally, a small addition for ya on the title tag.
    I use this:

    ID, ‘Subtitle’, $single = true);
    if($subtitle !== ”) { echo ‘: ‘ . $subtitle; }
    } ?>

    It just incorporates some other pages that might be accessed.
    It could also be keywords for a product
    that you promote on your 404 or something.
    Ya know?

    What do you think?
    Is it going overboard?
    Can you think of any other pages that should be included?

    Thanks again for a great post Robert!
    Got ya in my feedreader 😉
    Brad.

  21. Oops!
    The code got whacked!
    Wonder why?

    Hmm…

    Here it is without the “”.
    Lets see if that works.

    Edit this craziness if I make a mess when I hit submit.
    K Robert?

    Sorry in advance.
    Here goes…

    <title>
    <?php if (is_home()) {
    echo bloginfo('name'); echo ": "; echo bloginfo('description');
    } elseif (is_404()) {
    echo '404 Not Found';
    } elseif (is_category()) {
    echo 'Topics:'; wp_title('');
    } elseif (is_search()) {
    echo 'Search Results';
    } elseif (is_day() || is_month() || is_year() ) {
    echo 'Archives:'; wp_title('');
    } else {
    echo wp_title('');
    $subtitle = get_post_meta($post->ID, 'Subtitle', $single = true);
    if($subtitle !== '') { echo ': ' . $subtitle; }
    } ?>
    </title>

  22. Robert,

    I’ve just come across your blog a couple of weeks ago and I have to say that you give some great content, tips and ideas not only on how to build a business with a blog but practical stuff that all of us can apply – such as the WordPress tips for SEO.

    By the way, I’ve got my site SEO’d and here is the link: http://www.comicbookcollecting.net. Please take a look and let me know your thoughts.

    Also, how do I go about putting a opt-in form on my site and a comments form such as you have here. Keep up the good work. God bless.

    Patrick Whitson

  23. Robert Plank says:

    Hey Patrick, I really like the clean template on that blog. Everything looks good except I would crop the header graphic so takes up less space, so people will get pulled in by the content.

    Also, how do I go about putting a opt-in form on my site and a comments form such as you have here. Keep up the good work. God bless.

    I am self-hosted with ListMail Pro: http://www.listmail.com. Or you can sign up for a third party like http://www.aweber.com or http://www.emailaces.com.

    For attaching the opt-in form to the comment form: I use http://www.actionpopup.com — it has instructions to make a small change to your WP theme to make it work.

  24. Robert,

    Thanks for taking a look at my site. I will do that for the header image and I will take a look at your actionpop tonight.

    Another question. How would you recommend I draw some people to my site and then get them to opt-in? Your blog is one “have to” come back to site that will be bookmarked. Thanks.

    Patrick Whitson

  25. Patrick says:

    Robert,

    I checked out your ActionPop script and I decided it would be a good investment for my Comic Book Collecting site to start collecting e-mails. I’ll be reading the info on it and implementing asap. Thanks again.

    Patrick Whitson

  26. Robert Plank says:

    Patrick, I have a couple of articles on this blog about list building but what I did personally was I built up a huge list of buyers for a couple of years before even starting the blog.

    I priced all my infoproducts really low and used things like dimesales (price increasing with every sale) to get people on a list, provided lifetime upgrades then increased the price.

    Now every time I make a blog post I send a mailing out to my list and tell them I need 10 comments on that post before I make another post.

    You can get more people to your blog if you add your forum URL to your signature on forums related to the comic book niche and start building a reputation on those. You can also comment on other peoples’ blogs in the same niche as you.

    I’ve seen some other bloggers offer a giveaway with each post, i.e. you take some freebie and mail it in the physical USPS mail to the person with the best comment.

    But luckily you’re being smart and gathering opt-ins on the site from the beginning.

  27. dave says:

    O. K.

    I’m on step 2 and already confused.

    Is header.php the same as admin-header.php ?

    If not, what folder is header.php in?

    Thanks for the post Robert, based on you reputation I’m confident these changes will help a bunch with seo.

    Best Regards,
    Dave

  28. Martinus says:

    Nice tips Robert, I’ve dedicated them to our species http://www.man.org 🙂

    Dwight

  29. Aghper says:

    How do you upgrade wordpress to new version?do you use any plugin?I know there is a manual way,just wondering.thanks.

  30. Trevor Baret says:

    Robert,

    Here is the perfect example of why I am glad you didn’t turn off comments on your blogs after you asked our opinions a few weeks ago..

    Look at the great extra information in the feedback.

    Your comments become a discussion, in which people who really know their stuff can add to your original post

    I, for one, am going to copy this entire post and keep it as a guide for all future wordpress sites.

    Thanks once again for all of the great information.

Leave a Reply

Back to Top

wpChatIcon