52

Is there any program or command that I can use to detect what webserver a website is using? With webserver I mean in software i.e. IIS 6, Apache or nginx.

56

You can use Netcraft What's That Site Running for a one off query.

You can use

wget --save-headers superuser.com

Which will dump the server headers into a new file index.html which you can then view in a text editor.

Eg, for this site:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Expires: Tue, 16 Mar 2010 22:54:59 GMT
Server: Microsoft-IIS/7.5
Date: Tue, 16 Mar 2010 22:54:58 GMT
Connection: keep-alive
Content-Length: 119466
| improve this answer | |
  • for Windows users curl is better, GnuWin's ported wget doesn't return anything useful – overdriven Jun 8 at 9:22
25

raw:

curl -I duckduckgo.com

filtered:

curl -s -I duckduckgo.com|grep Server

or

curl -s -I duckduckgo.com|sed -n '/^Server:/p'

or ├╝bercool

curl -s -I duckduckgo.com|awk '$1~/Server:/ {print $2}'

or for poser

curl -s -I duckduckgo.com|sed -n 's/^S[erv]*: //p'

only for unixoide OS!!!

| improve this answer | |
  • 1+ for "übercool" and "poser". Indeed SED+AWK Users are übercool posers :D – Gewure Jul 19 '17 at 7:48
  • works with cURL on Windows as well – overdriven Jun 8 at 9:23
  • I would recommend suggesting curl --head instead of curl -I (uppercase i), which I misread as curl -l (lowercase L). – jamesdlin Jul 11 at 23:04
3

For a public website, you can use Netcraft - http://netcraft.com/. It allows you to plug in a website's address, and it will analyze the headers and tell you the webserver in use.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.