{"id":12981,"date":"2024-03-19T13:09:51","date_gmt":"2024-03-19T13:09:51","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=12981"},"modified":"2026-02-26T14:02:11","modified_gmt":"2026-02-26T14:02:11","slug":"how-to-make-links-trigger-direct-file-downloads","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/","title":{"rendered":"How to Make Links Trigger Direct File Downloads"},"content":{"rendered":"<p><span data-contrast=\"auto\">Learn how to make files download directly when you click their links, rather than opening in a browser window.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;469777462&quot;:[2410],&quot;469777927&quot;:[0],&quot;469777928&quot;:[1]}\">\u00a0<\/span><\/p>\n<p><strong>Here is how to download files upon clicking on a link-\u00a0<\/strong><\/p>\n<ol>\n<li><span class=\"TextRun SCXW86088897 BCX0\" lang=\"EN-IN\" xml:lang=\"EN-IN\" data-contrast=\"auto\"> <span class=\"NormalTextRun SCXW86088897 BCX0\">Navigate to your website\u2019<\/span><span class=\"NormalTextRun SCXW86088897 BCX0\">s File Manager and <\/span><span class=\"NormalTextRun SCXW86088897 BCX0\">locate<\/span><span class=\"NormalTextRun SCXW86088897 BCX0\"> the .<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW86088897 BCX0\">htaccess<\/span><span class=\"NormalTextRun SCXW86088897 BCX0\"> file. If you <\/span><span class=\"NormalTextRun SCXW86088897 BCX0\">don&#8217;t<\/span> <span class=\"NormalTextRun SCXW86088897 BCX0\">see it, you may need to enable \u201cShow Hidden Files\u201d<\/span><span class=\"NormalTextRun SCXW86088897 BCX0\"> in your File Manager settings.<\/span><\/span><span class=\"EOP SCXW86088897 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;469777462&quot;:[2410],&quot;469777927&quot;:[0],&quot;469777928&quot;:[1]}\">\u00a0<\/span><\/li>\n<li><span class=\"NormalTextRun SCXW164760992 BCX0\">To make all desired file extensions downloadable when someone clicks the link,<\/span><span class=\"NormalTextRun SCXW164760992 BCX0\"> add the following line of code-\n<p><span class=\"TextRun SCXW24269832 BCX0\" lang=\"EN-IN\" xml:lang=\"EN-IN\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW24269832 BCX0\">AddType<\/span><span class=\"NormalTextRun SCXW24269832 BCX0\"> application\/octet-stream .<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW24269832 BCX0\">avi<\/span><span class=\"NormalTextRun SCXW24269832 BCX0\"> .mpg .mov .pdf .<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW24269832 BCX0\">xls<\/span><span class=\"NormalTextRun SCXW24269832 BCX0\"> .mp4\u00a0<\/span><\/span><span class=\"EOP SCXW24269832 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;469777462&quot;:[2410],&quot;469777927&quot;:[0],&quot;469777928&quot;:[1]}\"><\/p>\n<p><span class=\"TextRun SCXW21132233 BCX0\" lang=\"EN-IN\" xml:lang=\"EN-IN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW21132233 BCX0\">For example, if you only want .pdf files to be downloadable, the line of code would look like this:<\/span><\/span><span class=\"EOP SCXW21132233 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;469777462&quot;:[2410],&quot;469777927&quot;:[0],&quot;469777928&quot;:[1]}\">\u00a0<\/span><br \/>\n<span class=\"TextRun SCXW107320178 BCX0\" lang=\"EN-IN\" xml:lang=\"EN-IN\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW107320178 BCX0\">AddType<\/span><span class=\"NormalTextRun SCXW107320178 BCX0\"> application\/octet-stream .pdf\u00a0<\/span><\/span><span class=\"EOP SCXW107320178 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;469777462&quot;:[2410],&quot;469777927&quot;:[0],&quot;469777928&quot;:[1]}\">\u00a0<\/span><\/span><\/span><\/li>\n<li><span class=\"NormalTextRun SCXW28980260 BCX0\">After adding the line of code, save the changes to the .<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW28980260 BCX0\">htaccess<\/span><span class=\"NormalTextRun SCXW28980260 BCX0\"> file.<\/span><\/li>\n<li><span class=\"TextRun SCXW242169559 BCX0\" lang=\"EN-IN\" xml:lang=\"EN-IN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW242169559 BCX0\">If you do not see the changes on your live site, clear the cache to ensure the changes take effect.<\/span><\/span><\/li>\n<\/ol>\n<p><span class=\"TextRun SCXW106632023 BCX0\" lang=\"EN-IN\" xml:lang=\"EN-IN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW106632023 BCX0\">By following <\/span><span class=\"NormalTextRun SCXW106632023 BCX0\">the above-outlined <\/span><span class=\"NormalTextRun SCXW106632023 BCX0\">steps, you can make files download <\/span><span class=\"NormalTextRun SCXW106632023 BCX0\">immediately<\/span><span class=\"NormalTextRun SCXW106632023 BCX0\"> upon clicking a link.<\/span><span class=\"NormalTextRun SCXW106632023 BCX0\"> If you find any difficulty, <\/span><span class=\"NormalTextRun SCXW106632023 BCX0\">get in touch with<\/span><span class=\"NormalTextRun SCXW106632023 BCX0\"> our support staff. <\/span><span class=\"NormalTextRun SCXW106632023 BCX0\">Also, do not forget to check our latest <a href=\"https:\/\/www.bodhost.com\/web-hosting\/linux-shared-hosting\" target=\"_blank\" rel=\"noopener\">shared web hosting plans<\/a>. <\/span><\/span><span class=\"EOP SCXW106632023 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;469777462&quot;:[2410],&quot;469777927&quot;:[0],&quot;469777928&quot;:[1]}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to make files download directly when you click their links, rather than opening in a browser window.\u00a0 Here is how to download files upon clicking on a link-\u00a0&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[666],"tags":[1513],"class_list":["post-12981","post","type-post","status-publish","format-standard","hentry","category-general","tag-file-downloads"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Make Links Trigger Direct File Downloads<\/title>\n<meta name=\"description\" content=\"Learn how to make files download directly when you click their links, rather than opening in a browser window.\u00a0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make Links Trigger Direct File Downloads\" \/>\n<meta property=\"og:description\" content=\"Learn how to make files download directly when you click their links, rather than opening in a browser window.\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-19T13:09:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:11+00:00\" \/>\n<meta name=\"author\" content=\"Paul Lopez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Lopez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/\"},\"author\":{\"name\":\"Paul Lopez\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/566ccff9a2fae4af852be8097b179813\"},\"headline\":\"How to Make Links Trigger Direct File Downloads\",\"datePublished\":\"2024-03-19T13:09:51+00:00\",\"dateModified\":\"2026-02-26T14:02:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/\"},\"wordCount\":191,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"File Downloads\"],\"articleSection\":[\"General Discussion\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/\",\"name\":\"How to Make Links Trigger Direct File Downloads\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2024-03-19T13:09:51+00:00\",\"dateModified\":\"2026-02-26T14:02:11+00:00\",\"description\":\"Learn how to make files download directly when you click their links, rather than opening in a browser window.\u00a0\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-make-links-trigger-direct-file-downloads\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"General Discussion\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/general\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Make Links Trigger Direct File Downloads\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/566ccff9a2fae4af852be8097b179813\",\"name\":\"Paul Lopez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g\",\"caption\":\"Paul Lopez\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/paullopez\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Make Links Trigger Direct File Downloads","description":"Learn how to make files download directly when you click their links, rather than opening in a browser window.\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/","og_locale":"en_US","og_type":"article","og_title":"How to Make Links Trigger Direct File Downloads","og_description":"Learn how to make files download directly when you click their links, rather than opening in a browser window.\u00a0","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2024-03-19T13:09:51+00:00","article_modified_time":"2026-02-26T14:02:11+00:00","author":"Paul Lopez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Paul Lopez","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/"},"author":{"name":"Paul Lopez","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/566ccff9a2fae4af852be8097b179813"},"headline":"How to Make Links Trigger Direct File Downloads","datePublished":"2024-03-19T13:09:51+00:00","dateModified":"2026-02-26T14:02:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/"},"wordCount":191,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["File Downloads"],"articleSection":["General Discussion"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/","name":"How to Make Links Trigger Direct File Downloads","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2024-03-19T13:09:51+00:00","dateModified":"2026-02-26T14:02:11+00:00","description":"Learn how to make files download directly when you click their links, rather than opening in a browser window.\u00a0","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-make-links-trigger-direct-file-downloads\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"General Discussion","item":"https:\/\/www.bodhost.com\/kb\/category\/general\/"},{"@type":"ListItem","position":2,"name":"How to Make Links Trigger Direct File Downloads"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/566ccff9a2fae4af852be8097b179813","name":"Paul Lopez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g","caption":"Paul Lopez"},"url":"https:\/\/www.bodhost.com\/kb\/author\/paullopez\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/12981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=12981"}],"version-history":[{"count":2,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/12981\/revisions"}],"predecessor-version":[{"id":12983,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/12981\/revisions\/12983"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=12981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=12981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=12981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}