Skip to content

Virtual Hosts · passage 3 of 4

Methodology

4 code blocks · Virtual Hosts/README.md

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page.

Open this passage on GitHub

When a web server hosts multiple websites on the same IP address, it uses **Virtual Hosting** to decide which site to serve when a request comes in. In HTTP/1.1 and above, every request must contain a `Host` header:

GET / HTTP/1.1
Host: example.com

This header tells the server which domain the client is trying to reach. * If the server only has one site: The `Host` header is often ignored or set to a default. * If the server has multiple virtual hosts: The web server uses the `Host` header to route the request internally to the right content. Suppose the server is configured like:

<VirtualHost *:80>
    ServerName site-a.com
    DocumentRoot /var/www/a
</VirtualHost>

<VirtualHost *:80>
    ServerName site-b.com
    DocumentRoot /var/www/b
</VirtualHost>

A request with the default host ("site-a.com") returns the content for Site A.

GET / HTTP/1.1
Host: site-a.com

A request with an altered host ("site-b.com") returns content for Site B (possibly revealing something new).

GET / HTTP/1.1
Host: site-b.com

Source: Virtual Hosts/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.

Every one of the 4 is a mark on the map. Named now: 1 to 4, reading order first.

  1. Virtual Host§ 1text · README.md
  2. Tools§ 2text · README.md
  3. Methodology§ 34 code blocks · README.md
  4. Fingerprinting VHOSTs§ 41 code block · README.md

Zoom in on the map and the dots under the middle of it are named where they are.

Data as of 2026-11-15. CVE List through 2026-11-15 · EPSS of 2026-11-15 · CISA KEV checked 2026-11-15. Source: PayloadsAllTheThings by Swissky and contributors, MIT License. For authorised testing only.