In classic SharePoint sites, it was possible to redirect users to a different site using a few different approaches. However modern SharePoint sites are more restrictive (for good) and offer different features that require different approaches.
Fortunately, if you need to redirect users when they try to access the homepage of a specific site, this can be easily achieved using a simple no-code solution.
I asked the question on Twitter to try to understand what other people were doing and Mahmoud Hassan came up with this great suggestion. Kudos to him!
News link for site redirect
The solution for modern SharePoint site redirect consists of creating a News link to the target site and setting the News link as the homepage of the site. When users try to access the site (homepage), they get immediately redirected.
On a modern site, you can easily create a News link from the New menu on the site
Or from the Add menu on the News web part
Provide the URL to the target site that you want to redirect users to, and the page data will be pre-loaded on the panel. Click Post to create the news link.
Next, simply access the Site Pages library, open the context menu for the newly created page, and make it the site homepage. It’s that simple!
Works for Classic sites too
But what if the site is a classic site? Well, you can still use the same approach as it’s so simple.
But how do you create a News link on a classic site?
If modern pages are not enabled on the site, activate the Site Pages feature
Next, simply go to the Site Pages library and create a new modern page on the site.
Add the News web part to the newly created page and click on the Add menu within the web part to create a News link
From this point, the steps are the same as modern sites.
Provide the URL to the target site that you want to redirect users to, and the page data will be pre-loaded on the panel. Click Post to create the news link.
Next, simply access the Site Pages library, open the context menu for the newly created page, and make it the site homepage.
And voilà, redirect on classic sites using a modern page feature.
What URL do you use for the news link?
When I use the main site link, it fails to redirect with errors.
Sorry for the super late response to this, but for anyone finding the same issue, the URL I used is something like https://contoso.sharepoint.com/sites/EmployeeOnboarding
Thank you so much. I spent the last hour trying to do a simple redirect using a webpart page but only to find out you cannot enable the script webpart using the Set-SPOSite -DenyAddAndCustomizePages as it does not work on modern sites – even though Microsoft docs still shows it does. Love this simplicity of your approach!
Hello
It works great, both for the home page and another page.
thank you so much
Best tip of the year.
Thank you 🙂
Yes- best hack off the year!!!
Can you please update this post to include the screen shots, they are not rendering in any browser. Can you include more step by step. I have tried this and cannot get it to work, the steps above are not step by step and detailed enough.
Hi Linda, many thanks for letting me know that images were not loading and really sorry for the super late reply. I was very busy and didn’t have the time to keep the blog updated.
Not sure why I lost images on this and some other posts, but I have just uploaded new images and some improved instructions to fix this post. Thanks again!
Great solution!!! Thank you for posting this article.
Thank you 🙂