When your website shows a blank page, a 500 error, or just stops working correctly, the fastest way to find out why is to check your error log. This log records the exact error message your server generated, usually with the file name and line number involved, which is far more useful for diagnosing a problem than the generic error page a visitor sees.
What the error log tells you
Each entry in the log is a timestamped line describing what went wrong: a missing file, a PHP syntax error, a database connection failure, a permissions issue, and so on. The most recent entries are usually at the bottom of the list.
The log can include older entries from errors that have already been fixed. Focus on entries with a timestamp matching when the problem started, not just whatever appears first.
In cPanel
- Log in to your cPanel account.
- Scroll to the Metrics section and click Errors.
- cPanel displays the last few hundred lines from your domain's error log. Scroll to the bottom for the most recent entries.
- Look for a line matching the time you noticed the problem, and note the file path and error type it mentions.
If you don't see an Errors icon, your hosting plan or server configuration may log errors differently. Contact support with the approximate time the issue started and they can pull the log for you.
In DirectAdmin
- Log in to your DirectAdmin account.
- Under Advanced Features, click Error Log (sometimes listed as Show Error Log in older themes).
- Select the domain you want to check if you manage more than one.
- Read through the most recent entries at the bottom of the log for a timestamp matching when the problem began.
What to do with what you find
Once you have the exact error message, you can usually search for that specific text (for example, a PHP function name or a database error code) to find a fix, or share the log line with your developer or with support so they can pinpoint the cause quickly instead of guessing from a vague description like "the site is broken."
If you're seeing a specific error code on your site, like a 404, 500, or 403, see our guide to common website errors and how to fix them for what each one usually means.