How to Create a Redirect in SharePoint Online?

Requirement: Create redirect in SharePoint Online.

How to Redirect SharePoint Online page to different URL?
In classic SharePoint sites, we've script editor web part and redirect can be achieved with JavaScript as in my another article How to Redirect using JavaScript in SharePoint?. Now, We have a modern site collection at "https://crescent.sharepoint.com/sites/sales" and we wanted to redirect that site to another site called sales hub created at "https://crescent.sharepoint.com/sites/saleshub". So here is how to redirect home page to another site collection: Create a News link page in SharePoint Online site and then set that page as "Home Page", so that when users visit a particular site, they'll be taken to the link provided in the news link. Here are the steps to create a site redirect in SharePoint Online. You can use this method to redirect both subsite and site collections.

Step 1: Create a "News link" in SharePoint Online
  • Login to your SharePoint Online site, Click on "New" button in the toolbar and choose "News link"
    sharepoint online redirect home page
  • Provide the link to redirect (in my case its the URL of the hubsite "https://crescent.sharepoint.com/sites/saleshub", give a title to it and click on "Post" to  create a news link.
    sharepoint online redirect to another site

Step 2: Set the Redirect page as Home page
Once you created the redirect page, the next step is to set the redirect page as home page, so that it takes the user to new site when they visit site's home page.
  • Visit the "Site Pages" library by going to site contents >> Site Pages
  • Right click on the redirect page you created and then choose "Set as Home page".
    redirect sharepoint online page to different url
From now on, when a user visits the home page, they'll be redirected immediately to the new site link configured on the redirect page. Visit the "Site Pages" library and edit the "Redirect" page you configured, if you want to change the redirect. E.g. In my case, It is: https://crescent.sharepoint.com/sites/Sales/SitePages/

Please note, this method only redirects users to new site when they visit home page and not any particular list or library! This method works for classic sites as well (meaning, you can create a news link in classic SharePoint sites and follow above steps).

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.