How to Connect to a Web or FTP Site Using Non-Default Port

ID: Q229005


The information in this article applies to:
  • Microsoft Internet Information Server version 4.0


SUMMARY

By default, Web sites use TCP port 80, and FTP sites use port 21. However, other ports may be assigned to a Web or FTP site.

To specify a non-default TCP port when connecting through a Web browser, add a colon ( : ) and then the port number (for example http://<ComputerName>:<PortNumber>) to the end of the URL.

To specify the TCP using the Windows NT FTP command line utility, type ftp to start the FTP utility, and then use the "open" command, followed by a space, and then the port number (for example open <ComputerName> <PortNumber>).


MORE INFORMATION

Specifying a Port When Using a Browser

If a Web site on the local computer is using the non-default port of 81, type the following in the Address text box to open it in a browser such as Internet Explorer:
http://localhost:81/
Similarly, to open an FTP site that uses the non-default port of 22 from the browser, perform the following session at a command prompt:
ftp://localhost:22/

Specifying a Port When Using the FTP Utility

To open an FTP site that uses the non-default port 22, using the FTP utility, type the following at a command prompt:
C:\>ftp
ftp> open localhost 22

Errors Caused by Attempting to Connect with the Wrong Port Number

Below are the error messages displayed when you attempting to connect to a Web or FTP site using the incorrect port number.

HTTP Using Internet Explorer 4.0 and 5.0

Internet Explorer cannot open the Internet site http://<ComputerName>.
A connection with the server could not be established.

FTP Using Internet Explorer 4.0 and 5.0

Internet Explorer cannot open the Internet site ftp://<ComputerName>. A connection with the server could not be established.

FTP Command Line Utility

ftp: connect:Connection refused

Additional query words: www howto kbhowto ie

Keywords :
Version : winnt:4.0
Platform : winnt
Issue type : kbhowto


Last Reviewed: April 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.