Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
Warning: Division by zero in /var/www/sites/jtnew/wp-content/themes/twentysixteen/functions.php on line 16
If everything went well, you found this post by way of this site’s home page or a link or maybe you just typed it in. The important thing is that you found it, but what would happen if the link was wrong or the post vanished. On most sites, when a page is not found, the server generates a “404” error code to let the browser know. Chances are good that you’ve seen the result of this a few times. Usually, it’s boring and sometimes even uninformative, leaving you with nowhere to go. If you have a blog or website, surely you’d like to keep that visitor interested and help them find other content on your site. You’re in luck because today, I’m going to tell you how.
Create Custom Error Pages
What you see above is my custom 404 error page. In WordPress, I replaced everything in /wp-content/themes/joetech/404.php with my own HTML to make my error page custom. The HTML can be anything you want, but you should make sure to view it in a browser by trying to visit any non-existing page on your blog. In my case, I went old school with the famous Windows Blue Screen of Death that often felt like an extension of Windows 98, popping up more often than anyone would like. Of course, I changed it around a bit to include a Star Wars quote and links both to my site and to share the 404 page on Facebook for any who think it’s amusing.
While 404 is the error code and page that surfaces the most, web servers have several codes to indicate the result of a web request. A couple others that come in just behind 404 are 403 (Forbidden) and 500 (Internal Server Error). Many years ago, at an Internet service provider I worked for, we had Macho Man Randy Savage for our 500 page and Mr T. was there to “Pity da Foo” who tried to access a forbidden page. Have fun with it and post links to your results in the comments below.