HTTP 500 (Internal Server Error) and 503 (Service Unavailable) are generic error codes that indicate something has gone wrong on the server side. They do not give specific details to visitors, but the actual cause is usually recorded in the server’s error log.
500 Internal Server Error
This is the most common server error and can be caused by many things.
Broken .htaccess: A syntax error or invalid directive in your .htaccess file is one of the most frequent causes. Try temporarily renaming .htaccess to .htaccess_backup and reloading the page. If the site works, the issue is in that file.
PHP errors: A fatal PHP error will trigger a 500 response. Check the error log in your control panel (cPanel: Error Log section; DirectAdmin: Error Logs) for the specific PHP error and file/line reference.
File permissions: Incorrect file permissions can prevent the server from reading or executing your website files. Standard permissions are 644 for files and 755 for directories.
Exhausted PHP memory: If a PHP script exceeds its memory limit, it will crash and return a 500 error. You may be able to increase the limit in your php.ini or .htaccess file.
503 Service Unavailable
A 503 error means the server is temporarily unable to handle the request. This can happen because the web server or PHP processor is overwhelmed by traffic, a backend service (like MySQL) is down or unresponsive, or the server is undergoing maintenance. Check that all required services are running. For traffic-related 503 errors, implementing caching and a CDN can help.
Tip: Always check the error log first. The log entry corresponding to the 500 or 503 error will almost always tell you exactly what went wrong.