Show Menu
Cheatography

17 Most Common HTTP Website Errors & Codes Cheat Sheet by

Most common HTTP website errors and codes, what they mean and how to fix them.

200 OK

This code indicates a properly functi­oning page. Yay – success!

301 Permanent Redirect

If you want to redirect bots and visitors, who land on page A to go to page B, you need to use 301 permanent redirect. Frequently used to redirect an old domain to a new one or to redirect whole domains from http to https. About 85% of the linking juice1 that is originally sent to Page A is moved to Page B.
To Fix
Server­-side 301 redirects can be configured in the .htaccess file, located in the website’s public­_html folder.
1https:­//a­hre­fs.c­om­/bl­og/­301­-re­dir­ects/

302 Temporary Redirect

You can use 302 redirect if you want bots and visitors who land on Page A to go to Page B tempor­arily. None of the linking juice2 that is originally sent to Page A will be passed to Page B. 302 redirects are not to be used as permanent solutions.
To Fix
There are times when using 302 redirect is approp­riate: 1) A/B testing of a webpage; 2) Getting client feedback on a new page; 3) Fixing a broken webpage.
2https:­//w­ww.s­eo­cla­rit­y.n­et/­pil­lar­/ur­l-r­edi­rects

400 BAD REQUEST

The request to visit the website was corrupted, & the applic­ation you are using (e.g., your web browser) accessed it incorr­ectly. It could also be caused by a bad internet connection or a caching issue.
To Fix
You should: 1) Check your internet connection and settings; 2) Clear your cache; 3) Try a different browser.

401 UNAUTH­ORISED

You are not authorized to access the page you are trying to visit. A login was presented, but you didn’t log in properly.
To Fix
To access this web page, you need to obtain a password. Contact the web page admini­strator or owner.

403 FORBIDDEN

You are not allowed to visit the page you requested. You were trying to access a directory or page that you don’t have access to, and there was no login presented.
To Fix
To access the web page, you need to obtain an account or a login. Try going back to the home page and checking if you can sign-up for an account.

404 NOT FOUND

You are trying to access a web page that doesn’t exist. You get the 404 error whenever you 1) mistype the URL; 2) Try to access a deleted or a moved page; or 3) Access a page with a broken link.
To Fix
Set-up custom 404 pages with instru­ctions for the visitors where they should go next (i.e., Home Page). Double­-check the URL spelling, punctu­ation, and suffix (.com, .net, .org, etc.) of the domain name.
 

405 METHOD NOT ALLOWED

The server is refusing to perform your request. The web browser placed a request for the web page, but the server is refusing to fulfill it.
To Fix
If it is an error in the web site's code or a faulty redirect, it has to be fixed on the back-end. However, you can always check: 1) The spelling of the requested URL; 2) Rollback recent upgrades to the site; 3) Uninstall new extens­­ions, plugins; 4) Check the .htaccess file in your public­­_html directory.

408 REQUEST TIMEOUT

The request to retrieve the page was stopped before the server finished fetching page inform­ation, which can happen if you 1) closed the browser too quickly; 2) clicked on a link too soon, or 3) hit a stop button in the browser.
To Fix
Try to reload and access the page again.

410 GONE

You are trying to access a web page that doesn’t exist. The page is no longer available from the server, and there is no forwarding inform­ation available.
To Fix
Remove any references or links on your website to ghost pages; otherwise, you are sending visitors to dead ends.

451 UNAVAI­LABLE FOR LEGAL REASONS

You requested a page that can’t be displayed because it has been censored by the govern­­ment. The court orders block the site. It can mean that the page has copyright issues or illegal political content.
To Fix
You can first try accessing the page by using the HTTPS protocol instead of HTTP. If the website is blocked due to censor­ship, you can try accessing it through Private Internet Access (PIA).3
3https:­//w­ind­ows­rep­ort.co­m/e­rro­r-4­51-­una­vai­lab­le-­leg­al-­rea­sons/

500 INTERNAL SERVER ERROR

A web server encounters some form of an internal error. When the webserver is overlo­aded, it is not able to handle requests properly.
To Fix
You should try to: 1) Reload the page; 2) Clear your cache; 3) Delete cookies; 4) Restart or try a different browser.

501 NOT IMPLEM­ENTED

You requested a page with a feature that your browser does not support. The server doesn’t have the functi­­on­ality to fulfill your request. Error 501 can sometimes be caused by malware.
To Fix
You should try to: 1) Reload the page; 2) Clear your browser cache; 3) Check your VPN and/or proxy4; 4) Contact your host provider.
4https:­//w­ww.e­le­gan­tth­eme­s.c­om/­blo­g/w­ord­pre­ss/­how­-to­-fi­x-t­he-­htt­p-e­rro­r-c­ode-501
 

502 BAD GATEWAY

While acting as a gateway or a proxy, the server received an invalid response from the upstream server. The response received is bad, overlo­­aded, or it has network issues.
To Fix
It is a webserver error. You can try: 1) Reloading the page; 2) Using the browser in Safe Mode5; 3) Checking for server connec­tivity issues; 4) Contacting your host.
5https:­//w­ww.e­xa­i.c­om/­blo­g/5­02-­bad­-ga­teway

503 SERVICE UNAVAI­LABLE

You are trying to access a web page where the server is down or the site is busy. The server may be undergoing mainte­nance or is overloaded with requests.
To Fix
You should try reloading and accessing the web page later.

504 GATEWAY TIMEOUT

There is a server to server commun­ication problem. A web server attempting to load a page did not get a timely response from the server where the page is hosted.
To Fix
You can try: 1) Reloading the page; 2) Disabling proxy settings; 3) Checking your DNS; 4) Tempor­­arily disabling CDN6; 5) Checking with your host; 6) Rolling back recent upgrades to the site.
6https:­//k­ins­ta.c­om­/bl­og/­504­-ga­tew­ay-­tim­eout/

BONUS: 418 I’M A TEAPOT

The server refused to brew coffee because it is, perman­ently, a teapot, and the resulting entity­-body MAY be short and stout. (☉_ ☉) Error code 418 was released on April’s Fool Day in 1998 as part of the Request for Comments (RFC)7. Who said developers don’t have a sense of humor. <( ̄­︶ ̄)>
To Fix
Don’t brew coffee in a teapot. Try a coffee­maker instead. (˘▾˘)
7https:­//t­heh­ist­ory­oft­hew­eb.c­om­/im­-a-­teapot/

Fixes You Can Always Try

Based on fixes for most errors, there are few things you can always try:

❄ Check the spelling of your URL;
❄ Reload the page;
❄ Clear your cache;
❄ Try a different browser;
❄ Try accessing the page in a Safe Mode;
❄ Check your internet connec­tion;
❄ Rollback recent upgrades to the site;
❄ Check your .htaccess file in your public­_html directory;
❄ Contact your host provider.
           
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Linux Command Line Cheat Sheet
          HTTP Status Codes Cheat Sheet
          HTTP Server Status Codes Cheat Sheet