FileZilla is the most popular FTP client to connect to your server remotely. However, FileZilla will show you different type of errors while connecting to hosting server. This is especially true when you use CDN through services like Cloudflare. EAI_NONAME is one such a problem you will see in FileZilla and here is how you can fix that issue.
NO_NANAME Error in FileZilla
When trying to connect to your server, FileZilla will show you a message saying, “Connection attempt failed with EAI_NONAME – Neither nodename nor servname provided or not known”. It will look like below in the app and you will see the error as “Could not connect to server“.
Why This Error is Shown?
There are few simple reasons for EAI_NONAME error in FileZilla. First and common reason is using the domain name as your hostname. When you create FTP account in your hosting panel, generally you will get the hostname as ftp.yoursite.com, username and password. You can use this ftp.yoursite.com as a “Host” in FileZilla “Site Manager” and connect to your server using username and password. For a successful connection, FileZilla needs to resolve this host name to your server’s IP address. The connection fails when FileZilla can’t resolve ftp.yoursite.com name to your origin server’s IP address.
Secondly, the host name can’t be resolved when you proxy your server access through content delivery network like Cloudflare. When using Cloudflare or similar CDN service, you need to change the nameservers and route all traffic data through them for improving the delivery of content from the nearest location to user. However, this will block ftp.yoursite.com access as it can’t be proxied through CDN.
How to fix EAI_NONAME Error?
Now that you understand why the error occurs and here are the solutions how to fix the issue.
1. Change Host to IP address
Since domain name can’t be resolved, you can directly use your server IP address instead of domain name. For this first you need to find your server’s IP using one of the below options.
- Login to your hosting account and check the server details to find its IP address. If you are not able to find, get help from hosting support and get the correct IP address.
- If you are not using proxy like Cloudflare then you can easily find the IP address by ping command. On Windows, open Windows Terminal app, type ping yoursite.com in the command line and press enter. You will the ping status with your server’s IP address. In case of macOS, open Terminal app, type the same ping yoursite.com command and press enter. You will see the pinging works and show the IP address as shown below. After getting the IP address, you can close the Terminal app to terminate the pinging process.
- As you see in the above screenshot, the server’s IP address is showing as 220.127.116.11. This is the Cloudflare server and not the hosting server we use and hence this will not work in FileZilla. If you are not sure, use any of the online IP checking tools to confirm the details of the IP you get from pinging. In this case, you can go to Cloudflare DNS setting of your site and find the correct IP address.
Once you have the correct IP, click on the “Site Manager” icon showing in FileZilla which you can see on top left corner of the app as shown below.
In “Site Manager” section, you will see the “Host” as ftp.yoursite.com and replace this with your server’s IP address. Now, click “Connect” button to successfully connect to your server without EAI_NONAME error.
Note: Make sure you are connecting from the above scree. Clicking “OK” button and then trying to connect through “Server > Reconnect” will not work. Because FileZilla will try to reconnect in this case using the previous host name. Once you successfully connect using IP address, you can use reconnect option from next time onwards. Check out our beginners guide on FileZilla to learn more about how to use the app properly.
2. Check Your DNS
If the above solution is not working, then you need to check the DNS setup of your domain. When you have proxy setup like Cloudflare CDN, the best option is to disable the proxy temporarily and check whether you can use FTP account. Alternatively, you can check the DNS contains any CNAME record for ftp which points to your domain. If you find any ftp entry, disable or delete it from the DNS to allow it directly connecting to your server without proxy.
EAI_NONAME error can be fixed by changing the host name to your server IP address. This will bypass resolving host process and directly connect to your server. However, you need to check DNS settings of your domain and make sure there are not proxies setup for ftp. Sometimes, bugs in the old version of FileZilla app may prevent you from connecting to your server. So, the last option is to delete your FileZilla app, reinstall the latest version and try connecting again.
Leave a Reply
Your email is safe with us.