The 500 Internal Server Error will be familiar to all Internet users. There are various http status codes which are three-digit integers. For every request, there will be a status code to return from the server to the client. Usually, we’d have come through various errors like 404 Not Found error. These error codes are actually http status codes. The 500 Internal Server Error is also an http status code. In this article, we are going to see about 500 Internal Server Error in detail.
The 5xx errors are the status codes returned by the server when the server encounters an unexpected condition which prevented it from fulfilling the request from a client. The 500 Internal Server Error is the general catch all error when the server throws an exception. It is the error message when no more specific error message is suitable. It may be difficult to troubleshoot this error because it can be triggered out by many different issues. One common cause of this error is scripting issues such as a form fails to handle a missing or incorrect value correctly. Various server faults can also cause this error like a failed disk or nonfunctional software module. Simply, the 500 Internal Server Error is a general http status code that means something has gone wrong on the website’s server, but the server could not be more specific on what that exact problem is. It is rare but not impossible that the issues with the computers that connect to the server are triggering this error.
As we’ve seen earlier, it’s a little bit difficult to troubleshoot this error because many issues can lead to the 500 Internal Server Error. Let’s see what steps are necessary to resolve a 500 Internal Server Error page.
The 500 Internal Server Error is caused by the server, there are only a few actions which can be taken from the client side.
Restart the browser after clearing the cache and deleting the cookies. Take it as a 504 Error
The 500 Internal Server Error is not often related to the caching issues but it is possible sometimes the issue will be fixed after you clear the browser cache and cookies. It is not something that you need a high technical knowledge.
In Google Chrome you can clear the cache and cookies by following the below steps.
Press Ctrl + Shift + Delete. You will get a window to clear the browsing data. Ensure that the boxes are checked as in the below screenshot. Click on the button ‘Clear browsing data’.
To clear cache and cookies in Mozilla Firefox,
Please follow the below steps to clear cache.
Press Ctrl + Shift + Delete. You will get a window regarding clear recent history. Ensure that the boxes are checked as in the below screenshot. Click on the button ‘Clear Now’.
The 504 Gateway Timeout is returned when the server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser. This may occur when the other server is down or not working properly. Sometimes the web server may return a 500 Internal Server Error instead of the 504 Gateway Timeout, but that is not common.
If you are the webmaster or the website administrator, you can troubleshoot the error from the server side too. As we’ve seen earlier, the 500 Internal Server Error can be caused by many issues. However, we are going to see some common issues triggering this error.
External Resource Timeout Issues triggered by wrong file and directory permissions Misconfiguration in .htaccess file
Sometimes the web server may need responses from a remote server to complete processing the request from a client. There can be situations that these external resources may timeout. This can be a php timeout. In such cases, the webserver will return a 500 Internal Server Error. We can fix this error by increasing timeout values or setting other appropriate timeout options so that the remote server will not return a timeout error but wait for the request to be processed.
This is the cause of most Internal Server Errors. If the permission of one more file or directories needed to process the request of the client is set wrongly, it will not be accessible to the server so that the error is returned. The wrong permission of a php script is an example of this type issue. This issue can be fixed by resetting the correct permission on the file or directory.
Another common cause of the 500 Internal Server Error is a misconfiguration in the .htaccess file. Errors in URL rewriting can lead to, but not often a 500 Internal Server Error. Locating and correcting the misconfiguration in the .htaccess file can fix this issue.
If you need any further assistance please contact our support department.
This article describes how to use the dig and nslookup tools to test DNS settings. (Microsoft Windows uses nslookup, while Mac OS X and Linux use dig.) You can use these tools to determine the IP address associated with a domain name, obtain the mail server settings for a domain, and much more.
You can use web-based tools or command-line tools to run these types of tests.
If you have never worked at the command line before, web-based networking tools provide an easy way to start troubleshooting DNS. There are many web sites that provide these services for free.
For example, to test if DNS propagation is complete, you can visit https://www.whatsmydns.net and specify a domain name. The site displays a global map showing the IP address associated with the domain name for a variety of DNS servers around the world.
For more in-depth DNS testing, you can use the online dig interface at https://www.digwebinterface.com. For example, to view the A record for a domain (and determine the IP address associated with the domain), follow these steps:
Dig (on Mac OS X and Linux) and nslookup (on Microsoft Windows) are the primary command-line tools for troubleshooting DNS issues.
While web-based tools are convenient and easy to use, it is often faster to use a command-line tool on your own system. The exact steps to do this depend on your computer’s operating system. Follow the appropriate procedures below for your operating system.
Microsoft Windows does not include the dig program. However, the nslookup program provides much of the same functionality. To run nslookup on Microsoft Windows, follow these steps:
1. Open a DOS command window. To do this, click Start, click Run, type cmd, and then press Enter.
2. At the command prompt, type the following command. Replace example.com with the domain that you want to test:
nslookup example.com
nslookup example.com 208.67.222.222
set type=MX
example.com
3. Interpret the output from nslookup. For example, the following output shows information for example.com:
Server: resolver1.opendns.com
Address: 208.67.222.222
Name: example.com
Address: 93.184.216.119
From this, we can see that example.com is currently pointing to IP address 93.184.216.119. We can also see that DNS server resolver1.opendns.com was used for the query.
To run the dig program on Mac OS X and Linux, follow these steps:
1. Open a terminal window. The procedure to do this depends on the operating system and desktop environment:
2. At the command prompt, type the following command. Replace example.com with the domain that you want to test:
dig example.com
dig @208.67.222.222 example.com
dig example.com MX
3. Interpret the output from dig. For example, the following output shows the dig information for example.com:
user@localhost:~$ dig example.com
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46803
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 2424 IN A 93.184.216.119
;; Query time: 12 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Thu Jan 9 16:07:09 2014
;; MSG SIZE rcvd: 45
Dig displays a QUESTION SECTION (the request) and an ANSWER SECTION (what the DNS server sends in response to the request). In this case, we used the default options for dig, which simply looks up the A record for a domain. From this, we can see that example.com currently points to IP address 93.184.216.119.
This article demonstrates how to use a ping test and traceroute tools to test network connectivity between two hosts. Ping performs a basic test to determine if a remote host is available, while traceroute tests the complete route network packets take from one host to another. Traceroute is especially helpful for diagnosing where network slowdowns and congestion occur.
Many scenarios require you to test things locally on your computer using the command line. For example, if you are trying to test the connection between your computer and a remote host, a web-based tool cannot provide this information. It only tests the connection from its own server to the remote host.
The exact steps to use the ping and traceroute tools from the command line depend on your computer’s operating system. Follow the appropriate procedures below for your operating system.
The basic ping test is one of the easiest things you can do to verify connectivity between your computer and a remote host. This test is easy to run from the command line.
To use the ping program on Microsoft Windows, follow these steps:
C:\Documents and Settings\user>ping a2s78.UltaHost.com
Pinging a2s78.UltaHost.com [216.119.143.98] with 32 bytes of data:
Reply from 216.119.143.98: bytes=32 time=46ms TTL=54
Reply from 216.119.143.98: bytes=32 time=45ms TTL=54
Reply from 216.119.143.98: bytes=32 time=47ms TTL=54
Ping statistics for 216.119.143.98:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 45ms, Maximum = 47ms, Average = 46ms
To use the ping program on Mac OS X and Linux, follow these steps:
1-Open a terminal window. The procedure to do this depends on your operating system and desktop environment:
2-At the command prompt, type the following command. Replace example.com with the domain that you want to test:
ping example.com
3-Press Ctrl+C to stop ping after a few tests run, and then interpret the output:
user@localhost:~$ ping a2s78.UltaHost.com
PING a2s78.UltaHost.com (216.119.143.98) 56(84) bytes of data.
64 bytes from a2s78.UltaHost.com (216.119.143.98): icmp_req=1 ttl=54 time=44.4 ms
64 bytes from a2s78.UltaHost.com (216.119.143.98): icmp_req=2 ttl=54 time=43.8 ms
64 bytes from a2s78.UltaHost.com (216.119.143.98): icmp_req=3 ttl=54 time=44.7 ms
The traceroute program provides much more detailed information about a connection to a remote host than ping. Traceroute (or tracert on Microsoft Windows systems) displays information about each hop a packet takes from your computer to the remote host. It is often a good way to pinpoint possible ISP connection issues or network bottlenecks.
On Windows-based systems, use the tracert program to test the path to a server. To do this, follow these steps:
C:\>tracert a2s78.UltaHost.com
Tracing route to a2s78.UltaHost.com [216.119.143.98]
over a maximum of 30 hops:
1 1 ms <1 ms <1 ms Linksys [192.168.0.1]
[Lines omitted for brevity]
8 45 ms 38 ms 38 ms pos-1-6-0-0-pe01.350ecermak.il.ibone.comcast.net [68.86.87.130]
9 67 ms 150 ms 76 ms cr-1.sfld-mi.123.net [66.208.233.62]
10 44 ms 63 ms 46 ms gateway1.UltaHost.com [216.234.104.254]
11 72 ms 57 ms 63 ms a2s78.UltaHost.com [216.119.143.98]
Trace complete.
You can examine the times between each hop to look for places where the connection hangs. In some cases, tracert may also time out, which is indicated by an asterisk (*).
To use the traceroute program on Mac OS X and Linux, follow these steps:
1-Open a terminal window. The procedure to do this depends on your operating system and desktop environment:
2-At the command prompt, type the following command. Replace example.com with the domain that you want to test:
traceroute example.com
3-Interpret the output from traceroute:
user@localhost:~$ traceroute a2s78.UltaHost.com
1 Linksys (192.168.0.1) 0.315 ms 0.452 ms 0.472 ms
[Lines omitted for brevity]
8 pos-1-6-0-0-pe01.350ecermak.il.ibone.comcast.net (68.86.87.130) 39.010 ms 38.054 ms 38.092 ms
9 cr-1.sfld-mi.123.net (66.208.233.62) 45.056 ms 44.335 ms 44.974 ms
10 gateway1.UltaHost.com (216.234.104.254) 45.274 ms 46.650 ms 46.089 ms
11 a2s78.UltaHost.com (216.119.143.98) 44.654 ms 46.028 ms 43.852 ms
You can examine the times between each hop to look for places where the connection hangs. In some cases, traceroute may also time out, which is indicated by an asterisk (*).
MTR (My Traceroute) is a network diagnostic tool that combines the functionality of the ping and traceroute programs described above. It is a good way to monitor in real-time the path network packets take to their destination.
WinMTR is a version of MTR for computers running Microsoft Windows. To download WinMTR, use your web browser to go to https://sourceforge.net/projects/winmtr, and then install the program on your computer.
After you install WinMTR, follow these steps to run a network test:
You can click Copy Text to clipboard to copy the MTR output. This enables you to paste it into another application, such as a text editor or e-mail client. For example, UltaHost’s Guru Crew may ask to see the MTR output if you open a support ticket about network connectivity.
MTR may already be installed by your Linux distribution. If it is not installed, you can install it using your distribution’s package manager (for example, apt-get or yum). After MTR is installed, follow these steps to run a network test:
1- In Linux, open a terminal window.
2- To begin a network test, type the following command. Replace example.com with the name of the domain you want to test:
mtr --curses example.com
The previous command starts MTR in text mode. If your Linux installation has a desktop environment installed, you can type the following command to start MTR with a GUI instead:
mtr --gtk example.com
3- MTR continually tests connectivity to the host, displaying the packet route and total number of pings:
4- To stop testing, type q.
These files may be left by some text/HTML editors (like Vi/Vim) and pose a great security danger if exposed to the public.
<FilesMatch "(\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|swp)|~)$">
## Apache 2.2
Order allow,deny
Deny from all
Satisfy All
## Apache 2.4
# Require all denied
</FilesMatch>
Let’s assume that you wish to deny or block access to your website from 1.2.3.4 IP address.
The below lines provide the means to allow access to your website from all users except one with the IP Address: 1.2.3.4
# Order Allow, Deny Deny from 1.2.3.4 Deny from 1.2.3.5
Allow from All # Order Deny, Allow Deny from 1.2.3.4 Deny from 1.2.3.5
If there are multiple IPs to which you want to deny access, simply add as many ‘Deny from’ rules as needed.
.htaccess is a resourceful file that can allow or deny access to your website or a folder or files in the directory in which it is placed by using order, allow and deny keywords.
Options All -Indexes
That’s it. Now you know how to Allow or Deny access to your website using .htaccess.
In the following example, we will assume that you want to allow access only to 1.2.3.4 IP address. The code that you will need to add in your .htaccess file is:
# Order Allow, Deny Deny from All Allow from 1.2.3.4
Order keyword here specifies the order in which allow, deny access would be processed. For the above ‘Order’ statement, the Allow statements would be processed first and then the deny statements would be processed.
If you have problems connecting to your FTP account using FileZilla, check out the information below to help you solve the problem.
Response: 530 Login authentication failed Error: Critical error Error: Could not connect to server
If you see this error message when trying to connect it means that you entered an incorrect username/password or host. If you don’t remember your login details, please follow the steps in this tutorial to reset it.
Your domain name must point to your hosting account. This happens by pointing your domain name’s DNS A record to your hosting account’s IP address.
Response: 421 Sorry, cleartext sessions are not accepted on this server. Error: Could not connect to server
If you see this message, please check and make sure that FileZilla is set to use the following details:
Protocol: FTP protocol
Encryption: Require FTP over explicit TLS/SSL
LogonType : Normal
Filezilla timeout after 20 seconds of inactivity
Response: 500 unrecognized command Error: Could not connect to server
This error can be caused by an incorrect port setting, please make sure you are using the correct port 21.
Error: Connetion timed out Error: Could not connect to server
If you see this error you’ll first need to make sure that you’re using the correct login information. If they are all correct, you’ll need to check for Firewalls or Antivirus installed on your computer, try disabling them and test the connection again.
Error: Connection timed out after 10 seconds of inactivity Error: Failed to retrieve directory listing
There could be a Firewalls or Antivirus problem, which might be blocking the transfer, try disabling them and test the connection again.
By default, FileZilla is defined to close the transfer of files if the file transfer takes more than a fixed amount of time, so if the disabling the Firewall doesn’t fix the problem you should try disabling the timeout settings.To disable the timeout select Edit -> Settings -> Connections -> Change Timeout to a higher value.
Full error: Connection attempt failed with ‘EAI_NONAME ‘ Neither nodename nor servname provided, or not known.
If you see this error, this means that the issue is related to Name resolution error. The ‘Host’ you are using is not correct, or your domain may not be pointed to our DNS. Check for spelling mistakes or try using the server’s IP address.
This can be done via your php.ini file by adding the following line:
allow_url_fopen = On
The php.ini file is where you declare changes to your PHP settings. You can edit the existing php.ini, or create a new text file in any subdirectory and name it php.ini.
If you want to share a web file with friends or the public, you first need to determine the path of the file.
To determine the URL for files hosted on your primary domain:
For example:
public_html/My_Life.pdf
public_html/images/Image25x120.JPG
public_html/blog/includes/Movies/bigCow.avi
6. Almost there! Now you just need to replace public_html with https:// and your primary domain name.
For example:
http://primarydomain.com/My_Book.pdf
https://primarydomain.com/images/banner25x120.JPG
https://primarydomain.com/blog/includes/Movies/bigjump.avi
Try to browse these URL's and you will see the file you uploaded.
You can even determine file URLs for addon and subdomains. Just replace the public_html/subfolder/ part with the addon or subdomain name.
For the addon domain myblogdomain.com with the document root in the blog subfolder (inside public_html). A path like public_html/blog/includes/Movies/bigjump.avi would become:
http://myblogdomain.com/includes/Movies/bigjump.avi
UltaHost uses Apache, the open source HTTP server software, to host your website. Apache can be customized via modules, and the mod_rewrite module is available for you to use yourself. mod_rewrite can redirect one URL to another URL, rewrite requested URLs, limit access to your site and much more.
A rewrite rule can be invoked by placing it in your .htaccess file. Below are examples of how you can use these rules to customize your hosting experience.
Here are examples of rules that allow you to do the following:
Set Default Homepage
#Specify a default home page (index page)
DirectoryIndex home.html
Specify IP Access
#Allow only specified IPs to access your site
deny from all
allow from 64.95.219.140
allow from 210.23.45.67
Redirect All Website Pages
# Redirect all pages from olddomain.com
# to newdomain.com
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^olddomain.com$
RewriteRule ^(.*)$ https://www.newdomain.com/$1 [R=301,L]
Prevent Sub-folder Access
#Prevent subfolder loading. This goes
#in htaccess for the primary domain
RewriteCond %{HTTP_HOST} ^primary\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.primary\.com$
RewriteRule ^addon\.com\/?(.*)$ "http\:\/\/www\.addon\.com\/$1" [R=301,L]
Prevent Sub-domain Access
#Prevent subdomain name loading.
#This goes in htaccess for the primary domain
RewriteCond %{HTTP_HOST} ^subname\.primary\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.subname\.primary\.com$
RewriteRule ^(.*)$ "http\:\/\/www\.addon\.com\/$1" [R=301,L]
Force Non-www Domain Access
# Never use www in the domain
# Replace 'example.com' with your domain name
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?example\.com)$ [NC]
RewriteRule .? https://%1%{REQUEST_URI} [R=301,L]
Force www Domain Access
# Always use www in the domain
# Replace 'example.com' with your domain name
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([a-z.]+)?example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .? https://www.%1example.com%{REQUEST_URI} [R=301,L]
Set Default Home Folder
# Set a default home directory, (this subfolder always loads)
# Replace 'folder' with your subfolder name
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ /folder/ [R=301,L]
</IfModule>
Redirect Folder Access
# Rename a directory and force visitors to the new name
# Replace 'old' with your old folder name
# Replace 'new' with your new folder name
RewriteEngine on
RewriteRule ^/?old([a-z/.]*)$ /new$1 [R=301,L]
Force HTTPS Access
# Always use https for secure connections
# Replace 'www.example.com' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
Block Multiple Referrers Traffic
# Block traffic from multiple referrers
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
RewriteCond %{HTTP_REFERER} badforum\.com [NC,OR]
RewriteCond %{HTTP_REFERER} badsearchengine\.com [NC]
RewriteRule .* - [F]
Deny File Type Access
#Do not allow these file types to be called
RewriteEngine on
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|exe|swf)$ - [F,NC]
Remove Index
Options +FollowSymLinks -MultiViews -indexes
RewriteEngine On
RewriteBase /
# remove index
RewriteCond %{THE_REQUEST} /index(\.php)?[\s?/] [NC]
RewriteRule ^(.*?)index(/|$) /$1 [L,R=301,NC,NE]
Remove .php
Options +FollowSymLinks -MultiViews -indexes
RewriteEngine On
RewriteBase /
# remove .php; use THE_REQUEST to prevent infinite loops
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.php\ HTTP
RewriteRule (.*)\.php$ $1 [L,R=301]
Remove Index and /
Options +FollowSymLinks -MultiViews -indexes
RewriteEngine On
RewriteBase /
# remove index
RewriteRule (.*)/index$ $1/ [R=302]
# remove slash if not directory
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*)/ $1 [R=301,L]
Add .php To Access a File Without Redirecting
Options +FollowSymLinks -MultiViews -indexes
RewriteEngine On
RewriteBase /
# add .php to access file, but don't redirect
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1.php [L]
These modules are currently installed on all servers (Linux and Windows), except as indicated below.
If you are missing any of these modules, please contact us with the names of the modules.
Any modules NOT listed are either not compatible or not allowed on shared or reseller hosting.
VPS and Dedicated servers are less restrictive when requesting/applying modules.
bcmath | hash | mime_magic | Reflection | wddx |
calendar | iconv | mssql | session | xml |
ctype | imagick* | mysql | SimpleXML | xmlreader |
curl | imap | mysqli | soap | xmlrpc |
date | ionCube Loader | openssl | sockets | xmlwrite |
dom | json | pcre | SourceGuardian | xsl |
exif* | libxml | PDO | SPL | zip |
filter | magickwand* | pdo_mysql | SQLite | zlib |
ftp | mbstring | pdo_sqlite | standard | |
gd | mcrypt | posix | tidy | |
gettext | mhash | pspell | tokenizer |
*The modules exif, imagick, and magickwand are currently only available on Linux servers.
PHP Freetype support is implemented on our shared servers.
Note: This section is still required for clients using EasyApache 3 PHP versions.
These modules are installed on our servers, but must be enabled by the user before use:
OAuth: You must be using the default server version of PHP and add the following line to your php.ini to enable this module:
extension=oauth.so
If you have created additional FTP accounts and experience any login problems, please double check if your username is correct. For example, if your username is u334914894 and you created new FTP account “alex”, your FTP username will NOT be alex, it will be “u334914894.alex” instead.