Valuable SEO tips for WordPress
By admin • Nov 13th, 2008 • Category: AdviceA few months back I came up with a list of important SEO tips for WordPress, but someone else beat me to the punch. I’ve been sitting on the list since, but decided to share it today because it’s obvious differences.
Many of the tips are already well known, and can be found in one form or another on copy-and-paste-job blogs, but I am going to go a step further and explain why each tip is important, and what would happen to your blog if you don’t follow it.
The common themes among today’s tips are the incorporation of keywords and stopping duplicate content.
1) Allow Search Engines
Allowing search engines into your blog is a no-brainer, but many people who are just starting with WordPress forget about this traffic blocker. This is typically set when you install WordPress:
And can be changed in the Privacy section of your WordPress settings:
If you do not allow them your site will not be listed in search engines.
2) Customize Permalinks
Permalinks is another word for the URL of your blog post. When you first set up WordPress these show up in the form of:
http://thatsmith.com/?p=582
Which doesn’t tell visitors much about the post. If you just installed WordPress, the second thing you should do is go to Permalinks under WordPress settings and change the structure of the permalinks to something friendlier:
This will give you addresses in the form of
http://thatsmith.com/2008/11/wordpress-seo-tips/
Which is better on the eye, includes keywords, and tells the visitor and potential visitor what the post is about. Not changing the structure of your permalinks won’t hurt you any (unless you follow tip #4), but it will not help your chances of increasing traffic either.
3) Optimize your page titles
The third thing you should do is edit your theme to optimize your page titles. The default theme always places the title of your blog first, which is ok if you only care about ranking well for your blog name, but does nothing to help you rank for other terms.
<title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
- WordPress Blog
- WordPress Blog » Blog Archive » Hello world!
- WordPress Blog » About
Change the title of all your pages in one fell swoop by replacing the title above in header.php with:
<title><?php wp_title(”); if ( is_home() ) { bloginfo(‘name’); ?> – <?php bloginfo(‘description’); } if (is_archive()) { ?> archive<?php } elseif (is_search()) { ?> Search for <?php echo $s; } if ( !(is_404()) && (is_search()) or (is_single()) or (is_page()) or (function_exists(‘is_tag’) and is_tag()) or (is_archive()) ) { if (!(is_page())) { ?> -<?php } ?> <?php bloginfo(‘name’); } ?></title>
Your page titles will now appear as:
- WordPress Blog – Just another WordPress weblog
- Hello world! – WordPress Blog
- About WordPress Blog
4) Optimize your robots.txt
WordPress doesn’t ship with a robots.txt file. The reason we want one is to eliminate duplicate content in search engines. If you don’t know what duplciate content is or why it’s bad, look it up. In short, duplicate content is when your post shows up in more than one place.
If I post “Hello World”, that post is visible on the index, under /2008/11/hello-world/, /category/uncategoried/, /2008/, /2008/11/, /tag/hello-world/ (if set), plus not to mention /?p=1, /?cat=1, and so on. This means my one post has to compete with itself in search engines at least 5 times unless I do something about it. This is where robots.txt and meta tags come in.
Create a new file in Notepad named robots.txt and paste the following:
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/mu-plugins
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /trackback
Disallow: /feed
Disallow: /comments
Disallow: /category/*/*
Disallow: /tag/*/*
Disallow: */trackback
Disallow: */feed
Disallow: */comments
Disallow: /*?*
Disallow: /*?
Allow: /wp-content/uploads
Allow: /files# Google Image
User-agent: Googlebot-Image
Disallow:
Allow: /*# Google AdSense
User-agent: Mediapartners-Google*
Disallow:
Allow: /*# Internet Archiver Wayback Machine
User-agent: ia_archiver
Disallow: /# digg mirror
User-agent: duggmirror
Disallow: /
Now, upload it so it’s visible at yourdomain.com/robots.txt
This file tells search engines do not index addresses in the form of above. If you did not change your permalinks in Tip 2 then everything is blocked by Disallow: /*?*, so you should probably go change them now.
Again to express the importance of robots.txt, if you write a post about something you really want to rank for, such as “WordPress SEO tips”, you will not rank well if you do not follow this tip because your one post is visible and will be indexed at more than one address.
5) Add robot meta tags
Robots.txt files are good because they tell search engines not to look at those pages, but as you see in the picture above, they do not block everything. Pages such as /2008/, /2008/11/, /page/2/, /search/hello-world/, and so on are still crawled and indexed. This is where Meta Tags come in.
Just before </head> in your header.php file add:
<?php if((is_single()||is_page()||(is_home()&&!is_paged()))&&!is_attachment()) { ?>
<meta name=”googlebot” content=”index,follow” />
<meta name=”robots” content=”all,index,follow” />
<meta name=”msnbot” content=”all,index,follow” />
<?php } else { ?>
<meta name=”googlebot” content=”noindex,noarchive,follow” />
<meta name=”robots” content=”noindex,follow” />
<meta name=”msnbot” content=”noindex,follow” />
<?php } ?>
This is similar to what’s been posted on other WordPress SEO tips, but has two important differences.
First, attachment pages are no longer indexed. This is important because if you have a keyword-rich post at /wordpress-seo-tips/ and a popular attachment, you do not want /wordpress-seo-tips/attachment-page/ competing with your post.
I forgot about the attachment pages when I posted my GrandCentral Firefox Addon and ended up getting a large chunk of traffic directly to one of the images.
Second, index pages (/page/2/, /page/3/, …) are not indexed. This reduces the amount of duplicate content even further.
6) Plan your post titles
When writing quality content, or just simply rambling, a well formed post title can go a long way. The post title ends up being both a header tag in the page and the page title, which is what shows up to possible visitors in search engines.
Use descriptive titles that include strong keywords, but also keep it short so potential visitors will take time to read it. Problogger has always done a good job of providing tips on how to write good post titles as well as a workshop. When I write post titles and page slugs I also try to put myself in the shoes of potential visitors and think about what they might search for. This technique hasn’t failed me yet.
7) Don’t skip the slugs
Page slugs are equally as important as a good page title. As we all know, there are 2-3 parts that make up every search result in Google. 1) the page title, 2) the meta description or page snipplet (optional), and 3) the page URL.
This image reminds me I should probably set a META description for my JavaScript SEO tips post.
The page slug is used to set the address of the page and is also seen in search engines. This gives you a second chance to assign keywords to your posts, and again should be descriprive of what the page contains. I typically use my second choice for the page title as my page slug.
Bonus Tips:
8) Use the All in One SEO Pack to generate meta keywords and descriptions
9) Use the Sitemap Generator plugin to create a sitemap
10) Optimize your image filenames
On BEER dad I get a ton of traffic because the images in my posts. A lot of it comes from carefully selecting alt descriptions, but the bulk is because I always give good-descriptive-names-to-each.jpg. Image filenames are just like page slugs and should be given careful consideration because they also show up as part of the search result.
admin
Email this author | All posts by admin