If you are visiting the website
For a read-only page, wait briefly and try once more. If the error follows a payment, order or form submission, check whether the action completed before submitting again. Report the page, time and any request ID without private query values or account details.
If you maintain the application
- Establish the scope. Is one route affected or the whole site? Compare the same method and route in application monitoring. A working homepage does not prove that an API operation is healthy.
- Correlate the failure. Use the time and request ID to find the matching application, runtime and web-server errors. On Apache, the
ErrorLogconfiguration determines the log location; a copied Linux path may be wrong. - Check the most recent change. Compare the last working release with changed configuration, code and dependencies. If you roll back, first check database migration compatibility and confirm the original failing request afterward.
- Follow the specific log evidence. An exception calls for application debugging; a failed database connection calls for checking that dependency. Confirm permissions, resource limits or configuration errors only when the evidence points there. Do not apply blanket writable permissions.
Capture a read-only response
Substitute a safe GET route you administer. This prints response headers without saving the body:
curl -sS -D - -o /dev/null --max-time 15 https://example.com/protected-resource
The command does not follow redirects. Use the original application method and client when reproducing a different request; do not replay payments or other writes blindly. Keep detailed stack traces in private logs, not the public error page. Remove cookies from headers before sharing them.
A custom error page is not a repair
Nginx error_page changes error handling and presentation. A friendly page can help visitors, but the underlying failing operation still needs diagnosis. Preserve an appropriate error status and verify the application after fixing the cause.
Related server errors and search visibility
Compare 502: invalid upstream response, 503: temporary unavailability and 504: upstream timeout. Do not relabel an unexplained 500 just to hide it from monitoring.
Google slows crawling when server errors occur; persistent errors can eventually remove affected URLs from the index. Restoring 200 does not guarantee indexing. Google’s HTTP guidance.
References: RFC 9110, 500 semantics · Apache error logs · Nginx error_page. Related: 401 authentication failures.