How To Set A Custom Page Not Found On Blogger - And Redirect It To Your Homepage
Blogger is the one of the interesting
Platform for sharing yours views and solving problem of other. It is found that,
if some error happens to yours blog it become an uncomfortable situation or we
can say an embarrassing situation. Today I am going to solve one of the problems
related to blogger. some time it found that post is not showing in the blogger
dashboard but showing in the google search.
when someone click on that showing the
error message "404 Page not found".
As we don't have a directory access for
blogger so blogger provides you option to redirect or show error message.
To reach to this section you have follow following steps:STEP 1: Login to yours blogger account.
STEP 2: On the left hand side click on search Preferences.
STEP 3: Now click on Custom page not found under ERROR AND REDIRECT.
STEP 4: Paste the SCRIPT PROVIDED BELOW in the text box
<script type = "text/javascript">
BSPNF_redirect = setTimeout(function() {
location.pathname= "/"
}, 1000);
</script>
This is the one of the methods to do this.
Basic logic behind this is redirect the error page calls to home page.
In the above script “location.pathname”
is the path name where you want to redirect to the visitor if some error in
page happens and 1000 is the time duration in the redirecting should be
completed.
Another method to do this is
just modifies the html team setting.
for that you have to go
theme>edit Html.
now press ctrl + F
and type Head
In the starting itself you will
find the code of error message if the page in not found. simply replace the URL
with URL of yours home page.
if any dought please and
comment box.