Custom 500 Error Page Text
Contents |
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us
Custom 500 Error Page Nginx
Learn more about Stack Overflow the company Business Learn more about hiring developers custom 500 error page example or posting ads with us User Experience Questions Tags Users Badges Unanswered Ask Question _ User Experience Stack Exchange is a
Apache Custom 500 Error Page
question and answer site for user experience researchers and experts. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best rails custom 500 error page answers are voted up and rise to the top How to create a useful 500 internal server error page up vote 40 down vote favorite 18 I'm trying to create a useful HTTP Error 500 Internal server error page and the recommendations I have found and the live examples I have stumpled upon use a very simple layout. They basically include: a logo a headline a message django custom 500 error page and a couple of solutions how to fix it such as reload the page, come back later or contact the webmaster. What are the reasons not to also include the main site navigation or a search bar so that the visitor could find another page on the website? Is it technical or is it just to keep an focus on the error message? error-message errors share|improve this question edited Jan 12 '12 at 4:59 Erics 7,10133571 asked Jan 10 '12 at 11:20 Tony Bolero 4,20511751 Please please please Alert the web master yourself. you've just created an Error catching website and shown it to the user and then ask the User to contact the web master. –Barfieldmv Jan 10 '12 at 13:42 1 You mean it's rude? :) I believe the best way is to automatically send an email to the webmaster with the details (as I asked about here - webmasters.stackexchange.com/q/24386/12031) –Tony Bolero Jan 10 '12 at 13:56 If at all possible present a meaningful error message if there is a reason for the 500. Many sites that have common 500s know why they have a problem. Fark.com has a custom error message which
Not only do they make your website more professional, they can also save you from losing visits to your site. If a visitor sees a generic
Sample 500 Error Page
error page, they are likely to leave your site. However, if 500 error page template they see a helpful error page, they may continue to stay because they can simply click a link
500 Error Page Best Practices
to go to another page within your site. Simple configuration To create a custom error page for your domain, add the following line to an .htaccess file located in http://ux.stackexchange.com/questions/15955/how-to-create-a-useful-500-internal-server-error-page your domain’s web directory: ErrorDocument 404 /error.php This redirects browsers that experience a 404 error (Not Found) to the file "error.php" located in the same directory as your .htaccess file. Alternatively, you can use the above line as a template to create separate custom error pages for each error. Status codes The complete (and very long) list of https://help.dreamhost.com/hc/en-us/articles/215840318-Custom-error-pages errors is available here: Status codes Some of the most common errors you'll probably want to make entries for are: 400 – Bad Request 401 – Unauthorized 403 – Forbidden 404 – Not Found 500 – Internal Server Error For example, to catch those errors, you would add the following to your .htaccess file for the domain you'd like to configure: ErrorDocument 400 /error.php ErrorDocument 401 /error.php ErrorDocument 403 /error.php ErrorDocument 404 /error.php ErrorDocument 500 /error.php This forces a browser to redirect to the /error.php file if it encounters any of the status codes above. Setting up the error.php file Then, in error.php, add something similar to the following. This particular example is made for a wiki site: if someone visits http://www.example.com/Foo, then they are redirected to http://www.example.com/wiki/Foo. Anything after the last "/" is assumed to be a wiki article they are trying to reach:
In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All https://www.digitalocean.com/community/tutorials/how-to-configure-apache-to-use-custom-error-pages-on-ubuntu-14-04 Results By: Justin Ellingwood Subscribe Subscribed Share Contents Contents We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more → 6 How To Configure Apache to Use Custom Error Pages on Ubuntu 14.04 Posted Jun 9, 2015 45.6k views Apache Ubuntu Introduction Apache is the most popular web server 500 error in the world. It is well-supported, feature-rich, and flexible. When designing your web pages, it is often helpful to customize every piece of content that your users will see. This includes error pages for when they request content that is not available. In this guide, we'll demonstrate how to configure Apache to use custom error pages on Ubuntu 14.04. Prerequisites To get 500 error page started on with this guide, you will need a non-root user with sudo privileges. You can set up a user of this type by following along with our initial set up guide for Ubuntu 14.04. You will also need to have Apache installed on your system. Learn how to set this up by following the first step of this guide. Creating Your Custom Error Pages We will create a few custom error pages for demonstration purposes, but your custom pages will obviously be different. We will put our custom error pages in the /var/www/html directory where Ubuntu's Apache installation sets its default document root. We'll make a page for 404 errors called custom_404.html and one for general 500-level errors called custom_50x.html. You can use the following lines if you are just testing. Otherwise, put your own content in these locations:
- echo "
Error 404: Not found :-(
" | sudo tee /var/www/html/custom_404.html - echo "
I have no idea where that file is, sorry. Are you sure you typed in the correct URL?
" | sudo tee -a /var/www/html/custom_404.html - echo