Before, we get on with our tutorial. Let us first discuss the true definition of not found pages. Most of the webmasters would be well aware of it but some beginners might get confused. Consider the following meaningful definition:
- 404 Pages: The 404 not found error message is a form of standard HTTP response code, which indicates the client that the destination which he is looking for, is unable to interact with the server or has no existence.
- 301 Permanent Redirects: URL redirection, also known as URL redirecting is a technique that allows a webmaster to forward his one domain to another domain through URL redirection, or making different web page available under many URLs
The Solution:
The solution is pretty much straightforward because there is no rocket science behind this technique. A small chuck of JavaScript coding would be doing the entire job. Consider the following instructions and apply them as mentioned below.
The solution is pretty much straightforward because there is no rocket science behind this technique. A small chuck of JavaScript coding would be doing the entire job. Consider the following instructions and apply them as mentioned below.
Go To Blogger >> Settings >> Search Preference. Now from the list of functions Select Custom Not Found Page and paste the following JavaScript coding in the HTML Box. If some folks are using custom 404 error message, than they can add the following code at the end of the coding.
Sorry for the inconvenience, the page you are looking for has no existence.<script type = "text/javascript">
//Blogger 404 Redirect Powered by MyBloggerLab
BSPNF_redirect = setTimeout(function() {
location.pathname= "/"
}, 1000);
</script>
- 1000 is the delay time in microseconds. Anyone can change it. Changing the value to Zero (0) would redirect immediately without any delay.
Save it and that’s it. Now whenever a visitor would hit a 404 page, it would automatically redirect him to your homepage. Note: This technique should be used only if lots of your indexed posts are deleted and they are getting high SERP ranking.
About the Editorial Team
The Editorial Team of MyBloggerLab consists of a group of Professional Blogger geeks Led by Syed Faizan Ali (Founder of MyBloggerLab).
19 comments
Great Post! Thanks for the information Faizan!
cool idea bro, thank you for sharing this with us !!
www.pokharatech.com
Cool post. THis is something that many people will be looking out for
thanl you syed for this. I asked you once and u posted it!! Thanks a lot/
!! :D
actually, i m using a custom 404 page. Check: mypremiumtricks.com/404
well, can i add the script after that?
@syed faizan ali : please tell me if my blogger site have not any error or 404 error, so it is necessary to add these settings which you told about? Thanks
Yes, you can add the Code there!
No, if you're not getting any errors than there is no need to use this technique!
hello syed if i change the value of / in the below line with any blog adress then will it redirect to any other site
location.pathname= "/"
If You Don't Want to Redirect it to Home Page and Desire to redirect to any specific Page than Use This Code:
Sorry for the inconvenience, the page you are looking for has no existence.
<script type = "text/javascript">
//Blogger 404 Redirect Powered by MyBloggerLab
BSPNF_redirect = setTimeout(function() {
location.href= "http://www.mybloggerlab.com"
}, 1000);
</script>
Good Stuff Syed! I'm sure we'll see an increase in traffic. Thanks
Awesome Post Syed Bro...Keep It Up :D
Sorry for off topic. Do you have URL filter in Blogger commenting system? Please tell me.
No, Sometimes it gets filers and sometime it won't. However, keep on marking them as SPAM so that Blogger can recognize Spam comments next time someone leaves the same comment!
I think my blog theme does not work. How do I reset operation 404 pages of html theme?
Thank you!
Recent your BLOG Widget located in Blogger Template Editor
I added Widget, however does not work. What could be the problem?
You have to add it in Search engine preference area >> Not found
Great Tip Work.. my blog 35 404 page and now i follow your post and its work thnaks. bolegapakistan.blogspot.com
Post a Comment
We’re eager to see your comment. However, Please Keep in mind that all comments are moderated manually by our human reviewers according to our comment policy, and all the links are nofollow. Using Keywords in the name field area is forbidden. Let’s enjoy a personal and evocative conversation.