Blogger Trick: Using the pageName Variable Instead of pageTitle for SEO

The default templates available for blogs hosted through Blogger.com use a variable called data:blog.pageTitle to create the text that goes in the <title> tag of a Blogger post entry.  If you go to Layout -> Edit HTML to look at the XML code that makes up your current Blogger template, you will likely see this section of code:  <title><data:blog.pageTitle/></title>.  If you want to optimize each of your blog pages for the search engines (thereby bringing more traffic to your blog), you can change this tag so that the keywords displayed in the title tag for each of your pages aren’t watered down.

 

To understand what I’m talking about, I’ll provide an example.  Consider a political blogger who named her blog “Democracy No More”.  One of her recent blog entries might be entitled “Problems with the Housing Bailout”.  Using the default data:blog.pageTitle tag to create <title> tags for her blog entries would result in this title for this particular entry – “Democracy No More:  Problems with the Housing Bailout”.  The title tag for this post is diluted for the keyword terms related specifically to this post (housing bailing, housing bailout problems).  Instead, the general title of the blog itself (“Democracy No More”) should be removed from the page title for this entry.

In order to accomplish this, you would replace the default title code:

<title><data:blog.pageTitle/></title>

With this:

    <title>
     <b:if cond=’data:blog.pageName == “”‘>
       <data:blog.pageTitle/>
     <b:else/>
       <data:blog.pageName/>
     </b:if>
    </title>

The reason we have to include a condition statement here is because we need to make an exception for the home page of the site.  It’s especially important to have a title show up on the home page of the blog for SEO purposes.  If we wanted to use a more keyword-focused title, we could even change the <data:blog.pageTitle /> tag for whatever title we choose.  In this case, the blogger might want to use the keywords Political Commentary for her title.  To accomplish that, she would simply replace the <data:blog.pageTitle /> section of the code above with Political Commentary, like this:

    <title>
     <b:if cond=’data:blog.pageName == “”‘>
       Political Commentary
     <b:else/>
       <data:blog.pageName/>
     </b:if>
    </title>

Good luck using this trick.  If you see a visible increase in traffic because of it, be sure to leave us some feedback and let us know.

Leave a Reply

Your email address will not be published. Required fields are marked *