How To Redirect 404 Not Found Error Page to Blogger Homepage

Leave a Comment
"404 Page Not Found" is a HTTP (Hyper Text Transfer Protocol) server code that basically let the user know that the page they are looking for does not exists on the website's server.



This error message shows up when a user lands a page on the website that is not available, may be deleted or removed from its server.

When your potential reader reaches a dead or non existent page on your website its quite obvious that he either clicks on the back button or completely closes the window. 


So here we need something that can redirect that potential reader immediately to your homepage where he can continue browsing contents of your page.

For the same you have to tweak your blogger's search preferences panel a bit to make this happen. Basically we are going to add a java script that will help all the dead or broken link pages to show a 404 error page that immediately redirects the reader to your blog's homepage.


Let see how. 

Step 1. Log onto Blogger.com

Step 2. On your dashboard choose the website for which you like to add a 404 redirect error page.

Step 3. On your left, head towards settings wrench and click on search preferences.

Step 4. Move to the Error & Re-directions panel and click on Edit opposite to Custom Page Not Found.

Step 5. Now in the resultant box paste the below code.

Sorry for the inconvenience, the page you are looking for has no existence.<script type = "text/javascript">
//Blogger 404 Redirect by The Geek Solutions
BSPNF_redirect = setTimeout(function() {
location.pathname= "/"
}, 1000);
</script> 

             
You are done here. Save the settings made. 


Now you can check whether this thing is working or not. Open a browser and type any mismatched words followed by a .html tag. For eg. http://www.yourblogname.com/thisisaerrorpage.html any thing like this. If the above settings had been made correctly you will be redirected to your homepage.

Note :  1) The text in Red can be modified as per your convenience.

           2) The Number 1000 in green can be set to your choose. Basically after 1000 microseconds the 404 error page will get redirected to your home page. You can set it to 0 if you want an immediate redirect.      

In case of queries please feel free to get back via comments or reach us personally using geekatdesk@gmail.com. Your feedback and suggestions are highly valuable for us.

Thanks & Have a Nice Day Ahead.
Comment Using Disqus or Google+

No comments: