Saturday, March 29, 2008

Meta Description for Each Blogger Page


Check out the code generator and video
tutorial for this hack in my new article:
Custom Meta and Title Tags for Blogger



Meta descriptions for your web pages can improve the chances of your site being found and clicked on. For those of you who tried adding such descriptions or keywords to your Blogger pages, you might have noticed there's no easy way of doing that.

This article describes the workaround I found for this problem and is a follow-up to the discussions posted here:

About the solutions mentioned in the articles above:

  1. If you add a "constant" meta tag to your Blogger template (as described in the first article), all your pages will have the same description and keywords. This defeats the purpose of this optimization effort and you'll have to go with the solution from the second link. However...

  2. The JackBook Dot Com code seems to be a bit outdated and using it might cause one of the following problems:

    • 404 error when trying to view any of your web pages, or...

    • The blog is displayed correctly, but the description and keywords are not seen by any meta analyzers.

Here are the changes you have to apply to your template in order for the descriptions to work correctly:

  1. Open the Layout panel of your blog and go to Edit HTML.

  2. Click the Download Full Template link and save a backup copy of your current template so you can undo the following changes in case anything goes wrong.

  3. Locate the following lines of code:

    <head> <b:include data="blog" name="all-head-content" /> <title><data:blog.pageTitle /></title>
  4. Add the following code immediately after the <b:include data="blog" name="all-head-content" /> line:

  5. Replace the http://johndoe.blogspot.com/ line with the URL of your homepage.

  6. Replace the word DESCRIPTION with a description for your homepage.

  7. Replace the word KEYWORDS with a list of keywords separated by commas and relevant for your homepage.

  8. Now, for each individual page from your blog you'll need to follow steps 4-7 again, but adding corresponding URL's, descriptions and keywords. For example, if your first article is about your pet, what you'll need to do next is...

  9. Add this code again immediately after the <b:include data="blog" name="all-head-content" /> line:

  10. Replace the http://johndoe.blogspot.com/ line with http://johndoe.blogspot.com/2008/03/my_pet this_is_an_example.html.

  11. Replace the word DESCRIPTION with a description of my pet.

  12. Replace the word KEYWORDS with pet,dog,dog_name.

  13. After adding code for all of your pages, save the template and check if it's doing what it's supposed to.

NOTE:

That's all there is to it. Please post your feedback and comments in case the code needs more tweaking.

Related articles:

65 comments:

paul0 said...

thanks for the 404 fix! it works! thanks alot!

Andrei said...

you're welcome. thanks for the feedback.

Mansi Desai said...

I've just added this to my blog; was looking for this since 2 days! thanks a lot!! but how can i do something like this for each post in blogger?? can I add meta keywords for every post?

Andrei said...

Hey Mansi,

I've had a look at one of your blogs (http://ideasandgadgets.blogspot.com/) and the title, description and keywords seem to be the same for all your pages.

I'm not sure if you did this correctly, but to give you an ideea of what the code should look like, I've written some meta tags for your homepage and the last 3 articles. Click here to open.

If you look at this example, you'll notice the first paragraph is for your homepage, and the other three correspond to the permalinks of the last three post pages.

Unfortunately, I haven't found a way to add such tags automatically, so each time you write an article you'll have to add another one of those paragraphs manually and change it accordingly.

Another thing you might want to look at is the fact that your description is a bit too long and it might be considered as spam by Google. My advice is to keep it shorter and customised for each article. If you keep long and similar descriptions for all your pages, your site rank might decrease because of duplicate content.

Finally, a good way to choose your keywords is to use a density checker like the one below. Too many keywords can also be considered spam.

http://www.dot-seo.com/seo-tools/webmaster-tools/keyword-density-checker/

Thanks for the feedback and please let me know if these tips help.

Jaimie Kanwar said...

Hi Andrei - I still don't get how you add different meta tags for each page. Could you possibly outline how you add the new tags to a new page please and where exactly you place the new text? As I understand it, every time I make a new post, I have to update my template with new description/keyword tags. Where exactly in the template do I put these tags?

At the moment, my individual posts show up in google with the same description every time, which is pointless. The individual post title shows up fine, but the snippet is just the sentence from the description meta tag.

As an example, type the following words into google: michael thomas liverpool bursting. An article from my site will be the top article, but the snippet is useless as it's not pulled from tha article itself!

Any help you could provide with these problems would be much appreciated :-)

Jaimie www.liverpool-kop.com

Andrei said...

Hello Jaimie,

I did look at your site and you indeed have the same description for all your pages. My initial article may not be very clear, so I've written a new one to explain things in more depth. Click here to read it - I hope you'll find all you need in there.

One more thing: good luck in UEFA Champions League. I hope Liverpool wins this year in Moscow :)

Angrezy said...

Hello ,
Thanks for your wonderful help, i have been searching this option for many days, though its little time consuming to update the HTML code every time we create new post, but this really zooms the search engine.
Thanks once again.
Here is my blog:www.angrezy.com
and here is my link where i have succeeded in adding meta tags to individual post:
http://www.angrezy.com/2008/04/watch-or-download-money-telugu-movie.html

Regards,
Angrezy

Andrei said...

Yep... you did it, Angrezy :) Congratulations! Ideed, it's time consuming, but it gives you more control over your content - I think that's worthwhile.

I'm soon going to post instructions for another popular hack: writing custom titles for each page. Make sure you check back soon ;)

SMS Break Up said...

From some days, i am curious to know how can i add different meta description tag to each of my post pages. And luckily, through your comment on google webmaster blog i come across your blog. I try this on my blog at http://coolsmsjokes.blogspot.com/ and yes, it really works man. Really helpful for me. Thanks a lot again.

Sunil Kumar Gupta said...

Tips is great, But there is lot of writing in template. There should be an option in blogger to add Meta tag

Kenneth H. said...

I was under the impression this is what "Labels for this post:" was for.. What purpose does that function serve if not that? I dislike that my posts all come back with the same keywords * description as the main/home page does.

Thanks for the tip no doubt. But, I'm not interested in modifying every page even though I have few so far.

I read an article that asked the question if google was neglecting blogger. I have to agree with the posts now. I don't see no interest by google to make a profit besides ads and they certainly are slowing in the development area as well.

Adrian Muñoz said...

I dont think is possible to modify the "Head" tag on the Individual post.

Aiheena said...

could you check my site (code). I think I did everything right, but google doesn't seem to notice at all. Is there something wrong with the code?
Ps. It's in finnish language but it's still checkable right?

http://www.parhaat-matkakohteet.com/

Tony said...

Good Job! :)

saleel said...

Brilliant.you have given information very nicely. would like to praise more. but no time Mr.Andrei. Thanks

Peculi said...

i don't know if i explained the right way before.

can i put a metatag for the general blog (after the head) and putting metatags for each post as well?

It's possible?

Andrei said...

Hey Peculi,


It is possible to create separate meta tags for your posts and for the main or home page.

Think of this as a discussion between the server that hosts your blog and your visitor's web browser:

- "I want to view the main page of this site", says the browser.

The server decides which meta tag matches the main page and replies:

- "If you want the main page, this is the meta tag for it".

On the other hand, if the browser requests a post page, the server looks for another meta tag that matches and sends it along with its reply.

That is why we use "b:if cond" clauses to assign meta tags and the exact procedure is described in the two articles I've written on this topic.

I can understand that you're in doubt because the main page contains several posts. However, the URLs of the post pages are totally different and thus, the meta tags you assign for them cannot overwrite the one for your main page.

Good luck with this hack and I hope you manage to implement it - do get back to me if you need more help.


Cheers,
/andrei_aga

Louden said...

ughh.. Its been a nightmare trying to fix my 404 url not found error on gwt. I used a template from bloggertricks and have been trying to fix this for 2 weeks now. I've contacted google blogger groups and in the end said maybe it was a false positive? Whatever that means. I have 4 pics hosted on photobucket. seen here
http://gs83.photobucket.com/groups/j304/B7F2X1HS15/
my blog is
http://americanlifeinthephilippines.blogspot.com
I'm really frusterated with this and can't find a fix anywhere. Could you please,please take a look and tell me how to beat this thing? Please....

Andrei said...

Hi Louden,


I'm not sure how this is connected to the meta tags hack - maybe you can point it out if I missed anything.

However, the problem is indeed strage. Incidentally, I've had problems with my atom.xml sitemap as well so I replaced it with "feeds/posts/default". Since you've redirected your site feed to FeedBurner, the sitemap I'm talking about should be here:

http://americanlifeinthephilippines.blogspot.com/feeds/posts/default?redirect=false

I really don't know if this will solve the problem, but it's the only answer I have.

Vignesh.C said...

Will this code work in a blogger blog based on html template ? Thanks

.NET Dev said...

To keep same description as title for all pages
See here
http://urenjoy.blogspot.com/2008/12/blogger-seo-tips-change-title-style.html

Jamie Boyle said...

Wondering if you can help. I have a goldfish blog www.GoldfishCareInformation.com and I want to have a seperate title for each blog post I've made and separate descriptions and keyword meta tags.

Right now I get some pretty good traffic from search engines but making this change can help increase my page ranking. Right now my title stays the same on all search results. I have a meta tag that I put in a long time ago now but recently bought a book on SEO in which I already now how to do it to websites I create but on blogger I'm unsure. Normally I use Microsoft Frontpage and it's easy adding in titles, description and keywords. This I need some help.

Could you take a look at my source code and tell me what I need to delete after the (head tag) and how to do what I want by adding seperate titles per blog post along with description and keywords. If you can provide me a sample code for my blog that would be great then I can go in and do it for each individual post I've made.

Hope you can help me with my goldfish blog. Hope to hear from you soon.

Sincerely,

Jamie Boyle
The Goldfish Guy

P.S Happy Holidays and Best Wishes In 2009

Andrei said...

Hello Jamie (Goldfish Guy),


I looked at the source code of your blog and noticed you have multiple title tags and meta description or keyword tags for each page. I'm not sure how you did it, but that's no good.

The good news is that I can help you implement the hack described above and as for title tags, I have a couple of simple solutions which achieve just what you want. In order to solve this problem, I'd need you to send the source code of your blogger template.

Go to the Layout tag > Edit HTML section in your admin panel, enable the "Expand Widget Templates" option and then copy/paste the entire code in a .txt file. Send that to me by email, please. Alternatively, you could Download your Full Template and attach that to your email.

Looking forward to your message.


Cheers,
/andrei_aga

Andrei said...

@Vignesh.C: no, the hack doesn't work for classic Blogger templates.

|earning online said...

Any idea how to use your method to the blog that has more that 200 post?Any faster solution?Thanks .You have a Nice blog.

Andrei said...

Sorry, I don't know any faster methods :(

cityboy said...

thank you! this is very important post!

for 3 page I use this metod. But for more page its so diffcult...

I mean that goggle will doing better metod for this =)

Anonymous said...

Thanks for the post. it's really helpful to beginners like me.
i just started my blog
http://holly-bolly-bites.blogspot.com

Andrei said...

Looks nice! Good luck to you :)

RSK said...

thankz for the information

but it is difficult to edit the meta tags for each post

its time to think about a alternate idea

Andrei said...

Have you seen the automatic code generator I made? Maybe this will make it less difficult: http://www.agawebs.com/2009/02/custom-meta-and-title-tags-for-blogger.html

Try it out and thanks for the comment :)

Damin said...

This is exactly what I was looking for. Thanks for sharing this

Anonymous said...

Hi
Thanks for you postings.
I have implemented in my site http://changeyourmove.blogspot.com/

Andrei said...

Are you sure you did this correctly? I looked at your blog and there are only some generic meta tags on each page.

Maybe you should erase them and start over using the automatic code generator.

radith prawira said...

stumbled this page already..:D but i wonder why i'd be the first to discover this page on SU? since this is a good reading material for blogspot user!

nickler said...

From some days, i am curious to know how can i add different meta description tag to each of my post pages. And luckily, through your comment on google webmaster blog i come across your blog. I try this on my blog at

Andrei said...

@radith prawira: I can't answer that question either, but thanks for rating :D

@nickler: I suppose this is the blog you wanted to mention: http://nickler-msn-nickleri.blogspot.com/. If that's so, there are two sets of "keywords" tags on your homepage. You should remove one of them and you might want to have a look at this code generator to implement the hack more easily.

Faizan said...

Heyyy Frnd
i lyk ur site

www.smsheart.blogspot.com

Sms Heart said...

Gr8 SIte Frnd

www.kid-show.blogspot.com

Andrei said...

These comments are beginning to look a lot like spam. I hope I won't have to delete them.

Faizan said...

Nice Trick Frnd

Sms, Jokes, Shayari, Poetry, Quotes, Sayings & Many More. . .

www.shayarihouse.blogspot.com

Prabin Jha said...

Thanks for nice trick for meta tag. One things i am wishing to know from you is that for each time we have to go in edit html page that is so time consuming and quit confusing too so can we get some tips for that or any solution that we can add some key word related to my post at the time of posting new post . Thank you

Ideas Moderator said...

Thanks for the tip...

1d said...

you can automate the meta description labeling by simply using b:if b:else/ but up to a limited point where you can make use of the dynamic post title, etc. Anyway thanks for sharing awesome tips, Andrei!

Dennis Schaal said...

The problem I'm having in trying to get post-specific descriptions using your instructions is that it works when I go to Facebook, for instance, and insert my homepage url, but doesn't work when I insert the post url. Any ideas?

Shawn Watson said...

Thanks so much. I searched for hours and checked at least 25 other sites. Yours is the most clear and eliminated all my errors. I really apprecatied this. Thanks again

m1 said...

Sorry Im lost! I understand about altering the HTML in layout for the template but how do I do individual pages?, do I go into edit posts then html and just paste the html code at the top of the post?
Thanks,Mirit
www.zit-cure.com

Umair Wasi said...

Yes as the Shawn Watson said I have already searched 25 other sites but ur is the clearest and easiest sites, i have done with my blog pls check it and give me ur opinion about that
http://pakiviewson.blogspot.com

Vernon Chalmers said...

Thank you - it worked spot on with an immediate improvement on my Hubspot Webgrader score on my Blogger blogs.

www.vernonchalmers.com

Stella said...

great blog!!!

web developer => suvanno said...

thaks yar
you can see like this tricks in
http://www.learn-webcreation.blogspot.com

pRaBhU said...

Can we implement above rules for the existing posting?? I already posted more than 250 .. What exactly I need to follow now??

Ryan said...

this is awesome, but I am too lazy to do this to all my previous posts, can I use some type of else statement for urls that I do not specify unique meta data....ie. can I use the homepage meta data without creating an if statement for each unique url I have?

Moritz Stellmacher said...

perfect! you're my hero ;) THX!

Helmet Collection said...

You said that we have to do those step above???
I have 400 posts, then I should put the meta tag for each post...shock...!!!

Sandeep said...

But if my blog has 1000 post then i will have to write 1000 if statements!Is not it time consuming n lenghty process.Mention any other procedure if u know?

Waqas Awan said...

really Good Artical easy to understand
keep it up nice work

azoomer said...

This article help full for my
www.infosense.co.cc

Faizan said...

Thanks Friend

Cute Messages
http://smsenjoy.blogspot.com

Funny Babies Wallpapers
http://babies-wallpapers.blogspot.com

Anonymous said...

dude...u made my life at ease man! all of sudden my google search result sap down like a hell. Hope this thing works...
thank you

http://www.pharmacyebooks.com

Anonymous said...

this is what i search for while

http://freebooks4ever.blogspot.com/

Lion said...

Thanks man, I really appreciate the help.

Faizan said...

Thanks for help

Funny sms >>>
www.esmsfun.com

Wsd said...

Nice share. I just implement this hack on my blog. Thanks

http://techmasterguide.blogspot.com said...

Yesterday I found aHack better than this. On that, it will automatically add description as it's title. Please check my site for the code.

Post a Comment