--- label: 'Configuring error responses, including 403/404 pages' related: - system.config_basic - core.maintenance --- {% set log_settings_link_text %}{% trans %}Logging and errors{% endtrans %}{% endset %} {% set log_settings_link = render_var(help_route_link(log_settings_link_text, 'system.logging_settings')) %} {% set information_link_text %}{% trans %}Basic site settings{% endtrans %}{% endset %} {% set information_link = render_var(help_route_link(information_link_text, 'system.site_information_settings')) %}
{% trans %}Set up your site to respond appropriately to site errors, including 403 and 404 page responses.{% endtrans %}
{% trans %}When a user visits a web page, the web server sends a response code in addition to the page content. A normal, non-error response has code 200. If the page does not exist on the site, the response code is 404. If the page exists, but the user is not authorized to visit the page, the response code is 403. The core software provides default responses for both 403 and 404 codes, but if you prefer, you can create your own pages for each.{% endtrans %}
{% trans %}Under some situations, your site can generate error messages. These can be due to user errors (such as entering invalid values in a form, or incorrect configuration), PHP runtime errors, or software bugs. Some errors may result in a white screen of death (a totally blank web page response); less drastic errors will generate error messages. You can configure what happens when an error message is generated.{% endtrans %}