Fix: FileZilla Cannot Connect

Resolve connection timeout and connection refused errors

"Connection timed out" and "Cannot connect to server" are among the most common FileZilla errors. This comprehensive guide will help you identify and fix the root cause of connection problems.

Common Error Messages

  • Error: Connection timed out after 20 seconds of inactivity
  • Error: Could not connect to server
  • Error: Connection refused by server
  • Error: Network unreachable

Quick Fixes (Try These First)

✓ 1. Verify Host Address

Double-check your server address. Don't include "http://" or "https://":

✓ Correct: ftp.example.com or 192.168.1.100

✗ Wrong: http://ftp.example.com

✓ 2. Check Your Internet Connection

Verify your internet is working by opening a website in your browser. Try pinging the server:

ping ftp.yourserver.com

✓ 3. Use the Correct Port

Make sure you're using the right port for your protocol:

  • FTP: Port 21 (standard)
  • SFTP: Port 22 (SSH)
  • FTPS (Explicit): Port 21
  • FTPS (Implicit): Port 990

✓ 4. Try SFTP Instead

If FTP (port 21) doesn't work, try SFTP (port 22). In Site Manager, change Protocol to "SFTP - SSH File Transfer Protocol" and set port to 22.

Detailed Solutions

Solution 1: Configure Firewall

Firewalls (Windows Defender, antivirus, router) often block FTP connections.

Windows Firewall:

  1. Open Windows Security → Firewall & network protection
  2. Click "Allow an app through firewall"
  3. Click "Change settings" → "Allow another app"
  4. Browse and select FileZilla (usually in C:\Program Files\FileZilla FTP Client)
  5. Check both "Private" and "Public" boxes
  6. Click "Add"

Mac Firewall:

  1. System Settings → Network → Firewall → Options
  2. Click "+" and add FileZilla
  3. Set to "Allow incoming connections"

Solution 2: Switch to Passive Mode

Passive mode works better with routers and firewalls.

  1. Open Site Manager (File → Site Manager)
  2. Select your site
  3. Go to "Transfer Settings" tab
  4. Select "Passive" transfer mode
  5. Click "OK" and reconnect

Learn more about passive vs active mode →

Solution 3: Check Server Status

The server might be down or blocking your IP address.

  • • Contact your hosting provider to verify server is online
  • • Check if your IP is blocked (some hosts block after failed login attempts)
  • • Try connecting from a different network or using a VPN
  • • Check hosting provider's status page for outages

Solution 4: ISP Port Blocking

Some ISPs block port 21 for security. Solutions:

  • Use SFTP (port 22): Rarely blocked, more secure
  • Use alternative port: Ask your host if FTP is available on a different port
  • Mobile hotspot test: Try connecting via mobile hotspot to confirm ISP blocking
  • VPN: Use a VPN to bypass ISP restrictions

Solution 5: Router Configuration

Router settings can interfere with FTP connections.

  • • Try connecting with passive mode (see Solution 2)
  • • Enable "FTP Application Layer Gateway (ALG)" in router settings (or try disabling it if enabled)
  • • Forward ports 21 and 20 to your computer (for active mode)
  • • Try DMZ mode temporarily to test (not recommended long-term)

Advanced Troubleshooting

Increase Connection Timeout

If you have a slow connection, increase the timeout:

  1. Edit → Settings → Connection
  2. Increase "Timeout in seconds" (try 60 or 90)
  3. Click OK and reconnect

Enable Debug Logging

To see detailed connection information:

  1. Edit → Settings → Debug
  2. Set debug level to "Verbose"
  3. Try connecting and check the message log for clues

Still Cannot Connect?

If you've tried all solutions above, try these final steps:

  • 1. Verify credentials with hosting provider - They can confirm your FTP/SFTP details are correct
  • 2. Try a different FTP client - This helps identify if it's a FileZilla-specific issue
  • 3. Reinstall FileZilla - Download the latest version and reinstall
  • 4. Check message log - Look for specific error codes to search for targeted solutions

Frequently Asked Questions

Why does FileZilla say "Connection timed out"?

Connection timeout usually means FileZilla cannot reach the server. Common causes: incorrect host address, firewall blocking connection, server is down, or ISP blocking FTP ports.

How long should I wait before a connection times out?

FileZilla typically waits 20-30 seconds by default. You can adjust this in Settings → Connection → Timeout. However, if it's timing out, there's usually a connectivity issue.

Should I use active or passive mode?

Passive mode is recommended for most users, especially if behind a router/firewall. It allows the client to initiate both command and data connections.

Can my ISP block FTP connections?

Yes, some ISPs block port 21 (FTP) for security reasons. Try using SFTP (port 22) instead, which is rarely blocked and more secure.

;