How-to March 25, 2020  |  27088   |  8 min read  – Read later

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, an error may appear if the rights are configured wrong.

To fix all that, it's better to roll back 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 HTTP modules configuration does not apply in Managed Pipeline mode.
  • 500.23 — an ASP.NET HTTP Handlers 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. For all the error 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 occur. Why not try refreshing your page? Or you can contact us if the problem persists».

Interactive pages

In this case, visitors are suggested to play 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 explain what happened or be entertaining — including beautiful pictures, and animation. Less often, people use interactive type—integrated mini-games and apps.

Dive deeper into technical SEO with Serpstat academy
Checklist at Serpstat
Discover how to make your website more search engine friendly by implementing technical SEO best practices.
Watch video lesson on technical SEO

Speed up your search marketing growth with Serpstat!

Keyword and backlink opportunities, competitors' online strategy, daily rankings and SEO-related issues.

A pack of tools for reducing your time on SEO tasks.

Get free 7-day trial

Rate the article on a five-point scale

The article has already been rated by 4 people on average 4.2 out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Discover More SEO Tools

Tools for Keywords

Keywords Research Tools – uncover untapped potential in your niche

Serpstat Features

SERP SEO Tool – the ultimate solution for website optimization

Keyword Difficulty Tool

Stay ahead of the competition and dominate your niche with our keywords difficulty tool

Check Page for SEO

On-page SEO checker – identify technical issues, optimize and drive more traffic to your website

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.

Name

Email

Phone

We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

Open support chat
mail pocket flipboard Messenger telegramm