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 serverside error.
Here are the most common statuses you'll see
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 theserver 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:
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!
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 eXtend 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 thewebsite'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 eXtend'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
- Switching Protocol
- Non-Authoritative Information
- No Content
- Reset Content
- Partial Content
- Multiple Choice
- Moved Permanently
- See Other
- Not Modified
- Use Proxy
- No longer used
- Temporary Redirect
- Permanent Redirect
Client error responses
- Bad Request
- Payment Required
- Not Found
- Method Not Allowed
- Not Acceptable
- Proxy Authentication Required
- Request Timeout
- Length Required
- Precondition Failed
- Request Entity Too Large
- Request-URI Too Long
- Unsupported Media Type
- Requested Range Not Satisfiable
- Expectation Failed
Server error responses
- Internal Server Error
- Not Implemented
- Bad Gateway
- Service Unavailable
- Gateway Timeout
- HTTP Version Not Supported