blog posts

Teaching how to make a download link in Direct Admin

Sometimes it happens that, contrary to the habit, you need to upload a file to the host, but you don’t want the upload of this file to be in the path of the host where you have uploaded it through a content management system such as WordPress or Joomla. In other words, you need to put a direct download link of a file in the site text or send it to someone to download the file. But for any reason, you don’t want this file to be placed in the upload directory of your site builder system. In this tutorial, from Hostfa’s knowledge base, I how to create a download link in Host Direct Admin. Using this tutorial, you can create a download link for the files you upload in Host Direct Admin. For this, you need to be familiar with how to enter Direct Admin and upload files in Direct Admin.

Teaching how to create a download link in Host Direct Admin

You must upload the file inside the public_html folder or its subfolders to get a direct download link. For example, we put the file.zip file into the folder subfolder according to the image below.

How to create a download link in Host Direct Admin  Create a download link

To be able to upload and download files from the host, we need to change its access level. Therefore, the guide on changing the access level of files in the host will change the permission of the desired file to a state where it is possible to download it. To do this, put a tick in front of the file name under the Select column, set its value to 644 buttons, and click on the Set Permission button to set the file access permission. Of course, by default, file upload is set to 644, but if you see that this value has changed, you must change it to 644.

How to create a download link in Host Direct Admin  Create a download link

Then if under the Perm column. Look at it. Its value should be 644.

How to create a download link in Host Direct Admin  Create a download link

As the address attribute in the address bar of the browser as

192.168.1.100:2222/CMD_FILE_MANAGER/domains/test.com/public_html/myfolder

For the download link, it is enough to write the folder subfolder and the file.zip file after the site’s main address, i.e., test.com, and separate all three parts with the / character.

test.com/myfolder/file.zip

If you have noticed, the name of the public_html folder is not in the direct download link because it is the main branch of the site, and there is no need to use it. The important thing that you should keep in mind is that the said file is accessible to everyone, and if it is an important file such as a backup of the host or the site’s database, its direct link should not be available because someone may download it and access important site information such as usernames and passwords. And… get access