Why my 404 Error Page is not showing Anything?


#1

I have tried many methods to include custom 404 error page. I have also tried MBT’s article on 404 error page creation, but always I am showing a blank white page instead of any customization.

I have also tried some java scripts to redirect error pages to home page, but nothing happened.

My blog: Loveactivity.com


#2

Hello,First check your original template’s demo or give me the template url and see if there is something or not and if it’s not then you have to add that html/css and JS (if any ) in the html part using error conditional tag. So first check and tell me so that I can help you with providing the necessary codes :wink:


#3

Here is the url: http://boxed-soratemplates.blogspot.in/


#4

Hey it seems that they have created it empty while I have found an working trick so you can just follow this steps

http://www.twistblogger.com/2014/03/creative-404-error-page-setup-for-blogger-blog.html

#5

Thankx for your help @Nafees, but ths procedure is not working.


#6

Oh! Wait for sometime let me solve it @whattechsays


#7

Ok so first backup your template

then search for <div id="content"> and paste this codes below it

     <b:if cond='data:blog.pageType == &quot;error_page&quot;'>
    <div id="TB-404-error-box">
        <p align="center"><font color="#ff0000" style="font-size: 57px;"><strong>Oops!</strong></font></p>
        <br><p></p><center><font color="#000">Seems like you either clicked a <div style="color: #0089D6; font-size: 27px;">Broken Link</div> <b>or a Page that no longer exist. Kindly do one of the followings:</b></font></center><p></p><div style="line-height: 25px; font-weight:normal;"><center><b>✔</b> <a href="javascript:history.go(-1)">« Go Back</a>!<br><b>✔</b> Help us to Serve you better by <a href="http://www.yoururl.com/p/contact-us.html">Reporting This Problem</a> to us!<br><b>✔</b> Go to <a href="http://www.yoururl.com">Homepage Address</a>!<br></center></div><p><br></p><p align="center"><font color="#08C500" style="font-size: 100px;"><strong>404</strong></font></p><p align="center"><font color="#EB0F0F" style="font-size: 20px;">Page Not Found!</font></p> </div>
          <style>
        #content {
  width: 100% !important;
  margin: inherit !important;
}
#sidebar {
  display: none !important;
}
        .status-msg-wrap {
        font-size: 100%;
        margin: none;
        position: static;
        width: 100%;
        }
        .status-msg-border {
        display:none
        }
        .status-msg-body {
        padding: none;
        position: static;
        text-align: inherit;
        width: 100%;
        z-index: auto;
        }
        .status-msg-wrap a {
        padding: none;
        text-decoration: inherit;
        }
        #TB-404-error-box{
        background: #FFFFF url(&quot;http://3.bp.blogspot.com/-OoWk39NfJtY/UzKtryqfMVI/AAAAAAAAAhw/M8_7W0m2ly8/s1600/TB-Error-Page.png&quot;) no-repeat scroll 0% 95% rgb(255, 255, 255);
        width: 97%;
        margin: 0px 0px;
        padding: 15px 20px 50px 20px;
        border: 1px solid #E7E7E7;
        -moz-border-radius: 6px;
        -webkit-border-radius: 6px;
        border-radius: 2px; height: 470px;
        }
        </style>
    </b:if>

and save your template and now go to error page and see the results and also don’t forget to replace the links and please reply me if it worked or not


#8

Thanks a lot @Nafees. Now it is working.

Is there any code to redirect all 404 pages to home page.?


#9

Yes ofcourse whenever some one will come to error page they will be directly redirected to the home page

this is the JS where they will be redirected to home page just place this before </head>

   <b:if cond='data:blog.pageType == &quot;error_page&quot;'>
<script type='text/javascript'>
  location.href = "http://yourblog.com";
    </script></b:if>

also if you want to redirect your blog to home page after some time like 3 sec you can place this above </head>

<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
<meta http-equiv="refresh" content="3;url=http://www.yourblog.com/" /></b:if>

you can change 3 to 5 or something else and dont’ forget to replace yourblog.com with your url

Thanx! Glad if it helped