April 30, 2009

Dynamic Meta Tags For Blogger/BlogSpot Blogs


Make your pages are unique
If you are new to Meta tags, then in short: "Meta tags introduce your blog to search engines", and so these tags are a must for every website/blog or rather for each and every page/article of websites.
In blogger you can easily add these tags to either the HomePage or to any other "specific page". And now, you can even avoid an important error (duplication of meta tags and titles).
But even after doing all these hacks, it is not easy to manually add description and keyword tags to each and every page/post.
So here's a simple code to automate the process of assigning meta description and keyword tags to every page of your blog. Although not very effective but it may slightly improve the visibility of your pages in SERPs. These are the Dynamic meta tags, which have the same code but display different content for different pages. Actually it simply shows the blog name and title of the post in the meta description/keywords content.
Log in to Blogger, go to Layout -> Edit HTML
and find (CTRL+F) this code in the template:
<b:skin><![CDATA[
And immediately BEFORE/ABOVE it, paste this code:
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<meta expr:content='data:blog.pageName + data:blog.title + data:blog.pageName' name='Description'/>
<meta expr:content='data:blog.pageName + data:blog.title + data:blog.pageName' name='Keywords'/>
</b:if>
Along with this, DO NOT forget to do these changes in your template too:
Remove the meta tags and titles duplication problem.
Swap the Blog title position for Search Engine Optimization.

Thanks to Rajeswar for suggesting these dynamic meta tags.

Image credits: illumin8.com


32 comments:

Ra♪eswar said...

I have one more request.My blog contain about 40-50 posts every month (Its a blog of my song's collection).Now google index every pages including the achieves pages and when anyone come from google to that achieve page it become very long and these pages also causes having duplicate title and meta tags.Is there any way to prevent it from indexing? I tried this code but the block my Labels too.

"
(b:if cond='data:blog.pageType == "archive"')
(meta content='noindex,follow' name='robots'/)
(/b:if) "

HERE IS MY BLOG

Sai said...

Hi Rajeshwar, just updated the post with your blog's link, and regarding the long pages of archives, you may try this method:

Show Only Titles In ArchivesAnd actually this is also an important hack, as if you do not apply this hack to your blog, then the same content(your posts) will be displayed in two different pages (your original post and in your archives), and Google may note it is as Duplicate content !
So do it as soon as possible...

Regards
Sai

Ra♪eswar said...

Thank You .. Its really great. Thanks again.

akash said...

I think this is really neat
i like ur website. thanks for this comment posting...

more templates http://www.itemplatez.com

Online Garden Fountains said...

I learn a lot from your post. :) Great post. I am still learning about SEO and your blog is a great help.

Nikhil said...

somebody got a bit of knowledge........:):)

Lauren Wolf said...

ahhh all this stuff hurts my head! Glad someone gets it...

Lauren Wolf
Your Sensual Advocate for tasteful, heathy, modern sensuality
www.signaturesensuality.com
lwolf@signaturesenuality.com

Cascia said...

Does this work for XML? Every time I try to improve my meta tags I get error messages.

Divya said...

Hi Casia,

If you have tried exactly this method, then I am sure you'll not get any error messages(while saving the template)

But while indexing, some of your meta descriptions may look 'short', because everybody do have 'short titles' in some of their posts, which is then copied as meta description in this hack, and then it is considered as 'short meta description'.

So if you do not want to show 'short meta tags' to search engines, then read these three posts:
1. http://bloggerstop.net/2008/10/meta-tags-importance-and-how-to-use.html
2. http://bloggerstop.net/2008/11/how-to-add-separate-meta-tags-for_25.html
3. http://bloggerstop.net/2009/04/duplicate-meta-description-and-titles.html

Regards
Sai

YOPOP said...

very nice tutorial
but 1 question how to add comma in data:blog.pageName + data:blog.title + data:blog.pageName

so my meta keyword look like this
meta content='Olympus E-30, Olympus Digital Camera, Olympus E-30' name='Keywords

take a look at my blog http://olympus-tech.blogspot.com

rdvg_3283 said...
This post has been removed by the author.
Soufiane LeBlogger said...

i think it will cause the error: "Invalid XML: too many tags"

I'll try and see :D

Divya Sai said...

Don't worry, only one meta tag will be displayed per page (the code is within a condition)...

Anonymous said...

http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/100.gif

Satya said...

Great tips!

Online Marketing Company said...

I'll give it a try, I'd successfully applied something similar but a recent blogger update rendered loads of javascript errors, so had to remove this code from several blogs. Hoping your free code snippet will help - particularly with the duplication issue.

Thanks for sharing
Steve

Anonymous said...

I have submitted my blog to google but they have not indexed it for 3 days ! what should i do ?

XQUID said...

DS

I have submitted my blog to google but for 3 days there has been no page indexed !

Divya Sai said...

@XQUID,
your site has been indexed, check out the link below:
http://www.google.co.in/search?hl=en-GB&q=site%3Ahackmeout.blogspot.com

XQUID said...

Thanks !

XQUID said...

Is there any hack to include HTML and scripts in Blogger template ?

Divya Sai said...

You can directly add any html in widgets. Go to layout then click on "Add A Gadget" and finally paste the code there.

Anonymous said...

Thanks for the hack...I have implemented this hack in my blog...I have been looking for this type of hack for year..today i got it thanks a lot..


My Blog

Good Blog Stay said...

How can I include first lines of story content along with page title and blog title?

Is there a data:blog.content variable that I can add to the above code?

episodes said...

one question, know when i analize the tags of any post of my blog the title and the keywords are the same so do you think this is good or google counts as a duplicate content.

thanks man your site rocks

Sai - Blogger Help said...

Thanks buddy!

Keywords tags will never cause the problem of suplication, in fact it is nowadays not even considered as an important part of SEO, it the description tag which is more imp. and may cause the problem of duplication. But again, duplication is not between the title and the tag.
Here duplication means - two different pages having the same description tag.

Orkut said...

hello bloggers... google doesnt penalize for duplicate content.. ;)

plr article said...

thanks for this tag,,, i use this metode and my visitor generate form google search... thanks again...

Raja said...

-meta expr:content='data:blog.pageTitle' name='Description'/-

In the above tag i want to add my own sentences with page title. Please help me to do that..

I tried the following but it shows error

-meta expr:content='data:blog.pageTitle' + 'My own sentences which describes more about my website' name='Description'/-

Selina said...

Tnx for this tip im using too, but is there any way to automatically add first few post sentences in description?

tyler78 said...

When i share something on facebook, it takes the first few lines of the content normally.

But after putting this code, it takes page title - blog name - page title. How can i fix that? I want it to take first few lines again.

applicationsandsoftwares said...

Hi Sai,

I also notice that after putting this code, when you tried to share the post eg. in facebook, the description became page title-blog name-page title. Is it really the result of this code? or we need to add something to see the first few lines of the content.

Hoping for a response..
thank you in advance!!

-SoftwareApp

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

comment on this post Share Your Views

Allowed HTML tags: <b>, <i> and <a>

Join and share your views with other bloggers at BloggerStop Community

Comment Like This! and Optimize your blog...

SPAMMER OF THE MONTH: www[.]Seeking4Hosting[.]com

Next Post Homepage Previous Post

Regular Readers


What They Say...

Divya Sai is the ingenious webmaster of Bloggerstop.Net. Divya is extremely patient, knowledgeable and responsive... Bloggerstop.net has an abundance of articles on creating widgets, templates, hacks and ways to make your blog search engine friendly.
- Stacey @Pets With Allergies
I stumbled onto a great site. Sai, over at Bloggerstop.net has helped me tremendously and with great patience...for any and all questions regarding computer issues. And again, THANK YOU Sai.
- Cheryl @Cmash Loves To Read

More Here...

Popular Posts

Get this widget

| © 2010 BloggerStop.net | Blogger Widgets | Template by Dicas Blogger | Enhanced By Divya Sai | Privacy Policy