Learn how to make files download directly when you click their links, rather than opening in a browser window. 

Here is how to download files upon clicking on a link- 

  1. Navigate to your website’s File Manager and locate the .htaccess file. If you don’t see it, you may need to enable “Show Hidden Files” in your File Manager settings. 
  2. To make all desired file extensions downloadable when someone clicks the link, add the following line of code-

    AddType application/octet-stream .avi .mpg .mov .pdf .xls .mp4 

    For example, if you only want .pdf files to be downloadable, the line of code would look like this: 
    AddType application/octet-stream .pdf  

  3. After adding the line of code, save the changes to the .htaccess file.
  4. If you do not see the changes on your live site, clear the cache to ensure the changes take effect.

By following the above-outlined steps, you can make files download immediately upon clicking a link. If you find any difficulty, get in touch with our support staff. Also, do not forget to check our latest shared web hosting plans.  

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

WHM -litespeed and Apache

How to switch between LiteSpeed and Apache in WHM

In this tutorial, we’ll explain how to switch between Lite Speed and Apache in WHM.…

How to Fix DNS_PROBE_FINISHED_NXDOMAIN Error in Android

How to Fix DNS_PROBE_FINISHED_NXDOMAIN Error in Android

The DNS_PROBE_FINISHED_NXDOMAIN error on Android appears when your device is unable to resolve a domain…

How to Test DNS with Dig and Nslookup

This article explains how to test DNS with dig and nslookup. Testing DNS with dig…