An HTTP status code is a three-digit number a website sends back with every page request to say how it went, such as 200 for OK or 500 for an error. It is the shortest possible answer to the question “did that work?”
What is an HTTP status code?
Browsers, search engines and monitoring tools all read the status code before they look at anything else.
Every response from a web serverA web server is the program, such as Apache, Nginx or LiteSpeed, that answers when a visitor opens your site and sends back the page and files. starts with a status line, and the status code sits in it. The first digit tells you the family. Codes starting with 2 mean success, 3 means the visitor is sent somewhere else, 4 means the request was wrong or the page is not there, and 5 means the server failed.
The ones you meet most often are 200 (the page loaded), 301 (moved permanently), 302 (moved temporarily), 403 (access denied), 404 (not found), 500 (internal server error), 502 and 503 (the server or a service behind it is unavailable). The code travels in the same response as the HTTP headersAn HTTP header is a short line of extra information that a browser and a website send each other with every page request, invisible to the visitor., so you can see both in the browser’s developer tools.
What status codes mean for a PHP or WordPress site
A visitor rarely sees the number, but they see the result: a page, a redirect or an error screen. For you, the code is the first clue to what went wrong.
A 500 on a PHPPHP is a programming language that builds your web pages on the computer that hosts your site, just before they reach the visitor. WordPress runs on it. site usually means PHP stopped halfway. Typical causes are a fatal error in a pluginA WordPress plugin is an add-on you install in WordPress to give your site extra features, such as contact forms, SEO tools or a webshop. or themeA WordPress theme is a ready-made package that decides how your WordPress site looks and how its pages are laid out. Change the theme and the design changes., a PHP versionA PHP version is a numbered edition of PHP, like 8.3. Each edition is looked after for a limited time, then gets security fixes only, then nothing. that a plugin no longer supports, or a memory limit that is too low. A 503 often points to a server that is overloaded or in maintenance. A 403 can be a security rule or wrong file permissions. A 404 on pages that used to work often follows a migration or a changed permalink setting.
The detail behind the number is in the error logAn error log is a file where your website's software writes down what went wrong, with the time and place. It is the first thing to check when a site breaks.. The status code says that something failed; the log says where and why.
How to check the status code of a page
Open your browser’s developer tools, go to the Network tab, reload the page and look at the Status column. In a terminal, curlcURL is a tool that lets software, such as PHP, fetch information from other websites and services, for example to check for updates or send an order. -I followed by your address prints the status line and headers. Check more than the homepage: a contact page, a product page and an old URL that should redirect will quickly show whether the setup is healthy.
Pay attention to redirects. A chain of several 301s in a row slows pages down, and a redirect that points back to itself ends in an error. After a move to a new host or domainA domain name is the address people type to reach your website, such as yourcompany.com. It points visitors to wherever your site is hosted., every old address should answer with a single 301 to its new counterpart.
When to act
A 404 on one old page is not urgent. A 500 or 503 on pages that matter is, especially when it lasts longer than a few minutes or comes back after a restart. If your site shows a 500 or a white screen and you cannot find the cause, our emergency help for a website down is the quickest route back to a working site. Take a backupA backup is a separate copy of your website's files and database, so you can bring the site back after a mistake, a hack or a failed update. first if the site still loads partly, so nothing gets lost while you investigate.
Frequently asked questions
What does a 500 error mean on my website?
A 500 status code means the server failed while handling the request. On a PHP site the cause is often a fatal PHP error, a broken plugin or a wrong server setting. The error log usually names the exact file and line.
What is the difference between a 301 and a 302?
Both send visitors to another address. A 301 says the move is permanent, a 302 says it is temporary. Use a 301 when a page has moved for good, for example after a migration.
Is a 404 bad for my site?
A single 404 is normal: it tells browsers that a page does not exist. It becomes a problem when pages that should exist return it, or when many internal links point to missing pages.