Solution To Error 404 (Page Not Found)

We have a simple solution to solution to error 404 (Page Not Found). You will follow some simple steps and your big problem will be solved. When a user accesses a nonexistent URL in your blog, Blogger display this error 404 (page not found) message in the upper area of ​​blog entries:

"Sorry, the page you're looking at this blog does not exist."

It gives a bad impression to your readers. So prepare a short message for the readers and give reasonable time to read that message.


How To Redirect Blogger Error 404 (Page Not Found) To Homepage?

Go to Settings and click Search preferences then edit Custom Page Not Found (under Errors and redirections).

Here paste the following code:

Sorry, the page you were looking for in this blog does not exist. You will be redirected to homepage shortly.
<script type = "text/javascript">
//Blogger 404 Redirect v1.0 by GreenLava(BloggerSentral.com)
BSPNF_redirect = setTimeout(function() {
location.pathname= "/"
}, 5000); 
</script>




You can change the message in this code in Red color. You can also change the page where you want to redirect your reader. You will replace pathname with href, and / with the URL of the page or site.

5000 in the code is time during redirection. You can change it according to your requirement and message that how much time you want to give your reader to read the message. If you will put zero than immediately redirection will be done.

If you want to test this all then give this address http://yourblog.blogspot.com/dfsfgddff into your address bar. You will find the message and after sometime you will redirect to specific URL.

If you find any bugs or problem then please let us know in the comments.

No comments:

Post a Comment