Document Library Link content type in search results

Senior Member

We've had users utilizing the Link option from a document library's New content menu as a way to add URLs to external resources. This creates a .url file in the library, which seems to work OK in many cases.


However, when these .url items are returned in search, the URL of the result is to the SharePoint location. Clicking on them triggers a security warning from the browser, as it downloads the .url file.


For example: user uses Link option to add "" in Document Library. When this item is returned by search, its associated hyperlink is "", when logically, the hyperlink should be simply "" for this type of content.


Is there a way to customize our search results to ensure the appropriate URL is returned by search for this type of content? 

5 Replies
Well technically all that link is, is a shortcut file. The difference is document libraries render them by redirecting etc. and search just doesn’t process the mime time the same way. It would be nice if search utilized the same viewer when clicking those so they redirect.

@pkoepp  how did you get them to appear in the search results? When I search it doesn't seem to pick up the Link contents

@pkoepp Did you ever figure this out? Having the exact same problem now :)

@yrrgeirs Hi, how were you able to setup search on the links in a Document library? I have a similar requirement where I need the documents as well as the links in a Document library to be searchable. Right now, the search results only return the documents and not the links. I am using the SP search api.

Did you figure this out? Does any search property return the exact url of the created link (rather than its location link in the library)?