Mod your 404 page of your WordPress blog
Wordpress automatically creates pretty 404 pages, but why stop there, Whats the use of pretty 404 pages ? Read on to mod your blog to boast your SEO and provide more interactivity to your user.
Whenever a webserver cannot serve you a particular page, due to non-existence of that page, the server returns you a 404 response error.
WordPress Blog automatically redirects to a pretty “Page not found” page, if there is a 404 error i.e either the entered URL is not valid or that post/page does not exist. Well WordPress does half the job for you. In general its always good to have a pretty “Page not found” page,
Why pretty 404 pages are good ?
Well, Pretty 404 pages have added benefits as they tell a visitor, that what they are looking for could not be found, in a very friendly way, rather than showering them with some server mumbo jumbo which they won`t be bothered to look at. This also helps in keeping the user hooked to the site, cuz we don`t want to loose a visitor, we need to get one
.
Some measures which should be taken in terms of making your visitor stay and SEO of your site. ( The following points are listed by Google)
- Tell visitors clearly that the page they’re looking for can’t be found. Use language that is friendly and inviting.
- Make sure your 404 page uses the same look and feel (including navigation) as the rest of your site.
- Consider adding links to your most popular articles or posts, as well as a link to your site’s home page.
- Think about providing a way for users to report a broken link.
- No matter how beautiful and useful your custom 404 page, you probably don’t want it to appear in Google search results. In order to prevent 404 pages from being indexed by Google and other search engines, make sure that your webserver returns an actual 404 HTTP status code when a missing page is requested.
- Use the Enhance 404 widget to embed a search box on your custom 404 page and provide users with useful information to help them find the information they need.
- Use the Change of Address tool to tell Google about your site’s move.
404 Pages tend to reduce your page score so always keep in mind to remove em or make sure they don`t get indexed with any search engine.
Some pretty neat examples of good 404 designs.
How WordPress can help you ?
Pretty 404 pages generated by WordPress are good enough, but why waste the potential of WordPress when it can give your blog a lil more interactivity and SEO boost. To get the maximum of your blog and make sure that the user stays in your blog, There are two things.
Step 1 : Install AskApache Google 404 plugin for your WP blog
If you haven`t added this plugin yet, do add it ASAP. AskApache Google 404 plugin.
This plugin uses some AJAX code, Google Search API’S, and a few tricks to display a very helpful and Search-Engine Optimized Error Page
Step 2 : Add the following code in 404.php inside your theme folder
Just add the following function wherever you want to display the message in 404.php of your theme folder. This function allows your WordPress blog to automatically email you or the admin of your site whenever a user stumbles upon a 404 page. (Modified Source from WordPress Docs)
<?php
$adminemail = get_bloginfo('admin_email'); #the administrator email address, according to wordpress
$website = get_bloginfo('url'); #gets your blog's url from wordpress
$websitename = get_bloginfo('name'); #sets the blog's name, according to wordpressif (!isset($_SERVER['HTTP_REFERER'])) { ?>
Sorry, tried accessing
<?php
$message = "Please don`t mind,";
} elseif (isset($_SERVER['HTTP_REFERER'])) {
echo "You tried clicking ";$failuremess = "A user tried to go to $website".$_SERVER['REQUEST_URI']." and received a 404 (page not found) error. ";
$failuremess .= "User came from ".$_SERVER['HTTP_REFERER'];
mail($adminemail, "$website : Bad Link To ".$_SERVER['REQUEST_URI'], $failuremess, "From: $websitename <noreply@$website>"); #email you about problem
$message = "An administrator has been emailed about this problem, too.";#set a friendly message
}
echo $website.$_SERVER['REQUEST_URI']; ?> and it doesn't exist. <?php echo $message; ?> Try searching below.
Alternative to Step 2
If you are unable to perform Step-2, just download the following plugin if-404-email-me.zip (35)
Extract to plugins directory, activate it and open 404.php located inside your theme folder. Add the following function wherever you want the pretty text to be displayed
<?php if(function_exists(if_error_send_mail)) if_error_send_mail(); ?>
Conclusion
Voila, you have successfully modded your 404 page. I am open to queries, so don`t hesitate, post your comments

















cxpocxfcefwdpefy, sflcjqvftp
good Kharma keeps the wheel turning…
Woah this blog is great i like reading your posts. Stay up the good work! You recognize, lots of people are looking round for this info, you could help them greatly.
That is very interesting, You are an excessively professional blogger. I’ve joined your rss feed and look forward to in quest of extra of your excellent post. Also, I have shared your site in my social networks
I wanted to put you that very small observation to give thanks the moment again for all the gorgeous principles you have contributed on this website. This is really open-handed of people like you to convey easily precisely what most of us might have offered as an e book to end up making some dough for their own end, most notably since you could possibly have done it in case you wanted. The pointers likewise served to become fantastic way to be sure that most people have similar desire just as my personal own to realize lots more when it comes to this matter. Certainly there are many more fun situations ahead for folks who find out your blog.
I have to say that for the past couple of hours i have been hooked by the impressive articles on this blog. Keep up the good work.
Gostaria de um modelo de cardápio ou as porções dos alimentos permitidos para portadores de esteatose hepática. Meu marido foi diagnosticado e embora tenhamos acesso a lista de alimentos proibidos, ainda temos algumas dúvidas sobre como elaborar um cardápio que sacie a fome e esteja adequado às necessidades dele.
Sweet blog! I found it while browsing on Bing. Do you have any tips on how to get listed in Google? I’ve been trying for a while but I never seem to get there! Appreciate it
This internet site is my breathing in, really very good layout and perfect content .
When I read a title like 10 Ways of… or 5 of I kind of expect a numbered list. Then I realized this was guest content. You’ve done a really nice job of integrating Adsense. Your ads are on topic. I visited this ad:
strongzz Thank you for another informative website. Where else could I get that type of info written in such a perfect way? I have a project that I’m just now working on, and I’ve been on the look out for such info.
It is actually a great and useful piece of information. I’m happy that you shared this useful information with us. Please stay us informed like this. Thank you for sharing.
I discovered your weblog web site on google and examine just a few of your early posts. Proceed to keep up the excellent operate. I simply further up your RSS feed to my MSN News Reader. In search of forward to reading more from you afterward!…
I’m extremely impressed along with your writing talents and also with the format in your blog. Is this a paid subject or did you customize it your self? Either way stay up the excellent quality writing, it is uncommon to look a great blog like this one nowadays..
Short answer; when engaged in activity to get you found by active buyers, stick to the facts and let the story take a backlink. When you’re working further up the funnel seeking fame or when talking to your fans, look for ways to more aggressively promote your story. Why? Because when stories are crafted well they get re-told/shared. Make sense?Bob Nunn recently posted: App Happy- How To Avoid Being A Mobile Marketing Failure
I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to create my own blog and would like to find out where u got this from. thanks a lot
I have been absent for a while, but now I remember why I used to love this site. Thanks , I¡¯ll try and check back more frequently. How frequently you update your web site?
Interesting Site. I’ll make sure to look frequently.
I love what you guys are up too. This sort of clever work and coverage! Keep up the very good works guys I’ve included you guys to our blogroll.
I enjoy what you guys are usually up too. This type of clever work and coverage! Keep up the fantastic works guys I’ve included you guys to blogroll.