Thursday, June 5, 2008

How to remove the name of your blog from the page title of your posts

To all Blogger users, this is one Blogger hack that you should absolutely consider. Have you noticed how Blogger adds your blog name to the page title of all your posts?

Did you know that this could mess up your SEO (Search Engine Optimization) rankings since the keywords of your post title will be picked up only after your blog name?

If you don't know what I'm talking about, do a Google search of your site by typing "site:<your URL>" in Google's search field. You would probably see something like this:

Imagine if your blog has a long name and your post a much longer one like this.

Fortunately, Blogger just recently introduced a tag to separate the blog name from the post title. With a little bit of Blogger code, we can remove the blog name from the page title of a post.

1. To do this, go to Layout > Edit HTML in your Dashboard.

2. Search for <title><data:blog.pagetitle/></title>. It should be near the top.

3. Replace that with this piece of code.

<b:if cond="'data:blog.pageType">

4. That's it! Save and view your work.

If you're in the main page, your page title is your blog name. If you visit one of your posts, the page title would be the post title. Nice huh?

Got this tip from Blogger Buster by the way.

No comments:

Post a Comment

Blog Widget by LinkWithin