# Viewing the error log in cPanel

> Open the Errors tool in cPanel to see your site's recent error log entries and track down broken links or permission problems.

Source: https://helpcenter.ruachost.com/cpanel/logs-and-statistics/viewing-the-error-log-in-cpanel/

The **Error Log** in cPanel helps you identify problems with your website. It records HTTP errors that occur when visitors try to access your site, such as missing files or permission issues. It can also reveal suspicious activity like virus infections or unauthorized access attempts.

## Why Use the Error Log?

- Detect broken links or missing files.
- Identify incorrect file permissions.
- Spot suspicious activity (possible hacks or malware).
- Troubleshoot site performance issues.

## Steps to View the Error Log

1. **Log in to cPanel.**
2. On the **Tools page → Metrics section**, click **Errors**.
3. The error log displays the **last 300 entries** from your site’s log.

   - Entries appear in **reverse chronological order** (newest first).
   - Each entry shows the date, time, error type, and affected file/URL.

## Example Errors

- **404 Not Found** → Requested file does not exist.
- **403 Forbidden** → Permission denied.
- **500 Internal Server Error** → Server misconfiguration.
- **401 Unauthorized** → Authentication required but not provided.

> **Note:**
- Use the error log to quickly diagnose issues without digging into raw server logs.
- For deeper analysis, use **Raw Access Logs** or **Latest Visitors** in cPanel.
- If you suspect hacking or malware, open a support ticket with your hosting provider.
