#  Linking to a file 

 



 ##  

  expand\_more  

 
  

 

## How to link to a file

To link directly to a file you need to create a [Resource](/resource "Resource") for the file. By using the Resource content type for downloadable files, you will have a stable link for the file and be able to include the file in resource lists and search results, as well as assign taxonomy terms to the file.

If you need to upload a newer version of your file, updating the file within the resource will not cause your link to the file to break.

### Step 1: Create a Resource for the file

1. Use the platform menu to navigate to **Content &gt; Add Content &gt; Resource**.
2. Add a name for the file in the **Resource Name** field. This name will serve as a link to the file on resource lists and search results, and as a name to select when creating a link in Step 2.
3. From the **Resource Type** options, choose **Download File**.
4. Choose **Add Media** from the **File Attachment** section and select a document from the media library or upload a new document (see [File Attachments](/resource/file-attachments "File Attachments") for more details about how to provide and link to file attachments).
5. Add an optional **Excerpt,** **Thumbnail,** and **Taxonomy** terms for resource lists and search results.
6. Save the Resource. (See more detailed instructions for working with the [Resource content type](/resource "Resource")).

### Step 2: Link to a Resource

Once you have created a Resource for the file, you can link to the Resource “node” using the text editor toolbar found on different content types and components.

You can also link to the Resource from components, including Call to Action Links, Button-Style Cards, and Vertical Cards.

1. Linking to a file from the text editor:
    1. Select the text to link to the resource. When linking to a downloadable file, include the file type in the link text, e.g., “Course Syllabus (PDF)”.
    2. Select the **Link** button in the editor toolbar (see [Text Editor](/resource/text-editor "Text Editor") for details about using the toolbar and text input area).
    3. Enter the first few letters of the name of the Resource in the **Link UR**L input and then select the corresponding content from the autocomplete **Content** menu (see [Internal Links](/resource/internal-links "Internal Links") for guidance on how to link to content within a site).
2. Linking to a file from a component:
    1. Enter a short descriptive name of the linked file in the **Link text** input. When linking to a downloadable file, include the file type in the link text, e.g., “Course Syllabus (PDF)”.
    2. Enter the first few letters of the name of the Resource in the **URL** input and then select the corresponding content from the autocomplete **URL** menu.
3. Select **Save** to save the content.
4. Verify that the file downloads as expected when the link is selected.

## How to update a file linked to a resource

Follow these instructions if you need to update an existing file linked to a resource with a newer version. There are two steps involved:

- Updating the file within the resource.
- Deleting the file from the Media Library.

### Step 1: Update your resource file with a new version

1. Go to the resource that is linked to the file and edit it.
2. Scroll down to the **File Attachment** section and remove the file by clicking on the file remove button (the "x" icon).
3. Click on **Add Media** from the **File Attachment** section and select your new or updated document file from the media library (or upload the new document.)
4. **Save** the Resource.

### Step 2: Delete the previous file and its media entity

This step completely removes the previous version of your file from your site.

1. Go to the Media Library under Content.
2. Search for the previous version of the file you just updated on the step above.
3. Edit the media entity and file for the old PDF.
4. Scroll to the bottom of the page and click on the Delete link. The platform will prompt you to delete the media entity and the associated file with it.

   ![a modal prompting the user to delete the media entity and associated file](/sites/g/files/omnuum1651/files/styles/hwp_1_1__720x720_scale/public/2025-11/image.png?itok=TM0PEVPV) 

 

### Notes

- You do not need to swap out the file within the media entity. Do that only on the resource associated with the file. That way, you keep that persistent URL on the resource, as well as any taxonomy and metadata associated with it.
- Some old files may persist (cached) on our server infrastructure for some time, so it may take up to a few days for the old file to completely disappear.



 

##  How to link to a file (Video) 

 





 

 

 



 

 

 

---

 

##  Related how-tos 

 



  [### Linking to on-page anchor links

 ](/linking-page-anchor-links)How to create an anchor link to a component or other page content, and how to link to an anchor link.



 

 

   ![Assorted colorful beetles in compartments of a fossil display case](/sites/g/files/omnuum1651/files/styles/hwp_16_9__480x270/public/2024-07/thumb_link_to_content.jpg?itok=laa2SITI) 

 



 

 

   [### Understanding and Managing Redirects

 ](/managing-redirects)How to redirect content to a new URL.



 

 

   ![Person holding a Harvard tote bag walking down a sidewalk scattered with pink and red flower petals.](/sites/g/files/omnuum1651/files/styles/hwp_16_9__480x270/public/2025-02/thumb_redirects.jpg?itok=5i0K80Pi) 

 



 

 

  

 

 

 

 

##  Related resources 

 



  [### Checking for (and managing) broken links on your HarvardSites site

 ](/resource/checking-and-managing-broken-links-your-harvardsites-site)Identify, fix, and prevent broken links on your site.



 

 

   ![AI-generated image showing nodes connected by lines](/sites/g/files/omnuum1651/files/styles/hwp_16_9__480x270/public/2025-10/pexels-googledeepmind-17485658.jpg?itok=uU0i8Pjm) 

 



 

 

   [### Content URLs

 ](/resource/content-urls)How content URLs are generated and managed on the platform.



 

 

   ![A modern building with a grid-like facade of metallic panels and glass windows. ](/sites/g/files/omnuum1651/files/styles/hwp_16_9__480x270/public/2025-02/thumb_content_URLs.jpg?itok=cHWhzIer) 

 



 

 

   [### File Attachments

 ](/resource/file-attachments)How to upload and link to file attachments.



 

 

   ![Collection of photos attached by clothespins to a length of line.](/sites/g/files/omnuum1651/files/styles/hwp_16_9__480x270/public/2024-11/thumb_file_attachments.jpg?itok=zD6pS-s6) 

 



 

 

   [### Internal Links

 ](/resource/internal-links)How to link different types of content and content types within your site



 

 

   ![Closeup of a structure of tubes connected to wooden blocks, overlaying a window and buildings beyond.](/sites/g/files/omnuum1651/files/styles/hwp_16_9__480x270/public/2024-11/thumb_internal_links.jpg?itok=-aQTLRjI) 

 



 

 

  

 

 

 

 

 



 

 See also:- [ How-tos ](/content-structure/how-tos)
- [ Files ](/general-site-management/files)
- [ Links ](/general-site-management/links)