Description
Page Redirection web part for SharePoint Online
What is Page Redirection for SharePoint?
Page Redirection is a SharePoint Framework (SPFx) web part that redirects a modern SharePoint Online page to another URL. Add it to a page, enter the destination and a delay of 0 to 60 seconds, and publish. Visitors see a message with a countdown before they are redirected. The page never redirects in edit mode, and site owners can open it without being redirected. It needs no custom script and sends no data to outside services.
Key facts
- Product type
- SharePoint Framework (SPFx) web part
- Works with
- SharePoint Online modern site pages and single-part app pages
- Redirect delay
- 0 to 60 seconds (0 redirects immediately)
- Display styles
- Card, compact banner or full-page overlay
- Redirect method
- Client-side, in the browser (not an HTTP 301)
- Custom script
- Not required
- API permissions
- None
- Data collected
- None
Page Redirection features
Redirection
- Redirect to any URL: a full
https://address or a site-relative path such as/sites/new. - Set a delay from 0 to 60 seconds, or 0 to redirect immediately.
- Turn redirection on or off without removing the web part.
- Prevent redirect loops: a destination that points back to the same page is rejected.
- Block unsafe links: only
httpandhttpsaddresses are accepted.
Visitor experience
- Write your own heading and message, with
{seconds}for a live countdown and{url}for a link to the destination. - Show an animated countdown ring, or hide it.
- Let visitors skip the wait with a Go now button.
- Optionally let visitors stay with a Stay on this page button.
- Choose a card, a compact banner or a full-page overlay.
Editors and site owners
- Edit safely: the page never redirects in edit mode, and a running countdown stops as soon as you select Edit.
- Keep site owners on the page: users with the Manage Web permission see a preview instead (can be switched off).
- See the status at a glance: Active, Off, Not redirecting you, or Needs attention.
- Preview exactly what visitors see, updated as you change settings.
- Reach the page from anywhere by adding
?noredirect=1to its address.
Branding
- Use the site theme, or a custom accent colour from 12 presets or any hex value.
- Pick a Standard, Tinted or Bold card style; text colour adjusts automatically for readability.
- Add your logo above the heading, with alternative text.
- Looks right in coloured and dark page sections.
Accessibility and privacy
- Screen readers announce the redirect once, not every second.
- The full-page overlay keeps keyboard focus inside, starts on Go now and closes with Esc when allowed.
- Animations respect the reduce-motion setting.
- Runs entirely in the browser: no external services, no tracking, no API permissions.
- Works without custom script.
When should you redirect a SharePoint page?
- Site migrations: send visitors from old intranet pages to their new home in a hub or communication site.
- Retired or renamed pages: keep bookmarks, navigation links and old email links working.
- Content that moved out of SharePoint: point people to Teams, Viva Engage, a learning platform or an external website.
- Temporary notices: forward visitors to an alternative page during maintenance or a reorganisation.
- Friendly short links: create a simple, memorable page that forwards to a long URL.
How to redirect a SharePoint Online page
1. Install the web part
You need to be a SharePoint administrator, or have access to the tenant App Catalog.
- Get the
page-redirection.sppkgpackage. - Upload it to your tenant App Catalog in the SharePoint admin center and select Deploy.
- On each site that needs it, go to Site contents > New > App and add Page Redirection.
2. Redirect a page
- Open the page you want to redirect and select Edit.
- Add the Page Redirection web part. It's in the Advanced group, or search for "redirect".
- Select Edit settings, then enter the Destination, the Delay and your message.
- Optionally, open the Branding page of the settings to set colours, card style and logo.
- Republish the page.
Testing tip: site owners are not redirected by default. To see the visitor experience, open the page as a member or visitor, or turn off Don't redirect site owners while you test.
Page Redirection settings
Page 1: Redirection, appearance and site owners
| Setting | Description |
|---|---|
| Enable redirection | Turns the redirect on or off. |
| Destination | A full https://… address or a site-relative /sites/… path. Unsafe URLs (such as javascript:) and the page's own URL are rejected. |
| Delay before redirecting | 0–60 seconds. 0 redirects immediately. Default: 5. |
| Heading | Title of the message. Default: "This page has moved". |
| Message | Use {seconds} for the live countdown and {url} for a link to the destination. |
| Display style | Card, Compact banner or Full-page overlay. |
| Show countdown timer | Animated countdown ring; when off, an arrow icon is shown instead. |
| Let visitors stay on this page | Adds a Stay on this page button (and Esc in overlay mode) that cancels the redirect. |
| Don't redirect site owners | On by default. Users with the Manage Web permission see a preview instead. |
Page 2: Branding
| Setting | Description |
|---|---|
| Color source | Site theme (default; follows the page and section theme) or Custom color. |
| Accent color | Custom only: 12 preset swatches or any hex value. Lighter and darker shades, and readable text colour, are worked out automatically. |
| Card style | Standard (white card, accent edge), Tinted (light accent background) or Bold (solid accent background, inverted buttons). |
| Logo image URL | Optional logo above the heading, shown at up to 180×40 px. |
| Logo alternative text | Describes the logo for screen reader users; leave empty if it's decorative. |
What do visitors and editors see?
Visitors
The heading, the message, the destination, a countdown ring, a Go now button and an optional Stay on this page button. If they cancel, a small note with a link to the new location stays on the page.
Editors and site owners
In edit mode, and for site owners: a status panel with a status label, a summary of the settings and a live preview of what visitors see.
Not configured yet
Editors see a setup prompt with an Edit settings button. Visitors see nothing.
When does the redirect not happen?
- The page is in edit mode. Switching to edit mode also stops a countdown that is already running.
- The current user is a site owner and Don't redirect site owners is on.
- The page address contains
?noredirect=1. This lets editors who aren't site owners reach the page. - The destination is the same page, which would cause a redirect loop.
- Redirection is turned off.
In each case the web part shows the status panel instead.
Requirements and technical details
| Works with | SharePoint Online in Microsoft 365: modern site pages and single-part app pages |
|---|---|
| Not supported | SharePoint Server (on-premises); Microsoft Teams tabs |
| Built with | SharePoint Framework 1.20, React 17, Fluent UI 8 |
| Custom script | Not required |
| API permissions | None |
| Data collected | None. Settings are stored in the web part properties on the page. |
| Redirect method | In the browser (client-side) once the web part loads; not an HTTP 301 redirect |
| Version | 1.0.0.0 |
Frequently asked questions
What is the Page Redirection web part?
Page Redirection is a SharePoint Framework (SPFx) web part that redirects a modern SharePoint Online page to another URL. Add it to a page, enter the destination and a delay of 0 to 60 seconds, and publish. Visitors see a message with a countdown before they are redirected. The page never redirects in edit mode, and site owners can open it without being redirected. It needs no custom script and sends no data to outside services.
How do I edit a page that redirects automatically?
Open it as a site owner: by default owners aren't redirected, so you can select Edit. If you aren't a site owner, add ?noredirect=1 to the end of the page address first.
Is this a 301 redirect?
No. It redirects in the browser after the page loads, so search engines don't treat it as a permanent 301 redirect. That suits intranet pages, which public search engines don't index. For a public website that needs a 301, set the redirect up on the web server.
Can I redirect a whole site?
It redirects individual pages. Add it to the old site's home page, and to any other pages people link to. If you only changed a site's address, SharePoint creates a redirect for the old address automatically.
Does it collect any data?
No. It runs entirely in the browser, calls no external services and requests no API permissions.
There are no reviews yet.