This site uses cookies and other tracking technologies to make possible your usage of the website, assist with navigation and your ability to provide feedback, analyse your use of our products and services, assist with our promotional and marketing efforts, and provide better user experience.

By using the website, you agree to our Privacy policy

Accept and continue

Report a bug

Cancel
37
How-to 8 min read August 1, 2019

How to create a 5XX-error page on a site

A 5XX-error appears when there are internal problems with the server. They can be solved independently or by turning to a hoster. Make the error page well-designed in order not to lose clients because of various server problems.

When server 5XX-errors appear?

5XX means any sort of inner problems, due to which the server can't proceed a query.
Error 500 example
Most often, they appear because of webmaster or administrator. They change either directory or configuration, and the site starts working incorrectly. For instance, the error may appear if the rights are configured wrong.

To fix all that, it's better to rollback all the changes. To do this, you need a log file or long webmaster's memory.

Other reasons for 5XX-errors

1
Exceeded authorized hosting rights. It happens when a file with unauthorized launch attributes is being proceeded.
2
PHP-scripts' running time limits. For example, a standard limit is 300 seconds.
3
Not enough rights for proceeding a file.
4
Problems with PHP. For example, when it works as CGI, which means an application is running with supplied variables. If it is so, the issue can be solved only with the program code diagnostics. As it goes about encoding, you need a programmer for help.
It's not difficult to see the reason for the problem. All the errors and their sources are shown in logs. In most cases, the reason is a site server issue. In this case, it's better to contact your hosting, ask them to explain the causes of the error and fix it.

If you use free hosting, in most cases, you won't be able to view the logs. To solve the problem, you will have to restore the site or find out the factors that caused the crash.

What are server 5XX-errors?

The most common ones are:

  • 500.0 — internal server error.
  • 500.11 — application is shutting down on the webserver.
  • 500.12 — application is busy restarting on the webserver.
  • 500.13 — webserver is too busy.
  • 500.15 — direct requests for Global.asax are not allowed.
  • 500.19 — configuration data is invalid.
  • 500.21 — module not recognized.
  • 500.22 — an ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
  • 500.23 — an ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode.
  • 500.50 — a rewrite error occurred during RQ_BEGIN_REQUEST notification handling.
  • 500.51 — a rewrite error occurred during GL_PRE_BEGIN_REQUEST notification handling.
  • 500.52 — a rewrite error occurred during RQ_SEND_RESPONSE notification handling.
  • 500.53 — a rewrite error occurred during RQ_RELEASE_REQUEST_STATE notification handling.
  • 500.100 — internal ASP error.
  • 503 — service unavailable.
  • 504 — gateway Timeout error.

Why should be created a template for these error pages?

If such notifications don't have a corresponding template, a user can't get back to the homepage or go to the other site sections. Visitors just leave — owner loses clients.

To avoid it, we recommend creating error page templates.

How to adjust the error page?

There is no single algorithm, as all depends on the server settings. Most often, to create the needed page, you need to edit .htaccess file — prescribe there the template which is to be displayed in certain situations.

Search for it in the site root directory. If there isn't any, create it. This very file will also help to point out directory access rights. Prescribe there the error codes for which you want to open special pages:
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 408 /errors/408.html
ErrorDocument 500 /errors/500.html
File .htaccess has to be assigned with 644 rights or rw-r--r-- provided the UNIX is used. Launch the errors.php file: http://example.com/errors.php. All the errors codes for which will be created special notifications should be prescribed.
ErrorDocument 404 in htaccess
Here are some examples of how to encode the error.php file:
Error.php template example

How to decorate the 5XX-error page

Not to lose users, think of the content on the pages related to the server errors. There are three error page types: explaining, entertaining and interactive.

Explaining pages

Such pages describe what went wrong and why. As an addition, they may include a home page link or a search form.
500 Server error page
The advantage of such pages is that you don't need much time on design. There are sites with the completed templates.

To stand out of the crowd and be remembered, you can use various creative descriptions. For example: «Oh no! Cody is sad! Internally sad!».
Original error page template

Entertaining pages

The main task of such pages is to individualize the site, make is original and evocative. Here is Twitter at its the start nearly ten years ago, when there often were server problems:
Twitter error 500 page template
Users remembered such an unusual solution and considered it to be a distinctive feature. Other large projects act in a similar way.
Error 5XX page decoration
«Ooops, something went terribly wrong!»
Unusual 500-error page
«Ooops! An unexpected error seems to be occurred. Why not try refreshing your page? Or you can contact us if the problem persists».

Interactive pages

In this case, visitors are suggested playing a mini-game.
Interactive error page on a site
Such solutions are interesting, as they call positive reaction and improve behavioral factors even if the user faces the error.

How to create error page in cPanel

cPanel is used for web hosting management. This is the paid service, a price for the minimum plan is $15 per month.

How it works:

  • open the panel;
  • go to "Advanced" and click "Error pages";
Error pages in cPanel
  • choose the page that you want to edit:
500 error page in cPanel
  • use the template code or write it yourself;
  • save the changes;
  • enter the "File Manager" on the panel home page;
  • open public_html folder;
  • choose .htaccess and click "Edit";
  • write ErrorDocument 500.shtml and save changes.
Error pages templates in .htaccess
After that, make sure that all the changes have come into effect and all the edited server problems are followed with the right message.

Conclusion

5XX error page helps to keep visitors on the site if some unexpected server problems occur. The most important is the proper setup and design. You can do it yourself via .htaccess file in the root directory or using special tools, e.g. cPanel.

While decorating the page, think of the content carefully. It can be useful and explaining what happened or be entertaining — including beautiful pictures, animation. Less often, people use interactive type — integrated mini-games and apps.

This article is a part of Serpstat's Checklist tool
Checklist at Serpstat
Checklist is a ready-to-do list that helps to keep reporting of the work progress on a specific project. The tool contains templates with an extensive list of project development parameters where you can also add your own items and plans.
Try Checklist now

Learn how to get the most out of Serpstat

Want to get a personal demo, trial period or bunch of successful use cases?

Send a request and our expert will contact you ;)

Rate the article on a five-point scale

The article has already been rated by 0 people on average out of 5
Found an error? Select it and press Ctrl + Enter to tell us
Subscribe to our newsletter
Keep up to date with our latest news, events and blog posts!

Share this article with your friends

Sign In Free Sign Up

You’ve reached your query limit.

Or email
Forgot password?
Or email
Back To Login

Don’t worry! Just fill in your email and we’ll send over your password.

Are you sure?

Awesome!

To complete your registration you need to enter your phone number

Back

We sent confirmation code to your phone number

Your phone Resend code Queries left

Something went wrong.

Contact our support team
Or confirm the registration using the Telegram bot Follow this link
Please pick the project to work on

Personal demonstration

Serpstat is all about saving time, and we want to save yours! One of our specialists will contact you and discuss options going forward.

These may include a personal demonstration, a trial period, comprehensive training articles & webinar recordings, and custom advice from a Serpstat specialist. It is our goal to make you feel comfortable while using Serpstat.

Name

Email

Phone

We are glad of your comment
Upgrade your plan

Upgrade your plan

Export is not available for your account. Please upgrade to Lite or higher to get access to the tool. Learn more

Sign Up Free

Спасибо, мы с вами свяжемся в ближайшее время

Invite
View Editing

E-mail
Message
Optional
E-mail
Message
Optional

You have run out of limits

You have reached the limit for the number of created projects. You cannot create new projects unless you increase the limits or delete existing projects.

I want more limits