Redirect Blogger 404 Error (Page Not Found) To Homepage- If you have removed a page or post from your
blog then your post will be no longer available but what about that you have linked that post elsewhere as internal link of external link. It will cause a lots of problems to users and/or
search engine. When a users click on that link, it will be redirected to 404 error page (Page Not Found). which displaying a text similar to this "
Sorry, the page you were looking for in this blog does not exist" so thus, they will close tab and leave your blog. and in other side, the search engine's spider will be not able to crawl that page as it not available. So it will be good to remove that exist link of removed posts from where you have placed. Or one more thing you can do it to redirect that removed post URL to homepage of your blog. Here is this tutorial i am going to show how you can redirect your 404 error page to homepage.
Also see : How to Add Breadcrumb to Blogspot Blog
Redirect 404 Error Page to Homepage Using Javascript
Go to your blogger dashboard > select your blog and then to
Settings >
Search preferences >
Custom Page Not Found.
Copy and paste below code inside the empty box:
Sorry, the page you're 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>
As you can see the message in above code which is going to displayed that can be changed / modified as you want. If you want to redirect your blog 404 error page to another page than homepage, just replace pathname to
href to
/ with the url of your page. Also you can change redirecting time with other value that 5000 which is the delay expressed in milliseconds.
Save the all changes and now your blog's 404 error page should be redirected to your desired page within 5 second or on that time which you have set in above code.
That's it. If you have any questions, Please ask by commenting below, also share your views about this method. don't forget to share this tutorial with your friends. Thanks :)