As part of changing a SharePoint site address, moving a site to a different geo location, or swapping a site, we automatically create redirects to ensure that links pointing to the prior URL continue to work. These redirects are sites that use a special site template at the prior site URL.
- 301 Redirects GUI is located in WP Admin Dashboard – Settings – 301 Redirects. Choose from Pages, Posts, Custom Post types, Archives, and Term Archives from dropdown menu; Or, set a custom destination URL! Retain query strings across redirects; Super-fast redirection; Import/Export feature for bulk redirects management.
- A redirect (abbreviation for redirection) is a server- or client-side automatic forwarding from one URL to another URL. Redirects are used for various purposes such as the relocation of a website to a new domain or server maintenance.
For example, if you changed a site address from https://contoso.sharepoint.com/sites/OldSiteName to https://contoso.sharepoint.com/sites/NewSiteName or moved a site from https://contoso.sharepoint.com/sites/SiteName to https://contosoEUR.sharepoint.com/sites/SiteName, we'll place a redirect (Template type REDIRECTSITE#0) at the old URL, which contains special headers and logic to redirect your browser requests to the new site. Google search console google analytics.
In some cases, you might want to free up the old URL to use it for a new site. To do this, you need to delete the redirect.
Note
As part of changing a SharePoint site address, moving a site to a different geo location, or swapping a site, we automatically create redirects to ensure that links pointing to the prior URL continue to work. These redirects are sites that use a special site template at the prior site URL. Repeating redirects detected I am trying to setup office 365 using Chrome. When I click settings mail I get an infinite redirect loop and the following error::-( Something went wrong Repeating.
After you delete a redirect, any request to that URL won't get redirected. This means that any bookmarks, links, or Shared With Me references will not be routed to the new URL.
To remove a redirect
Download the latest SharePoint Online Management Shell.
Note
If you installed a previous version of the SharePoint Online Management Shell, go to Add or remove programs and uninstall 'SharePoint Online Management Shell.'
On the Download Center page, select your language and then click the Download button. You'll be asked to choose between downloading a x64 and x86 .msi file. Download the x64 file if you're running the 64-bit version of Windows or the x86 file if you're running the 32-bit version. If you don't know, see Which version of Windows operating system am I running?. After the file downloads, run it and follow the steps in the Setup Wizard.Connect to SharePoint as a global admin or SharePoint admin in Microsoft 365. To learn how, see Getting started with SharePoint Online Management Shell.
Run the following command:
When prompted, confirm that you want to delete the redirect.
To confirm that the redirect has been deleted, browse to the URL. It should return a 404 error. You can also run Get-SPOSite -Identity https://contoso.sharepoint.com/sites/OldSiteName
. It will return that we cannot get the site.
Note
You might need to clear the history in your browser before browsing to the URL.
To get a list of all redirect sites
Run the following command.
The redirect management page is where you’ll do most of the work in Redirection. It consists of a table with all your redirects and a section to add new ones. To access this page select the Redirects option in the top menu bar.
Adding A Redirect
Use the ‘add new redirection’ form to create a new redirect.
In its most basic form you need to enter a source URL (the URL you are redirecting from) and a target URL (the URL you are redirecting to).
The source URL is generally relative to your site. This means, for example, if the URL you want to redirect from is https://myexample.com/old-url
, and Redirection is installed on https://myexample.com
then the source is /old-url
– it is relative to your domain.
The target can be any URL, relative or otherwise.
Some things to note:
- The source URL should be URL encoded. For example, if you want to include a space in your URL you need to encode it as
%20
- The source URL cannot contain a hash
#
. This is not sent to the server and it is not possible to match against it
Editing a Redirect
Once you’ve created a redirect it will be added to your list. When you hover over the newly created redirect you will see links appear beneath it:
Press the edit link to edit the redirect in exactly the same way you added it.
Enabling, Disabling, and Deleting
Deleting a redirect removes it from Redirection and it will no longer be active.
A disabled redirect means the redirect still exists in Redirection, but it’s not active. Use this to temporarily disable the redirect without deleting it.
Enabling a redirect re-activates a disabled redirect.
Advanced Redirects
Advanced options are available by clicking the cog icon at the bottom of the redirect edit form.
Clicking this expands the form to show the full range of options:
Think of this as a flow:
- Start with the source URL and query parameters. This defines what URL to match
- Add extra match details, to add additional requirements to the source URL (for example, when the user is logged in)
- Add a when matched action, that determines what happens when the URL is matched
- Add details to the action, such as target URL and HTTP code
Full details of this can be found here:
- Title – enter a text description about the redirect. This will be used instead of the URL in the redirect table, and is designed to help you understand the purpose of the redirect
- URL options – explained further on the URL matching page
- Query Parameters – explained further on the URL matching page
- Match – explained further on the Redirect Matches page
- When matched – explained further on the Redirect Action page
- Exclude from logs – do not log this redirect
- Group – explained further on the Groups page
- Position – controls the order in which redirects are processed. A lower number has a higher priority
Searching & Filtering
If you have a lot of redirects you may find it useful to use the filter and search facility to find a particular redirect.
Filters allow you to reduce the visible redirects based on the conditions you set.
Multiple filters can be enabled.
Searches are like filters, but you can enter the text you want to search for. You can also change the search dropdown to determine what is searched.
Redirects Definition
Note that if you have a filter enabled and then use the bulk actions it is possible to affect only those items in the filter. This is a useful way to perform an action against a subset of your data.
Customising the display
Redirects In Shopify
You can change what information is displayed by using the display dropdown. Pick from the pre-defined list, or use a custom display.
Redirects On Iphone
See also
301 Redirects
« What is a Redirect? | Matching a URL »