How to redirect users from the SharePoint site homepage to the site document library
I had an interesting request from a client the other day. They were using SharePoint primarily for document management. So, I created an Intranet Hub for them with different sites all linked up to that Hub. Since the sites themselves were not used for anything other than storing documents, they wanted me to connect the site links from the Hub Navigation directly to the document libraries on those sites. That part was easy.
However, the issue was when users clicked on the Home link from the navigation or the site logo. By design, those links pointed to the site’s homepage instead of the library. Switching the URL for the Home navigation link partially solved the issue. However, when users clicked on the site logo in the upper-left-hand corner, that would load the homepage by default. And there is no way to change that via the settings. Luckily, there is an elegant solution to this issue, by creating a page redirect via the News Link capability. Let me show you how this works.
First of all, I want to clarify that I did not come up with this solution myself. After a brief Google search, I found the two posts below that gave me an idea of the solution. I am just adapting the technique documented in those articles to the specific need listed above (redirecting the site homepage to the document library on that site). So, I encourage you to check out both of those articles for additional information:
Step 1: Create a Newslink article
- First, navigate to the Document Library
- Copy its URL address. Make sure to copy the URL up to /Forms only, not the whole URL.
- Next, navigate to the Homepage of the site and click New > News Link
- Paste the URL. Then give the News Link Page a Title – it does not really matter what you type in there. Click Post.
Make the Redirect Page the new Homepage
- Next, we need to make that Link page we just created the Homepage that loads by default. I explained this in this other article, but here are the instructions anyway. Click on Gear Icon > Site Contents.
- Click on the Site Pages Library.
- Click three dots next to the Redirect Page and click Make Homepage
- You will now get the confirmation.
- So essentially, what we did with the above steps was make the Document Library link the “page” that loads by default when users navigate to the site URL. That means that when they click on the Home from the navigation or the site logo, they will be redirected to the Document Library Link!
Nuances about the Page Redirect Solution
- One of the annoying things is that News posts you create as redirects might appear elsewhere (i.e., SharePoint Start Page) since, at the end of the day, SharePoint thinks these are just News Posts. To stop this – you must use PowerShell. Joao Ferreira has a nice solution for this in his article.
- Since this is not a standard solution and is more of a workaround, this redirect might confuse users who do not know this trick or are unfamiliar with the workaround in case they try to locate the site homapge. So, a bit of training/documentation might be necessary.
- You can only redirect to one specific document library on a site. If you have multiple libraries on a site, users would need to use a document library switcher to navigate to the other libraries. I explained how to do this here.