404 Error?? (Page not Found) Redirect to blogger Homepage

As we all know that when their is an borken url or page has been deleted an error occurs showing 404 Error (Page Not Found) or Sorry,The page does not exit in the blog or whatever

And this is true that visitors hate that error so bloggers may loose their impressions for that purpose,Before the user clicks the back button or close the window/browser’s tab, thus leaving our site forever, we may want to redirect 404 error in Blogger to a page, where are chances that the visitor will continue reading our blog.

Now their is most used method known as meta refresh but its still have some issues because it breaks the navigation (u cant return back)..SO in this case we will use a javascript method which u can see it below

Method for Redirect Blogger 404 Error with Javascript

Now to go Blogger dashboard and go to setting–>Search Preferences–>Custom Page Not Found–>Edit

Copy and paste the following code:
Sorry, the page you are looking for in this blog does not exist.
You will be redirected to homepage shortly.
<script type = “text/javascript”>
BSPNF_redirect = setTimeout(function() {
location.pathname= “/”
}, 5000);
</script>

just replace pathname to href and /
with the url of your page.

Next thing to do is to save all changes made in this section and do a
little test to check if the code works well. You can enter a nonexistent
URL on your blog, and see if the 404 error page added previously
appears, followed by a redirection after 5 seconds. now u are done

Share Your Comments
Previous Review of iOS 7
Next Google Updating 17 Diff Apps,Sign that KitKat is Fast Approaching

About author

Aamir Shaikh
Aamir Shaikh 1705 posts

<p>A Blogger, SEO Analyst and passionate Web Developer from India.<br /> Believes in hard work and continues working to achieve success.</p>

View all posts by this author →

You might also like