With the introduction of latest search preferences by Blogger, BlogSpot blogs are now far more optimized than they used to be before. One of the features was "Errors and redirections" The "404 Error" in simple terms is a page that appears when a broken link is clicked and it tells the visitor that the page he clicked no more exits or is deleted. The error page loads inside your post body surrounded a dull grey box. By default you can only add plain text along with HTML tags inside the "Custom Page Not Found" input box using search preferences option page. The message display using this technique looks pretty ugly and we would therefore need a better approach to design a creative 404 Message for a BlogSpot blog. First kindly see a demo of our error page:
Design 404 Error Page For Blogger
The reason why a box appears around the error message is because of Blogger's default style sheet for status messages. We would therefore override the existing style sheet for the error_page alone using conditional statements. I will be using the CSS code prepared by my friend aneesh joseph which really make things simple and would add slight modifications to make the error box more attractive.
Our 404 page will prompt visitor that he has landed a wrong page and will provide him three important options which are:- Go Back to the page from where he came from. We will use JavaScript here.
- Contact the Admin and inform him about the broken link. This will help you track broken links
- And finally to provide a link to homepage.
- Go To draft.blogger.com > Settings > Search Preferences
- Click on Edit link next to : Custom Page Not Found
- Inside the box paste the following code:
<!-- MBT Default Template -->
<div class='MBT-404-box'>
<p style='line-height: 30px'><strong>
<font color='#ff0000' size='5'>
Oops!
</font> <font color='#666666'>
Looks like you either clicked a broken link or a Page that no more exits. Kindly do one of the followings:
</font></strong></p>
<ol style='line-height: 25px'>
<li><a href='javascript:history.go(-1)'>« Go Back</a> </li>
<li>Report the Problem to us by <a href='http://contact.mybloggertricks.com'>Clicking Here</a>    (<em>This will help us serve you even better</em>) </li>
<li>Go To Homepage by <a href='http://www.mybloggertricks.com'>Clicking Here</a>
<br/></li>
</ol>
<p>
<br/>
<br/>
<br/></p>
<p align='center'><font color='#0080ff' style='font-size: 150px'><strong>404</strong></font></p>
<p> </p>
<p align='center'/>
<p align='center'><font size='5'>Page Not Found!</font></p>
</div>
Make these customizations:
- You can edit the bolded texts with anything you like
- Replace http://contact.mybloggertricks.com with link of your contact page
- Replace http://www.mybloggertricks.com with your homepage link
5. Now go to Template > Edit HTML
6. Search for this ]]></b:skin>
7. Just below it paste the following code stylsheet code:
<b:if cond='data:blog.pageType == "error_page"'>To change the background colour of the box edit #FFFFFF
<style type='text/css'>
.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;
}
.MBT-404-box {
background:#FFFFFF;
width:98%;
margin:10px 0px;
padding:20px 10px;
border:1px solid #ddd;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
box-shadow: 5px 5px 5px #CCCCCC;
}
</style>
</b:if>
8. Save your template
9. Done!
Visit any page of your blog that do not exist to see it working just perfectly. You may type anything after your blog address to see the 404 error appearing. For example like:
http://yourblog.blogspot.com/blablabla
or
http://yourblog.blogspot.com/xyz
or
http://yourblog.blogspot.com/anything-here
etc....
What's next?
I am working on some exciting new designs for the 404 error page display and will share latest 404 templates soon. Do let me know if you got into some trouble. Make the best out of blogger. Peace pals! :)
If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »
@Killer-SofT
ReplyDeleteWhat Error You Are Having Telling in Detail might help Us to guide you further thanks
@FAIZAN ALI Hi thanks for your answer Ali, i have add this template but not appear in my blog u can try with my blog http://www.telechargement-dz.com/
ReplyDelete@Killer-SofT
ReplyDelete1.Do You Added the styles in the template correctly
2.Do you Insert the Coding in here Custom Page Not Found at blogger
if you do it link this then if should work fine
@FAIZAN ALI
ReplyDeleteYes bro i have added style and code page not found but it's not appear :(
@Killer-SofT
ReplyDeleteit might be your template problem do you try the one i shared try this and tell if this worked for you
http://www.mybloggerlab.com/2012/03/attractive-404-page-not-found-styles.html
@FAIZAN ALI
ReplyDeleteNot working also Bro ...
@FAIZAN ALI
ReplyDeleteI have problem in my template i have adjust this problem div class has removed , now i have added this and it's work fine, thank you bro for your help :)
Sorry if my english is bad
thanx alot sir g for this great tool i hope i use it and its works?
ReplyDeletethanks bro...
ReplyDeletehey dude...
ReplyDeletei have done the same as above mentioned
but my blog is not showing text on blog
see on my blog
http://www.tipsviablogging.in/blablalbla
I am facing same problem, Pls Help
Delete@Killer-SofT
ReplyDeleteNo Problem Bro
@Umesh Tarsariya
This is due to your template problem
@Amit Mb
ReplyDeleteNice but none of your link is working Your Contact Us Page Indicate to Nothing and Even Your Sitemap link Is not working.its better if you use the styles which Mustafa Sir has shared other then that its your designs :)
@FAIZAN ALI, you are right! But as you can see from the url, its a demo blog. Still in development stage, its pretty easy to replace those links with links of your contact pages, sitemap etc. I am not saying that Mohd's designs are bad. But, It would be more helpful if a link to sitemap is added there. I was wondering if I could embed a labels widget into that page, so it would be more useful for the reader
ReplyDeleteThe above steps are working fine on all blogs may it be from blogger or third party. Please make sure that you insert the HTML code
ReplyDelete@: RiPDaD :
My pleasure. Thanks for being a valuable input buddy. Always welcomed. :)
@Umesh Tarsariya
Looks like you have removed the code. Please add it and make sure you have inserted the html code inside "custom page not found" If all steps are followed correctly then there is no chance of an error or any problem.
Do one thing just type a simple text message inside the box and save it. Do not add any of the codes above and then visit an error page and let me know if the same message appears there.
If it does not then your template is missing the necessary conditional tags.
@Faizan
Thanks for helping others buddy. Feels great. :)
Nice !! Mustafa Ahmedzai !!
ReplyDelete@Mohammad Mustafa Ahmedzai
ReplyDelete6K fb likes...congrats ahmedzai
when will it be 11k dear?
@Mohammad Mustafa Ahmedzai
ReplyDeletewhy is this service unavailable error 503 coming?
and dude, publish n preview buttons are not appearing properly in comment section...
Thanks a lot, as if I did just that but I do not get any message any idea?
ReplyDeletenot working my blog
ReplyDeletevery nice sir .. its working fine thx again
ReplyDelete@Rahmeen Ahmad Khan
ReplyDeleteBro this do happens to me too some times when we visit blog powered by blogger try to reload the page it will work fine this is a technical problem in blogger these days.
And the Publish and Preview button gets hidden when we publish a comment at MBT when it happens to you Simply click on comment box (where we write the comment) Press (TAB) Keep on pressing tab until you able to see Publish or Preview Button
@Rahul Kashyap @Vaggelis AGA
It might be your template problem do as follow
Go To Blogger >> Setting >> Search Preference >> Custom 404 Not Found Page >> Edit >> Remove all the coding if it has and >> Save it >> Now Check www.yourblog.com/404 (Replace yourblog with your domain) and see you get this 404 default text (Sorry, the page you were looking for in this blog does not exist.) If it does not appear then its your template fault
If it template fault then pls give a solution to that fault, pls help How to repair
DeleteThanks for sharing
ReplyDelete@Mohammad Mustafa Ahmedzai
ReplyDeletedear sir...
i have done the same as you told me
my template is missing the necessary conditional tags.
how can i add required conditional tags in my template pls help me
www.tipsviablogging.in (i have placed the code)......(^-^)...
how to upload photos in blogspot that come that in google image comes in 2 days say how send me message sir www.facebook.com/mrhariom
ReplyDeleteThanks for the post. Very useful. Implemented and Working. Thanks again!
ReplyDeleteThanks Mohamad for this code. I have just copied and pasted it in my blogger blog and it worked fine. I don't know how to thank you.Thank you very much,you solved my problem.
ReplyDeleteThanks for sharing. I just found out about this new feature.
ReplyDeleteAlready up and running on all of my 4 blogs.
www.Holistr-bucharest.blogspot.com
Thank You soo Much for this useful post! I was looking for it for a long time.. Thanks once again :)
ReplyDeleteI migrated from wordpress to blogger long back (year ago)
ReplyDeletealways I see this error in google web master tools
feeds/3475238867712452594/comments/default
what to do
can you tell me what is benefits of creating 404 error page in blogger?
ReplyDeleteThanks! I always wonder how to create 404 for blogger. Now I have 404 for my blog!
ReplyDeletehttp://outdatedpenanguncle.blogspot.com/xyz
NICE SIR! thanks :D
ReplyDeleteI get 'NOT FOUND ERROR 404 ' when i want add or remove/edit gadget(page element) on my blog layout. the URL for my blog is moses-ayoub.blogspot.com. What is the reasons of this? and how to fix it?
ReplyDelete~ Mohammad Mustafa Ahmedzai ~
ReplyDeleteI Used It But It's Not Working. In Your Site If Something Is Not Found So It Removes All Widgets And Shows 404 Not Found. But In My Website It Still Shows Widgets And In Post Body It Show 404 Not Found...
Please Give Me The Correct Code To Make 404 Page Like Your Site...
Salman Khan
http://www.ThePakiChat.Net
Thanks for the helpful tutorial.
ReplyDeleteI try aplly these on my blog soon.
I added this code to my blog's Custom Page Not Found box. But whenever I clicked "Save Changes", I got this message "Your HTML cannot be accepted: Tag is broken: A". Any Solution please.
ReplyDeleteMUHAMMAD HASNAIN
www.pakchem.net
The idea is amazing but the problem is, a NO is always a NO whatever make ups one uses to adorn it.
ReplyDeleteGreat post, what you said is really helpful to me. I agree with you anymore. I have been talking with my friend about, he though it is really interesting as well. Keep up with your good work, I would come back to you. :)
ReplyDeleteit really helped me remove my crawls errors , i had almost 72 crawl errors. thank u very much
ReplyDelete<a href="www.ji-make.com>Ji-MaKe</a>
When i look for any doubt about blogger, i search google with ur blog name.
ReplyDeletei know your blog have solution to all blog problems.
Jinson
http://www.tricksage.com
how to use this in wordpress?
ReplyDeleteThanks man this really work fine for me cos have been looking for this long, I really like it you can check the blog out here .... http://nairatech.net
ReplyDeleteThank you so much, it works
ReplyDeleteIts not working for me.. need more details about XML langauge
ReplyDeleteNote work for my blog
ReplyDeletenetvietplus.net
i have set up error 404 page, but the template does not display on non existent pages
ReplyDeletecode is not working on custom template but its working on blogger's default template..can any one suggest how to fix this problem.
ReplyDeleteThanks for the helpful post.
ReplyDeleteI will try to apply on my blog.
Thanks a bunch! I even figured out how to add my own image instead of the 404 text. (And that's exciting because the whole html/CSS thing is new to me.)
ReplyDeleteThanks again.
HI,
ReplyDeleteThanks for sharing this useful post.