How to Upload Your Website Files Securely Using SFTP
Published on July 24, 2026
SFTP (SSH File Transfer Protocol) allows you to securely upload your website files from your computer to your web hosting. To do this, you first create an FTP account in DirectAdmin. You then use the account details to connect through FileZilla.
Creating an FTP account
- Log in to DirectAdmin.
- Use the domain selector at the top of the page to make sure the correct domain is selected.
- Under Account Manager, open the FTP Management page.
- Click Create FTP Account.
- Enter a username under FTP Username. For example, enter
websiteto create the FTP account[email protected]. - Enter a strong and unique password or let DirectAdmin generate one.
- Select Domain. This restricts the FTP account to the files belonging to the selected domain.
- Click Create and wait for DirectAdmin to confirm that the FTP account has been created.
- Save the username and password. You will need these details to connect through FileZilla.
Connecting through SFTP
- Download and install FileZilla Client if it is not already installed on your computer.
- Open FileZilla.
- Enter the following details in the Quickconnect bar at the top:
- Under Host, enter
sftp://web.consulhosting.com. - Under Username, enter the complete username of the FTP account you created, such as
[email protected]. - Under Password, enter the password of the FTP account.
- Under Port, enter
22.
- Click Quickconnect.
- Are you connecting to the server for the first time? FileZilla will display a warning about an unknown host key. Make sure the server address is correct and accept the warning to continue.
Once connected, FileZilla displays the files on your computer on the left. The files and folders belonging to your domain are shown on the right.
Note Include sftp:// before the server address. This ensures that FileZilla uses SFTP instead of a regular FTP connection.Uploading your website
Note SFTP only transfers files. If your website uses a database, you must export and import it separately.
- On the left side of FileZilla, open the folder on your computer containing the website files.
- On the right side, open the public_html folder.
- Delete the default
index.htmlfile andcgi-binfolder. - Select all the files and folders belonging to your website on the left.
- Drag the selected files to the
public_htmlfolder on the right. Alternatively, right-click the selection and choose Upload. - When prompted, choose whether existing files may be overwritten.
- Wait until the transfer queue has been processed completely.
- At the bottom of FileZilla, check whether any files are listed under Failed transfers. If necessary, try uploading these files again.
Note Upload the contents of the folder containing your website files directly topublic_html. Do not place the entire parent folder insidepublic_html. Your website’s main file, usuallyindex.htmlorindex.php, must be located directly in this folder.
Checking your website
After uploading the files, open your domain in a browser. Do you still see an old version of the website or the default page? Open the website in a private browsing window or clear your browser cache.
If you experience problems, also check the following:
- Make sure the website files are located in the
public_htmlfolder. - Make sure
index.htmlorindex.phpis located directly inpublic_html. - Make sure all files were transferred successfully and FileZilla does not show any failed transfers.
- Make sure your domain points to the IP address of your hosting package through its DNS settings.
- Does your website use a database? Make sure it has been imported separately and that the database details in your website’s configuration file are correct.