When you're using SharePoint Online, you can add a link in a document library to an item that is located outside the document library. For example, you can add a link to a file or folder located in a different document library, site, or even an external website. When you add a link in a document library, the link shows up in the list of items in that library.
This feature isn't available in classic SharePoint experience or on-premises versions of SharePoint.
To find the version of SharePoint that you're using, see Which version of SharePoint am I using?
To add a link in a document library
Go to the document library where you want to add a link.
In the top left menu, click New and then select Link.
Enter the link in the Create link to dialog box.
For example, if you want to add a link to a file that is located in another library, first navigate to that library. Right-click the file that you want to link to and click Get a link. Choose the type of link you want and then copy the link. Return to the document library where you want to add the link and enter that link in the Create link to dialog box.
For more information about how to get a link to a file in Office 365, see Share files or folders in Office 365.
After you enter the link in the Create link to dialog box, the File name box will appear. In the File name box, enter a name for the link and then click Create.
Note: When you create a link, ".url" will automatically be added to the end of the file name.
Alternately, you can select an item from the Recent list and a link will be added to the document library automatically without the need to enter the address or file name.