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


53 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 comment 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

Vice T. Vanish said...

Hi sai..

Please check my blog site if it's clear and Good to Go of all Meta tags problems that I added into my blog...

Thanks and best regards Vice T. Vanish

http://vicetvanish.blogspot.com/

Vice T. Vanish said...

I agree with tyler78 and applicationsandsoftwares..

here's my errors of sharing to facebook or (others)..

Image #1 - http://img215.imageshack.us/img215/78/60347274.png

In image #1 this was sir tyler78 and applicationsandsoftwares
trying to show a certain error regarding sharing it to facebook.

Image #2 - http://img842.imageshack.us/img842/3594/60021353.png

In Image #2 is also my concern regarding the sign '\'
Because as shown in the picture.. The supposed Title would be The Shade's Massage not The Shade\

Please sir sai.. if there is something you can do with these kind of errors

thank you and best regards
Vice T. Vanish

Vice T. Vanish said...

Hi again sir sai...

I have no more problem about this issue/image #1 but as of this image #2, I was wandering of how to make a description of it..

e.g example:
The shade's massage (pageName)
(description)------------
-------------------------

I've solved the problem about image #1
but Can you give me/us a clue about this descriptions in image #2...

regarding how to make a body content description of the said title.

data:blog.(?)

UP it is also connected to sharing to facebook.

thanks and best regards again
Vice T. Vanish

coffee makers said...

I have tried a number of times to add a description meta tag to an article in blogspot.com, but it just does not work. The same description appears on all the other articles. Any ideas to correct this will be appreciated.

siloam321 said...

gracias por el aporte de los metas,un buen post,saludos a todos.

teeth whitening said...

The description tag i would agree is still very important in both search engine terms for crawling and ranking and also for enticing browsers to your website however keywords these days does not have much strength in SEO.

Wedding gowns said...

Thnk you so much for this useful information! The only thing I'm not sure about is the 'name' part in the meta tag. Should I put my own name or the one I write under?

Sai - Blogger Templates said...

No, you don't have to edit any code in this tutorial.
Those meta tags are different, where you provide the information manually, read about them here:
Meta Tags - Importance and How To Use

Cody said...

Thanks Sai! You know what would be SO GREAT?

If there was some code which could provide a way to automatically add the labels of an individual post as the keywords meta tag for that post, and the first lines of the post itself as the description meta tag for that post. Possible?

Rajesh Kumar.Chekuri said...

Wow this is cool ...
but my question is
is it possible to add another static meta tag about keywords..

help thanks in advance..

Tech Tasks

Belajar SEO Panduan Bisnis Online said...

Meta My Blog Duplicate .......
Help Me ... Http:///iam.2yoemt.co.cc

Robots = noodp

wedding gowns said...

I was more than happy to search out this web-site.I wished to thanks in your time for this excellent read!! I undoubtedly enjoying every little little bit of it and I've you bookmarked to take a look at new stuff you weblog post.

wedding dress said...

The blog is in reality the great on this worthy subject. I match in together with your conclusions and looking forward to your coming updates. Thanks for sharing.

How can I make money on the Internet? said...

I have tried a number of times to add a description meta tag to an article in blogspot.com, but it just does not work. Thanks for your post which helps me a lot. The only thing I'm not sure about is the 'name' part in the meta tag. Should I put my own name or the one I write under?
How can I make money on the Internet?

sohail said...

Should i use only dynamic tag or both general and dynamic meta tag on my web
jobzfree.blogspot.comsuggest me what should i do

Instant Approval Article Directory said...

I have tried a number of times to add a description meta tag to an article in blogspot.com, but it just does not work. Thanks for your post which helps me a lot. The only thing I'm not sure about is the 'name' part in the meta tag. Should I put my own name or the one I write under?
Instant Approval Article Directory

Birthday sms and shayari said...

The description tag i would agree is still very important in both search engine terms for crawling and ranking and also for enticing browsers to your website however keywords these days does not have much strength in SEO.
Birthday sms and shayari

P.Deal said...

Thank You so much .

Lingerie Wholesale said...

Thanks for making such a cool project. I’ve been checking the site for the Windows version, but I never left a comment about it. I know you are working hard and doing it for free so you shouldn’t feel rushed or anything.

Sexy Underwear said...

I am enjoying this site, this site some great resource like cruises and give it away for free. Thanks for taking the time to discuss this site. I really loved reading this post. Keep up the good work.

LC Hunt said...

V Divya, I do not see this in your code. Have you dropped the meta description completely and are letting Google read from the page?

:)) ;)) ;;) :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[.]TopRankLinks[.]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