Create a download link on your website

Author: Roger Morrison
Date Of Creation: 19 September 2021
Update Date: 1 July 2024
Anonim
How to create direct download link in your website - How to create direct download link on Blogger
Video: How to create direct download link in your website - How to create direct download link on Blogger

Content

A much expressed wish of website owners is to provide file download links on the website, and there are a number of ways to make this happen. Websites that offer website tools, such as GoDaddy, WordPress, and Weebly, often also offer the option to upload a file at the same time as creating a link. If you're building the website from scratch, you can create download links using simple HTML code for the files on your server.

To step

Method 1 of 5: Using HTML

  1. Create an HTML page if you have already created one. You are about to add the download link to an HTML web page. If you don't have a site yet, you can create a simple HTML page to test the download link. Read Creating a Simple Web Page with HTML for more info.
  2. Open a folder on your server for both the page and the file. The easiest way to link a file is to place the file in the same folder as the page's HTML file. Use the control panel or file explorer of your FTP program to navigate to the folder containing the HTML file you will be adding the link to.
    • Your FTP client should already be configured to connect to your web server because you have previously uploaded your site to it. If not, read Using FTP for instructions on how to configure your FTP client's connection to the server.
    • If your web server has an online control panel, you have direct access to your server files via the web administration interface. You can access this by logging into your site as an administrator. Once you are in the control panel, select the option "File Manager".
    • If you created the website with a website tool such as WordPress, Weebly or Wix, read the instructions per platform in the methods below.
  3. Upload the file you want to link to. You can upload just about any type of file, from PDF files to ZIP files. Keep in mind that some servers have a limit on the size of the file you can upload, and large files can quickly use up your allotted bandwidth. Browsers can block potentially malicious files when users try to download them, such as EXE or DLL files.
    • To upload files using an FTP program, drag the file to the folder in the FTP window where you want to upload it. It will start uploading immediately. Your upload speed will usually be much slower than your download speed, and it may take a while to fully upload the file.
    • If you manage the files with a virtual control panel, click the "Upload" button at the top of the window. Browse your computer for the file you want to upload. It may take some time for large files to fully upload to the server.
  4. Open the page you want to add the link to in your code editor. Once the file has been uploaded, you can add the link to your web page. Open the HTML file you want to add the link to. You can double-click it in the control panel to open it in the built-in page editor. If you are using FTP, right-click on the HTML file on your server and open it with "Open with" in your code or text editor.
  5. Find the place on the page where you want to add the link. Place the cursor where you want to insert the download link in the code. This can be in the body of a paragraph, at the bottom of a page, or elsewhere.
  6. Add the code for the link. Use the following HTML5 code for the download link. This will immediately start the download when users clicked the link. As long as the file to be downloaded is in the same folder as the HTML file, all you need to do is use the name and extension. If the file is located in a different folder, you must also specify the folder structure.

    ! - Uploaded file in the same location as the HTML file -> a href = "examplefile.pdf" download> Link text / a>! - Uploaded file in a different location than the HTML file -> a href = "/path/to/file/examplefile2.webp" download> Link text / a>

    • It a> download attribute does not work in Safari, Internet Explorer or Opera Mini. Users with those browsers must open the file in a new page and manually save it.
  7. Create a download button instead of a link. You can use an image as a download link instead of text. This requires that you already have an image for the button on your web server.

    a href = "examplefile.pdf" download> img src = "/ images / downloadbutton.webp"> / a>

  8. Rename the downloaded file. By defining it a> downloadattribute, you can rename the file when someone downloads it. This can make it easier for users to recognize files they've downloaded from your site.

    a href = "083116sal_rep.pdf" download = "August 31, 2016 Sales report"> Download the report / a>

  9. Save the changes to your HTML file. Once you are satisfied with the code, you can save the changes to your HTML file and upload it again if necessary. Now you can see the working version of your new download button on your website.

Method 2 of 5: Using WordPress

  1. Open your site in the WordPress site editor. If you use WordPress to manage and publish your website, you can use the built-in tools to add a download link to one or more of your web pages. Log into your WordPress dashboard using the admin account.
  2. Place the cursor where the link should be displayed. You can place the link in the middle of an existing paragraph or create a new line before it.
  3. Click the "Add Media" button. These can be found above the posting tools in the main menu.
  4. Click the "Upload Files" tab and drag the file into the window. You can upload various files, but WordPress can limit their size depending on your account type.
    • It may take a while for the file upload to complete as most connections slow down the upload process compared to the download.
  5. Add a description to the file. In the Add Media window you can add a description below the file. This will be the text displayed as a download link.
  6. Click the "Insert into post / page" button. This will add a download link at the location of your cursor. Note that this is a link to an attachment page, and not an actual file. This is a limitation of WordPress.

Method 3 of 5: Using Weebly

  1. Open your website in the Weebly editor. Log into the Weebly site and your webpage in the Weebly editor.
  2. Select the text or object you want to convert into a link. You can highlight text in a text field or select an image on your page to convert to the download link for your file.
  3. Click on the "Link" button. When you have selected text, it will look like a chain, and you will find it at the top of the text editor. When you've selected an image, click "Link" in the image's control panel.
  4. Select "File" and click "upload a file ". This will open the file explorer.
  5. Select the file you want to make available for upload. Once you have selected the file, the upload will begin.
    • Standard users are limited to files 5MB and smaller. Premium users have a file limit of 100 MB.
  6. Publish your website to see the new link. After uploading the file, the link is ready to use. Click the Publish button to see your changes in effect on the site. Visitors can now click on the link and download the file.

Method 4 of 5: Using Wix

  1. Open your website in the Wix editor. If you use Wix to create and manage your site, log in to the Wix website and load your webpage into the site editor.
  2. Select the text or image you want to link. You can create links from text on your page or from images.
  3. Make a link of your selection. This process is slightly different for text than for images:
    • Text - Click the Link button in the text settings window. The button looks like a chain. This will open the link menu.
    • Image - Select "A link open" from the "When image is clicked" menu in the Image Settings window. Click on "Add a link" in the "What does the link do?" Section. This will open the link menu.
  4. Select "Document" from the list of link options. With this you can open various document files.
  5. Click the "Choose File" button. This will start the file uploader.
  6. Drag the file you want to upload into the window. You can only upload doc, pdf, ppt, xls and odt files (as well as their subtypes). This means that in principle you can only upload documents. Files cannot be larger than 15MB.
  7. Publish your website. Once you have finished uploading the file, your link is ready to use. Click the "Publish" button in the top right corner to save your changes so that they can be seen on the website.

Method 5 of 5: Using GoDaddy

  1. Open your site in the GoDaddy site editor. If you are using the GoDaddy site builder, log in to the GoDaddy website and open your website in the editor.
  2. Select the object or text you want to link to. You can link any object on your site as well as any text in text fields. If you want to create a download button, click on the "Button" option in the left menu to create one.
  3. Create a link from the selected object or text. Once you have selected an object, click the Settings button to open the menu. With text selected, click the "Link" button (looks like a chain) in the text format tools.
  4. Click the red arrow under "Link (URL)" and select "Upload ". This allows you to select the file you want to upload to your website.
  5. Click on the "Browse" button and find the file you want to upload. Files are limited to a size of 30 MB. You cannot upload HTML, php, exe, dll or other potentially dangerous file types.
  6. Click "Insert" when the file has been uploaded. You will see a check mark next to the file in the window when the upload is complete.
  7. Click "Save" to create the link. Clicking "Save" will apply the file to the object or text link you created.
  8. Click "Publish" to save the site changes. This makes the link active on your site, and visitors can download the file via the link.