Showing posts with label blogger. Show all posts
Showing posts with label blogger. Show all posts

April 11, 2013

301 Redirect Your Old Blogger Blog to New Address

Back in February I decided to change the address of my blog from 911-need-code-help.blogspot.com to salman-w.blogspot.com. Changing the blog address is straightforward; however, I wanted the following to happen after the change:

  • Backlinks to the old blog should continue to work
  • Visitors attempting to access the old blog should be redirected to the new blog automatically
  • Search engine ranking for the old blog should be transferred to the new blog

In short, I needed to redirect old URLs to new ones. Given that Blogger does not have an option to redirect URLs to another blog and mod-rewrite/server-side scripting is not available either; my only option was to use zero second meta refresh tag which is (claimed to be) treated as a 301/permanent redirect by Google. So, here is what I did:

NOTE THAT THIS ARTICLE IS ABOUT MOVING FROM ONE BLOGSPOT.COM ADDRESS TO ANOTHER. If you are moving from Blogspot hosting to custom domain, you (probably) don't have to do anything special. If you are moving from one custom domain to another, ask your domain name provider to setup a 301 redirect on the old domain.

September 8, 2012

Related Posts for Blogger

Adding a list of related posts at the end of article is a tried and tested way to keep the visitors engaged with your blog for longer duration. It gives them a reason not to click the back button, thus increasing your blog's page views and average visit duration; and decreasing bounce rate.

There are plenty of related post widgets for Blogger but I was not satisfied with them (in fact, I am never satisfied with any piece of code). Therefore, I decided to write my own, with the following features:

  • Light weight vanilla JavaScript code — no JavaScript framework required
  • Customizable widget layout — just about everything can be styled using CSS
  • Post thumbnails support — because a thumbnail image is worth a thousand words
  • Google Analytics integration — clicks are logged in Google Analytics
  • Lazy-loadable — the script can be loaded asynchronously
  • Easy installation — does not require editing Blogger template

December 4, 2009

Determine Blogger Page Type From JavaScript Using Template Codes

You can check the Blogger page type (index, item or archive) from JavaScript by adding this template code to the head section of your Blogger template:

July 23, 2009

How to Get Feeds For Specific Labels in Blogger

Blogger generates feeds for various items on your blog including posts and comments. Not many people know that these feeds can accept certain filters. The labels filter is one of them.

You might want to publish feeds for specific labels for various purposes. As an example, Aspin.com allows coders to submit RSS file of asp related resources into their database. You can label ASP specific posts from your blog as "asp" and publish its feed. You can label php related posts as "php" and publish its RSS to another resource. You may also want to publish specific feeds for targeted audience. Labels are the suitable method to group your posts by topic. These topics can then have their individual feeds. Your visitors can subscribe to feeds of their choice. All you have to do is to publish appropriate feed URLs on a suitable location.

Here is how you can get post feeds for specific labels.

May 26, 2009

Change Titles of Blogger Blog for Efficient SEO

After few hours of experimenting with the Blogger template variables, I revised the template for my blog to use the following template code for generating title tags: