Support article
Which port to use when connecting by FTP
Learn which port you should use for FTP, FTPS or SFTP connections to your hosting account and what to check if the connection fails.
Introduction
To upload or manage website files with an FTP program, you need the server, the username, the password and the connection port.
The most common port for a standard FTP connection is 21. There are also other connection types, such as FTPS and SFTP, which may use different settings.
Recommended port for FTP
For a standard FTP connection, use:
FTP port: 21
Typical connection details look like this:
Server: your-domain.com
Username: your FTP username
Password: your FTP password
Port: 21
Protocol: FTP
You can also use the hosting server name if that is what appears in your access details.
Difference between FTP, FTPS and SFTP
FTP
This is the classic file transfer protocol.
Protocol: FTP
Port: 21
FTPS
This is FTP with SSL or TLS encryption. In many clients it appears as Explicit FTP over TLS.
Protocol: FTPS
Typical port: 21
In most cases it still uses port 21, but the connection is encrypted.
SFTP
SFTP runs over SSH and is not the same as FTP.
Protocol: SFTP
Typical port: 22
You can only use it if your service has SSH or SFTP access enabled.
Quick FileZilla example
If you use FileZilla, a typical setup is:
- Open
File > Site Manager. - Create a new site.
- In
Host, enter your domain or hosting server. - In
Protocol, chooseFTP. - In
Encryption, chooseExplicit FTP over TLSif available. - In
Logon Type, useNormal. - Enter your username and password.
- In
Port, enter21. - Click
Connect.
Common problems
Wrong username or password
Make sure you are using the correct FTP username. It is not always the same as the main control panel user.
The server does not connect
Check these points:
- The domain points to the correct hosting account.
- The port is correct.
- The FTP server name is written correctly.
- Your firewall or antivirus is not blocking the connection.
Error when using SFTP
If you try port 22 and it does not work, your plan may not have SSH or SFTP enabled.
You connect but do not see files
This may be caused by the connection mode. Try switching between active and passive mode. In most networks, passive mode is the most compatible option.
Useful tips
- Use
FTPon port21if you only need to upload or download files. - Use
FTPSif your client supports it and you want encryption. - Use
SFTPon port22only if the service supports it. - Do not share your FTP credentials with unauthorized third parties.
- If you need temporary access, create a dedicated FTP account.
Frequently asked questions
Which port should I use for FTP
The normal FTP port is 21.
Which port does SFTP use
Usually 22, as long as the service has SSH or SFTP access enabled.
Are FTP and SFTP the same
No. Both transfer files, but they use different protocols.
Can I use my domain as the FTP server
Yes. In many cases you can use your-domain.com or ftp.your-domain.com. If the domain does not point to the hosting account yet, use the server name from your access details.
Conclusion
To connect to your hosting account by FTP, the port you should normally use is 21.
If you want a more secure connection, you can try FTPS. If you need SFTP, remember that it usually uses port 22, but that access must be enabled on your service.