Forum Discussion
Redirecting tenant root to SharePoint home
I want to redirect tenant root (https://xyz.sharepoint.com/default.aspx) to SharePoint home (https://xyz.sharepoint.com/_layouts/15/sharepoint.aspx).
What would be the best way to achieve this?
I assume a server side redirect would be the best, as default.aspx is editable with SharePoint Designer.
Thank you!
FYI KerryLambert
- Two options:
(1) If you want to make the redirection from the default page and this is a classic page, you can add a content editor WebPart there with the JS Code that makes the redirection
(2) If the home page is a modern page, then you will need to create a SPFx extension where you can add the redirection- Adrian UrgyanCopper Contributor
It is still a classic page. Is there a better way than a JS code? It's client side redirection, a server side could be more smooth (if it's available at all!).
- In SPO you cannot do anything on the server side...it has to be a client side redirection
Hi Adrian Urgyan ,
there is a no code solution, with out-of-the-box features.
You can activate SharePoint Server Publishing Infrastructure feature (
Go to Site Settings->Site Collection Administration->Site collection features) and change PageLayout) and use Redirect PageLayout.
After feature activaction
- Go to the gear button, click on the site settings
- Under look and feel, click on page layouts and site templates
and change the page layout of default.aspx page to "Redirect Page".<Configure it in this way adding target url for redirect
Cheers,
Federico
- PlaceboBrass Contributor
FedericoPorceddu82 your solutions sounds like what we just want to do to our riit site page. I have actived the Server Publishing infrastructure feature. But under "Look and feel" we don't have the option "page layouts and site templates". I can only choose from the following (and I'm not really sure how to proceed how to apply your tip ):
Look and Feel
Design Manager
Title, description, and logo
Device Channels
Navigation Elements
Change the look
Import Design Package
Navigation- Dean_GrossSilver Contributor
Placebo The server Publishing Feature is very old and provides very limited functionality. There are many newer, better ways to manage the page publishing process. Those old page layouts cannot be used with the new Modern pages. I don't recommend using these older/classic techniques. There is a new Page Template feature rolling out that should be considered.