Wordpress theme SEO (Part 1)



Wordpress LogoIt has been more than 1 week I didn’t update Crispnetworks. Life has been busy. Lots of projects at work and spending lots of time with my girlfriend.

Well, as promised in my update one my blog’s technorati and alexa ranking, lets explore some wordpress theme search engine optimization (SEO) that you can do for your wordpress theme so that your blog ranks better in Google.

Give Your Wordpress its Own Directory

Some reader asked me about how I changed my blog URL from http://www.crispnetworks.com/blog to http://www.crispnetworks.com when I blog about Crispnetworks.com updates. Now let me take you through the steps that I took to do that.

First step is to give your wordpress its own directory. I installed my wordpress in the folder “/blog/”. Here’s the steps I took:

  1. Go to the Options panel. (This is in the wordpress admin dashboard)
  2. In the text box for Wordpress address (URL): you have to change the address to the new location of your main Wordpress core files. I believe most of you installed it in the folder “/blog/” like I did. So your address should be http://www.yourdomain.com/blog/
  3. In the text box for Blog address (URL): change address to your domain only. Example, http://www.yourdomain.com
  4. Click Update Options button.
  5. Copy the index.php and .htaccess files from the Wordpress directory (in the “/blog” directory) into the root directory of your site (Blog address).
  6. Open your root directory’s index.php file in a web editor or text editor.
  7. Change the following line and save the file.

    Change the line

    require(’./wp-blog-header.php’);

    to

    require(’./blog/wp-blog-header.php’);

  8. Login to your wordpress admin dashboard. It should be http://www.yourdomain.com/blog/wp-admin/

Change Permalink Structure

Now you should change the permalink structure of your blog posts to make it more search engine friendly. Go to your Wordpress admin dashboard and go to the options menu, in the submenu go to Permalinks.
Select the custom structure, use either:

/%category%/%posname%/

or

/%posname%/

Using such permalink structure is to make sure your blog posts is keyword rich. This way, it will help to rank your blog posts higher for the keyword you are targeting. Personally, I prefer to use just /&postname%/. However, you should consider using /%category%/%postname%/ if you planned to use same post titles.

.htaccess

Secondly, lets look at how to make your blog point to your domain (www.blogDomain.com) instead of the root directory where you install your wordpress by modifying the .htaccess file. Default htaccess files looks like below:

<IfModule mod_rewrite.c>
# BEGIN WordPress
ReWriteEngine On
ReWriteBase /
ReWriteCond %(REQUEST_FILENAME) !-f
ReWriteCond %(REQUEST_FILENAME) !-d
RewriteRule . /index.php [L]
</IfModule>

Simply add 2 lines into the .htaccess file at the end of the line before </IfModule>.

ReWriteCond %{http_host} ^BLOGDOMAIN.com [nc]
ReWriteRule ^(.*)$ http://www.BLOGDOMAIN.com/$1 [r=301,nc]

Change the BLOGDOMAIN to your domain name. In my case, I change it to crispnetworks.
It looks like this:

<IfModule mod_rewrite.c>
# BEGIN WordPress
ReWriteEngine On
ReWriteBase /
ReWriteCond %(REQUEST_FILENAME) !-f
ReWriteCond %(REQUEST_FILENAME) !-d
RewriteRule . /index.php [L]
ReWriteCond %{http_host} ^DOMAIN.com [nc]
ReWriteRule ^(.*)$ http://www.DOMAIN.com/$1 [r=301,nc]
</IfModule>

Now all visit to your wordpress will redirect to your domain, including robots.

That’s all for now. I’ll come out with the second part soon which will cover robot.txt, duplicate contents and the headers in wordpress theme. I hope that this first part will help you to make your wordpress theme more search engine friendly.

Popularity: 24% [?]

Share This Post: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • De.lirio.us
  • SphereIt
  • StumbleUpon
  • Technorati
  • Furl
  • Netscape
  • Reddit
  • YahooMyWeb
  • Linkter
  • NewsVine
  • ThisNext
  • Slashdot
  • Spurl

Similar Posts:

RSS feed | Trackback URI

4 Comments »

Comment by Jimmy Subscribed to comments via email
2007-07-15 15:47:42
MyAvatars 0.2

Great! this was I’ve looking for. I got question. Last 2-3 days I found the solution similar to yours but the only different is the code doesn’t have … I wondering what the different having and not having it in .htaccess

One more question is, what is the different between Wordpress Address (URL) and Blog address (URL)

 
Comment by Tommy Chieng
2007-07-15 17:20:19
MyAvatars 0.2

By having it in .htaccess, you are actually having more control of how your website or blog is access by your readers. The codes that I posted was to redirect your domain from domain.com to http://www.domain.com.

Besides using it for this purpose, .htaccess can be configured for many other purposes. If you are interested, you can refer to the site below for more information:
.htacess Ultimate Guide

As for your last question, actually both Wordpress Address and Blog Address can be the same. The main reason to make it different is to have your blog in your domain root. Unless, you have a website homepage on your domain root and blog on a subdomain or subfolder it is recommended that you put your blog address in your domain root. This will help your blog to get higher rank and not fall into Google’s Supplementary index.

I hope my simple explanation answered your question. Cheers. :wink:

 
Comment by Jimmy Subscribed to comments via email
2007-07-16 10:28:28
MyAvatars 0.2

ReWriteCond %{http_host} ^DOMAIN.com [nc]
Wouldn't this will effect all subdomain also ?

 
Comment by Tommy Chieng
2007-07-16 14:55:29
MyAvatars 0.2

Yes you are correct. The codes are assuming that you are installing your blog in a directory and not subdomain.

 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.