Static document links for PDFs in SharePoint Online

Thilina Tantirigama 86 Reputation points
2024-07-23T02:11:35.34+00:00

Hi,

We have a number of PDFs saved in a SPO library that we use for the company's intranet sites.

Currently, when we save PDF files, the document links contain the "folder path" (incl. sub-folders) the documents are located in.

This poses a challenge when we move files between folders or rename folders, what happens is the document links also change, and consequently the links on the intranet also break.

Is there a way to keep document links unique & static for PDFs in SharePoint?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,265 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 15,320 Reputation points Microsoft Vendor
    2024-07-23T09:10:11.0933333+00:00

    Hi @Thilina Tantirigama,

    Thank you for posting in this community.Are you using the path to the file instead of the link to the file?

    The path of the file changes because of the file's storage address or the renaming of the file, while the link to the file does not.

    File Path:

    User's image

    File Link:

    User's image

    The link to the file is the unique encoding of the file on this site. As long as the file exists, the encoding will not change, even if the file is renamed or moved around the site.

    User's image For more information on copying links, you can refer to section Share by using "Copy link" in this article: Share SharePoint files or folders.

    Hope this information is helpful to you.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.