[BlogSpot SEO] Simple Script to Optimize Your Blog for SEO

seo-script-for-bloggerThis post is rather intended to blogs run on blogger than to ones on WP because WP users have the platform to make their blog SEO optimized whereas those on blogger do not. They need to manually add alt & title tags to their images and specify a rel=”nofollow” & target=”_blank” for external links that they use in their post editor. Specially it’s a wise advice to keep your external links (Non useful) nofollow and open them in new tab. By making all external links open in new tab, you help lowering down bounce rate of your blog.  Being a blogger, have your ever imagined a script that will automatically do this job rather than you sitting and adding them individually?

Well, that’s what we’ve got here! In this article, I’ll share a script that will automatically add alt & title tags to the images that you post based on the name of your image. Similarly, the script will automatically find out links that are external on your blog to append them with tags that will make it nofollow and open the same on a new tab. As I mentioned earlier, these are simple SEO solutions aimed at blogs run on blogger.

In short this script will help you to do three things:

  • SEO optimization of Images on your Blog
  • Open External links in new tab
  • External links will be nofollow.


Basically, the script is divided into four parts (marked using comments). The first part will search for the external links on your blog and append them with target=”_blank”. By doing so, we make the link open on a new tab. The second part of the script will perform a similar search function but  append with the anchor tag with rel=”nofollow” to ensure that your link juice is not spread to other blogs.

The last part of the script (both 3 &4) is aimed at optimizing the images for SEO. The script will pick up the name of your image from the source and use the same to append the img tag with alt and title tags. For example, if you upload an image using the post editor and look out for the img tag on blogger, you will find the following tag.

<a href="http://4.bp.blogspot.com/..../s1600/Web-Traffic.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="100" src="http://4.bp.blogspot.com/..../s200/Web-Traffic.jpg" width="120" /></a>

By using the script below, you’ll find the above tag being changed to the one shown below.

<a href="http://4.bp.blogspot.com/..../s1600/Web-Traffic.jpg" imageanchor="1" rel="nofollow" target="_blank" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Web-Traffic" title="Web-Traffic" border="0" height="100" src="http://4.bp.blogspot.com/..../s200/Web-Traffic.jpg" width="120" /></a>

Many people would not agree with the rule of using the image name as an alternate text or title. Or in some cases, they won’t accept with all the external links being nofollow. If you are one among them, then remove that particular part from the script given below. For example, if you are happy with all external links opening on a new tab and all images possess some alternate text rather than nothing, then remove only the second and fourth part from your script and leave the 1st and 3rd intact. If you find it difficult to understand, then leave a comment below and get it clarified!


1. Navigate to “Design >> Edit HTML” and make a backup of your template by clicking on the “Download full template” link at the top of the page. Once the back up is over, search for the following piece of code.


2. Download this text document – SEO SCRIPT FOR BLOGGER. Paste the code present in it just above the line mentioned in step 1.

3. Save your template and your done!

WP users can also follow the same steps mentioned above, if interested, expect that your method of backing up the template/theme is little different from that on blogger. BlogSpot bloggers if you find this script useful, do share about this on your blog too.

Subscribe on Youtube

Article By
I'm Mukund, the founder of Everything About Blogging. I'm a freelance writer on topics related to Website Optimization (SEO), blogger customizations and making money online. I'm blogging since 2008 and I'm currently a guest blogger on Shoutmeloud & Blogging With Success.


COMMENTs ( 33 )

  1. says

    Hi Mukund, I know it is an old post. But could you help me out? The script works beautifully, but some (not all) images have the “_thumb%25255B1%25255D.jpg” tagged on – guess it is because the original image is too big and thumbnail is shown. In this case, both the alt and title attributes pick up that ‘_thumb%25255B1%25255D.jpg’.

    How do I modify the script to delete the _thumb%25255B1%25255D.jpg, if it is picked up? Placing _thumb%25255B1%25255D. instead (.) in the filename.lastIndexOf(‘.’))); – will it work?

  2. Amit says

    I use Windows Live Writer to write posts on my Blogger blog, which provides all three features mentioned in the script, the only problem is that we have to configure them manually.

  3. Sharefunstuff.in says

    Mukund Not working ..

    image Seo .. i try many times ..

    plz tell me what i add or what i Not add ..

    you can check my template source .. what correction i have to make ..


  4. Sharefunstuff.in says

    Mukund .. Idea was excellent ..

    But image Seo not works ..
    when i upload image nothing seo code comes .. which told above in your post .. you check again ..

    you can check my blog .. i have used full script ..

    please Reply ..

    • Mukund says

      Well, I’ve checked the codes on various demo blogs and it works. Please remove the first line of the script if you already have a jquery file running on your blog. If you still find issues, then let me know!

  5. Irfan Shakeel says

    I have a question Mukund S. Why dont you use this script on your blog?.. The images and external link of your blog open in the same page…

    • Mukund says

      Well, there are articles which are paid reviews on my site. By adding the script above, I’ll make the links nofollow which I should not! Hope you got the answer!

  6. Amit says

    Though this is Great for Bloggers who are on Blogspot platform ,I left blogger just three months ago .It was great ,Thanks

  7. sreekumar sukumaran says

    I have been facing the problem of lower traffic on Search Engine. I have followed your instruction on my blog. Now let us see the difference. Thanks anyway for the help.

    • Mukund says

      You need to wait before you see some changes! I suggest you to spread your articles via Social networking sites/communities! You’ll definitely see an improvement in your traffic:)

  8. Sagar says

    Thanks for the update Mukund, would implement it on my blog now, coz I liked the idea of opening the link in a new tab though it can be irritating sometimes :P

  9. Surender Markam says

    I added this script on my blog. Now, waiting for some seo changes on google webmasters.

    • Mukund says

      Hmmm! Why wait? To see if the script is actually working or not? View the page source of your blog and you’ll find the alt and title tags added!