How to create a redirect page using a SharePoint news link

A redirect web page is a technique used to automatically send a website user from one URL to another URL. In SharePoint this process can be achieved at site collection level with a site swap as explained in here, or temporarily using a SharePoint news link.

A SharePoint News link is a hyperlink that points to a news article or post on a SharePoint site or available globally in the web, however it can be also used as a redirect page.

Create a redirect page using a SharePoint news link

The problem using this approach is that the redirect page will show in the SharePoint news web part and everywhere else where SharePoint news are displayed! To prevent this side effect, you should to the following:

  1. From the home page of the site where you want to implement the URL click in New
  2. From the menu click in News link
    Create a redirect page using a SharePoint news link
  3. Type the URL of the page to where the user should be redirected
    Create a redirect page using a SharePoint news link
  4. Click Post
  5. Click in the cog icon in the suite bar and then Site Contents
  6. Open the Site Pages library
  7. Locate the page you have just created, click in the … next to the name and then click in Make homepage
    Create a redirect page using a SharePoint news link

This will make the home page of the site collection redirect to the new location, if you don’t want it to show in the news you will need to execute the following script using PnP PowerShell.

In order to accomplish the steps described in this article you must install the latest version of the PnP PowerShell module, more information about how to do it can be found here.

  1. Open the PowerShell command line
  2. Execute the following cmdlet to connect to the SharePoint site collection where the redirect page was created
    Connect-PnPOnline -url https://contoso.sharepoint.com
  3. Execute the script below and update the $listItemID value and use your own
    $listItemID = 42
    Set-PnPListItem -List "SitePages" -Identity $listItemID -Values @{ 
    	"PromotedState"=0;
    } 
    

Create a redirect page using a SharePoint news link

By executing this script your news link redirect page will be removed from the SharePoint news without losing its main purpose.


5 Responses to “How to create a redirect page using a SharePoint news link”

  1. Jeff

    February 20, 2023

    I didnt understand why my sharepoint site was redirecting ! To stop it, instead of using a script as you shared, which can be complicate for non tech savy, i navigated to the site content

    https://xxxxx.sharepoint.com/sites/xxx/_layouts/15/viewlsts.aspx

    Thank you for the tip to create redirection

    Reply
    • João Ferreira

      February 25, 2023

      Thanks for sharing your feedback Jeff

      Reply
    • Jeremy Kalef

      November 6, 2023

      I’m trying to stop the redirect also but this navigation method is not working. it says “404 file not found” and the script method is not for me. help please.

      Reply
      • Jeremy Kalef

        November 6, 2023

        Update: I got there (there was a typo on my end), but how do I remove the news link and get back to where I started?

        Reply
        • João Ferreira

          November 15, 2023

          Hi Jeremy,

          Go to the SitePages library and remove the news link or set another page as the home for the site.

          Reply

Leave a Reply to Jeff


I've been working with Microsoft Technologies over the last ten years, mainly focused on creating collaboration and productivity solutions that drive the adoption of Microsoft Modern Workplace.

%d bloggers like this: