Microsoft KB Archive/229005

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

Article ID: 229005

Article Last Modified on 6/22/2005

-

APPLIES TO


 * Microsoft Internet Information Server 4.0

-



This article was previously published under Q229005



We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/prodtech/IIS.mspx



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://: ) 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   ).



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://.

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://. A connection with the server could not be established.

FTP Command Line Utility
ftp: connect:Connection refused

(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Kevin Zollman, Microsoft Corporation.

Additional query words: www howto kbhowto ie akz

Keywords: kbhowto KB229005

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.