Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


In IIS, if you use the in-build FTP you need to combine the FTP host header in the FTP username e.g.|domain/username

So, the FTP program gets its "hook" from the username. However, you can connect to the FTP site using over the FTP port.

Why then, doesnt the FTP service work the same way as the HTTP service?

IIS knows what site to serve back based on the host header after all....


share|improve this question
up vote 4 down vote accepted

Virtual hosts is something built into the HTTP protocol (since HTTP version 1.1).

As you probably know, virtual hosts allow the HTTP server to redirect different requests on the same IP and port to different directories or web applications. Your browser actually sends the name of the website it is trying to connect to along with the request for a document.

Most internet protocols don't work this way. Usually a separate IP address or port number is required if you want to serve up something different. Also, usually the server expects you know it's name, since you just connected to it.

Therefore, the FTP protocol doesn't support virtual hosts, because FTP clients don't explicitly tell the server which site they were trying to access. It may come as a surprise, but the SSL protocol used in HTTPS doesn't support virtual hosts either - you need a separate IP address (or port) for each different SSL certificate you install.

share|improve this answer
perfect answer, thanks – Keeno Mar 8 '11 at 10:43
RFC 7151 defines a new HOST command for FTP, for truly supporting name-based virtual hosts in FTP now. – Castaglia Feb 27 at 16:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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