Last updated on 9 December 2023

There are different web servers, each with their pros and cons. For a long time Apache was king but it nowadays has serious competition from Nginx. Another popular choice is LiteSpeed, which is a drop-in replacement for Apache.

The main benefits of LiteSpeed are that it is light-weight and fast (the clue is in the name!). You can get a similar performance with Apache but it requires various tweaks. LiteSpeed is less configurable than Apache but the defaults are designed for speed, without compromising on stability and security.

cPanel Server Information

We use LiteSpeed on all our Linux shared and premium hosting plans. Unfortunately, the Server Information page in cPanel doesn’t tell you if your server is running Apache or LiteSpeed. Or rather, it always tells you that the server is running Apache, even if it is running LiteSpeed. For instance, here is the server information for my example.com website on our strawberry server (our shared cPanel servers are named after fruits):

cPanel's Server Information page prints lots of details about the server, including the Apache version.
The Server Information page, with some incorrect details.

Note that the page shows the server is Apache 2.4.58. That is the Apache version on the server, but LiteSpeed is used as a drop-in replacement. Unfortunately, that information is not included on the page.

How to check if LiteSpeed is used

There are a few different ways to check if your website is powered by LiteSpeed. The first is to look at the response headers the server sends when a page or resource is requested. The header that shows the web server software is server.

For instance, the below image shows the Network tab in my browser’s developer tools. I have selected the first resource (the main document), and in the right-hand pane you can see the response headers for the resource. The response headers are sent by the browser to a client, and they include various bits of information about the server. One of the headers is server, and it confirms the server is running LiteSpeed.

The response headers the server sends to web browsers confirms the web server software. Here, the 'Server' header shows 'LiteSpeed'.
Viewing response headers via your browser’s developer tools.

In both Firefox and Chromium-based browsers you can get the information as follows:

  • Right-click on a page you want to check and select Inspect from the context menu.
  • Select the Network tab in your browser’s developer tools.
  • Refresh the web page to reload all resources for the page.

Alternatively, if you got access to the command line then you can use curl to print the headers. The -I (--head) option fetches the headers only, without downloading the page. You can optionally add the -L (--location) option to follows any redirects, such as a redirect from HTTP to HTTPS.

$ curl -I example.com
HTTP/1.1 200 OK
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
content-type: text/html; charset=UTF-8
link: <http://example.com/wp-json/>; rel="https://api.w.org/"
date: Tue, 20 Oct 2021 11:40:43 GMT
server: LiteSpeed

Note that it is possible that the Server header is not included. Often, web servers are configured so that it does not advertise its name in response headers.

Check the server using PHP

You can also use a server-side language such as PHP to get information about the web server. If you just want to know what server software is running then you can you use the $_SERVER array. This snippet prints just the name of the server software (i.e. Apache, LiteSpeed or Nginx):

<?php echo $_SERVER['SERVER_SOFTWARE']; ?>

And of course you can also use the phpinfo() function:

<?php phpinfo(); ?>

The latter code snippet prints loads of information. Do a search for “Server API” – it will give you both the web server software and the version.