CodeGuard is a third-party website backup service that connects to your hosting account via FTP or SFTP to download and store copies of your files. If CodeGuard reports it can't connect, the issue is usually an incorrect hostname, blocked IP, or passive FTP port range problem. This guide covers the most common causes and fixes.
Use your server's hostname (shown in your cPanel left sidebar or welcome email) as the FTP host, not your domain name. If your domain uses Cloudflare or another proxy, the domain name resolves to the proxy IP, not your hosting server, and FTP connections will fail.
01. Correct FTP Settings
Host: Your server hostname (e.g., web150.ultrawebhosting.com) or your server's direct IP address
Port: 21 (FTP) or 22 (SFTP)
Username: Your cPanel username (the main account, not an FTP sub-account)
Password: Your cPanel password
Protocol: FTP with TLS (FTPS) or SFTP preferred
Do not use your domain name as the FTP host if your domain uses Cloudflare, a CDN, or any DNS proxy. FTP connections must go directly to the hosting server. Use the server hostname or IP address instead.
02. Firewall Blocks
CodeGuard connects from a range of IP addresses. If our server firewall (CSF) has blocked one of CodeGuard's IPs due to failed login attempts, the connection will fail.
Check if CodeGuard's IPs are blocked:
# Search the firewall deny list
csf -g [CodeGuard IP]
# Or search all deny lists
grep "CodeGuard_IP" /etc/csf/csf.deny
If blocked, unblock the IP and whitelist it:
csf -dr [CodeGuard IP]
csf -a [CodeGuard IP] "CodeGuard backup service"
You can also check for blocks using our firewall unblock guide. If you're not sure what IPs CodeGuard uses, contact their support for their current IP range.
03. Passive FTP Issues
FTP uses two connections: a control connection (port 21) and a data connection. In passive mode (which CodeGuard uses), the server tells the client to connect on a random high port. If the firewall isn't configured to allow the passive port range, the control connection succeeds but file transfers fail.
On Ultra Web Hosting servers, the passive FTP port range is configured in Pure-FTPd. Verify it's set and the firewall allows it:
# Check passive port range
cat /var/cpanel/conf/pureftpd/main | grep PassivePortRange
# Ensure CSF allows these ports (should be in TCP_IN)
grep "TCP_IN" /etc/csf/csf.conf | head -1
04. Using SFTP Instead
SFTP (SSH File Transfer Protocol) is more reliable than FTP for automated backup services because it uses a single connection on port 22, avoids passive mode complications, and encrypts all data in transit.
If CodeGuard supports SFTP (most plans do), switch to it:
- Change protocol to SFTP in your CodeGuard site settings
- Set port to 22
- Use your cPanel credentials - Same username and password as FTP
- Verify SSH access is enabled - In cPanel, check that "Shell Access" is enabled for your account. If it's not, contact support to enable it
For more on FTP vs SFTP, see our FTP guide and SSH access guide.
05. Troubleshooting
Connection timeout - Firewall is blocking the IP or the hostname doesn't resolve to the right server. Try using the direct server IP instead of the hostname.
Authentication failure - Wrong username or password. Reset your cPanel password and update it in CodeGuard. Make sure you're using the cPanel username, not an email address.
Directory listing fails - Connected but can't list files. Usually a passive FTP issue. Switch to SFTP.
Backup starts but fails partway - Large accounts may hit FTP timeout limits. Switch to SFTP which handles long transfers more reliably. Also check disk space on both sides.
Ultra Web Hosting provides free daily backups on all shared hosting plans through JetBackup in cPanel. You may not need a third-party backup service at all. Check cPanel > JetBackup to see your available backups. For additional backup strategies, see our backup guide.
Still Can't Connect?
If CodeGuard continues to fail after checking the settings above, open a support ticket with the error message CodeGuard shows and the IP address it's connecting from.
Open a Support TicketQuick Recap: CodeGuard FTP Connection
- Use the server hostname - Not your domain name, especially if using Cloudflare
- Check firewall - Make sure CodeGuard's IPs aren't blocked by CSF
- Switch to SFTP - More reliable, avoids passive FTP issues
- Use cPanel credentials - The main account username and password
- Consider JetBackup - Free daily backups are already included with your hosting
Last updated March 2026 · Browse all FTP articles
