Knowledgebase

Error codes, status codes and what they mean

Error and status codes exist to allow you to quickly see what is preventing something else from working.

 

Though they may seem like an alien language if you're not familiar with them, knowing what each code means makes understanding what's going on with your e-mails or on your website much easier.

 

The code doesn't always give an exact meaning, but it points you to where you can get more details.

 

Common website codes

Status codes for websites can be narrowed down from the number they begin with. 1xx codes are informational statuses, for example. 2xx codes are statuses that show a successful action, 3xx statuses show a redirection, 4xx statuses show a client side error, and 5xx statuses show a server side error.

 

Here are the most common statuses you'll see

 

200 OK

Okay, this one you probably won't see in black and white text, but that's a good thing. This is the code that's returned when all is well, and the server has completed what was requested of it without running into any issues.

 

The only time you'll see the actual code is if you're running a browser add-on such as Firebug, or if you use any command line tools such as wget on your site.

 

404 Not Found

This, as the name suggests, is when a file that's been requested can't be found.

 

Though the error may be simple enough, the cause can sometimes have a little more to it than meets the eye.

 

Much of the time, the file being requested by either the website visitor or the website itself may either not exist, be in a different location, or have a different name.

 

Sometimes though, everything looks to be in the right place, with the right name, and yet the error still appears.

 

There are usually two reasons for this:

 

The domain name actually points do a different server to the one your files are on.

The domain name points to the correct server, and the files are present, but there are rewrite rules in place that direct the request to a non-existant location.

 

Does the domain point to the right place?

You can check if the domain name points to the right or wrong place through different methods.

 

The easiest way to do this is to first check the IP address of your site with us by opening the temporary URL link from your control panel.

 

Once you've noted this down, you can then run a host lookup from a command line on your site using either Windows Command Line, or Terminal in OS X.

 

You can do this by using this command, replacing the domain name with your own: host domainname.com

 

If the IP address matches the IP address in the temporary URL, the domain points to the right place. If not, you'll need to update your DNS records to point the domain to the IP address in the temporary URL.

 

 

Are there any rewrites or redirects in place?

Redirects and rewrites are usually defined in server configuration files.

 

On Linux servers, these will be defined in a file, or files named '.htaccess'. On Windows servers, the file is called 'web.config'.

 

You should check any files with these names on your site to see if there are any redirects in place for the file you or your site gets a 404 error on. If there's on in place, just check it's correct!

 

403 Forbidden

The 'Forbidden' error is a dramatic sounding one, but quite a common one.

 

There are a number of reasons you might see this, but here are the most common:

 

Your site is disabled

Your site's files or folders have permissions that don't allow them to be read

You don't have a homepage file that the server recognises

Here's a little more information on each of these reasons:

 

 

The website is disabled

There are some instances where we need to disable a website due to it being compromised, using too many of the servers' resources, etc.

 

If you check your account, you should see a notification from us in the event that this happens, along with an explanation, so if you see a 403 error, it's worth checking your account for this.

 

 

The file permissions are too restrictive

It may be that the file permissions on the file or folder you're trying to access are too restrictive, and don't allow it to be read globally.

 

Our control panel uses Linux permissions for both Linux and Windows packages (where Linux permissions are translated into Windows equivalents).

 

For files that need to be publicly accessible over the internet, global read permissions need to be enabled.

 

As such, in general, 644 permissions are a safe bet for files, and 755 permissions are a safe bet for folders.

 

Having permissions that are too liberal may also cause this error, as we block any files with x6x, x7x, xx6 and xx7 permissions from running on our platform, as these permissions are a security risk.

 

If your permissions are too liberal, the file will be highlighted in red in your SGIS File Manager.

 

 

The server can't find your homepage

When this happens, you'll see a 403 error, with a note beneath saying that an additional 404 error was encountered.

 

This can occur if you don't have a home page with a name that's recognisable as a home page name in your website's public_html folder

 

Typically, home page files are named index.[something], for instance: index.php, index.asp, index.cgi, index.html, index.htm.

 

Any of these file names are safe bets for a home page.

 

If you want to use a custom home page name, you can configure this either in the .htaccess file on Linux packages, or the web.config file in Windows packages, but it's always best to stick to the index.*** convention to keep things simple if possible.

 

500 Internal Server Error

The 500 'Internal Server Error' is actually a very broad ranged error message, and basically means, in most cases, that there's an issue in the website's code preventing it from being properly interpreted by the server.

 

This can sometimes be down to the configuration files in your webspace (.htaccess being the usual suspect) containing errors, or it can be in the actual website code.

 

The only way to correctly diagnose a 500 Internal Server Error is to check the error logs for that website, which contain the details of the error.

 

These errors can be found by clicking "Download Log Files" in your SGIS's main page.

 

The errors will usually specify the line of code that the issue arises, and give a more specific error message for you to troubleshoot.

 

All HTTP (website) status codes

Informational responses

100

Continue

101

Switching Protocol

Successful responses

200

OK

201

Created

202

Accepted

203

Non-Authoritative Information

204

No Content

205

Reset Content

206

Partial Content

Redirection messages

300

Multiple Choice

301

Moved Permanently

302

Found

303

See Other

304

Not Modified

305

Use Proxy

306

No longer used

307

Temporary Redirect

308

Permanent Redirect

Client error responses

400

Bad Request

401

Unauthorised

402

Payment Required

403

Forbidden

404

Not Found

405

Method Not Allowed

406

Not Acceptable

407

Proxy Authentication Required

408

Request Timeout

409

Conflict

410

Gone

411

Length Required

412

Precondition Failed

413

Request Entity Too Large

414

Request-URI Too Long

415

Unsupported Media Type

416

Requested Range Not Satisfiable

417

Expectation Failed

Server error responses

500

Internal Server Error

501

Not Implemented

502

Bad Gateway

503

Service Unavailable

504

Gateway Timeout

505

HTTP Version Not Supported