Monday, August 16, 2004

Blogger SEO tips

I thought I publish a couple of blogger SEO tricks I have come up with, they may help you out. I have just recently made these changes to my blog and have not been able to gauge the results yet but I believe only good can come of this.



1. You must publish your blog via FTP or SFTP to a PHP enabled server. Sorry ASP users, no support at this time.



2. You must add the following to your .htaccess file
AddHandler application/x-httpd-php .htm

AddHandler application/x-httpd-php .html
If you are already using .php extensions for your files you will not need to do this. Also if you are using extensions other than .html and .htm you will have to add them to the .htaccess file as well. .htaccess file configuration is outside of the scope of this posting but Google has plenty of information.



You are still reading so I assume you qualify for the two requirements so let's get started.



Optimizing the title text

The first tip is to optimize the title text of your posts. This is accomplished by removing your blog's name from the title.



In the Blogger interface select Template. This will allow you to edit your current template. Once in this Template screen search for the line that reads <title><$BlogPageTitle$></title>. <$BlogPageTitle> is a Blogger variable that outputs "Your Blog Title" on the main page or "Your Blog Title: Your Post Title" on a post page. This is fine for the main page but a post page would be better just containing the title of the post. This is accomplished by replacing:



<title><$BlogPageTitle$></title>



with (The below is one line of text):



<title><?php echo str_replace('<$BlogTitle$>: ','','<$BlogPageTitle$>'); ?></title>



With this chage complete, save your template and republish your blog. One drawback with this replacement is that your archive pages will now have a title containing only the time period for which the archive is for. I may post a workaround for this shortly.



Adding meta keywords

The next tip is adding keywords to your posts. Most if not all Blogger templates do not offer keywords. Adding keywords is very similar to replacing the title text as illustrated in the first tip.



Again, log into Blogger and edit your template. This time locate the line that contains <$BlogMetaData$>. Create a new line below this tag and paste the following code (The below is one line of text):



<meta name="keywords" content="<?php echo str_replace('<$BlogTitle$>: ','','<$BlogPageTitle$>'); ?>" />



This will add your blog title as a keyword to your main page, your post titles as keywords to your post pages and, unfortunately, add the archive dates as keywords to your archive pages.



That's it for now please leave a comment if you find this useful.

5 comments:

  1. Hi, just like you i run a blog att blogger, and have my onw ftp-server, where i run php. do you know how i could access the blogger tags via php, for example i would like to get the length with strlen on <$BlogItemBody

    ReplyDelete
  2. Thanks for the tip - http://circleofdionysius.blogspot.com

    ReplyDelete
  3. Hi,
    I'm new to meta tags and am wondering if you could give me a tip. I've been blogging (at Blogger) for four months and still haven't been listed in the MSN search engine. Do you know what lines I could add in my template to get meta tags for keywords and a description? I've just inserted a couple of lines under the BlogMetaData but I think I've done it incorrectly. At least that's what the html validator says. My site is AquarianDigest.Blogspot.com

    Thanks much for any tips

    ReplyDelete
  4. Hi, is there any way I can use a custom header image I've created instead of the default title?

    ReplyDelete
  5. you won't need no php to accomplish that . You can do this even with you blog in the blogspot servers.. just use the Blogger tags "MainPage" "ArchivePage" and "ItemPage"

    ReplyDelete