Redirect from root to site collection

%3CLINGO-SUB%20id%3D%22lingo-sub-724884%22%20slang%3D%22en-US%22%3ERedirect%20from%20root%20to%20site%20collection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-724884%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22votecell%20post-layout--left%22%3E%3CDIV%20class%3D%22js-voting-container%20grid%20fd-column%20ai-stretch%20gs4%20fc-black-200%22%3E%3CSPAN%3EHi%20there%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22js-voting-container%20grid%20fd-column%20ai-stretch%20gs4%20fc-black-200%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22js-voting-container%20grid%20fd-column%20ai-stretch%20gs4%20fc-black-200%22%3E%3CSPAN%3EI%20have%20created%20a%20root%20site%20collection%20with%20following%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fsp.domain.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2F%22name%22.sharepoint.com%3C%2FA%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22postcell%20post-layout--right%22%3E%3CDIV%20class%3D%22post-text%22%3E%3CP%3EI%20want%20to%20auto%20redirect%20all%20users%20who%20browse%20to%20the%20root%20site%20collection%20to%20another%20site%20collection%20with%20this%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fsp.domain.com%2Ftest1%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2F%22name%22.sharepoint.com%2Ftest1%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eso%20that%20nobody%20can%20use%20root%20site%20collection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%3A%20I%20don't%20want%20to%20Add%20content%20editor%20web%20part%20method%20adding%20script%20to%20webpart%20What%20can%20be%20the%20best%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20advices.%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-724884%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-725069%22%20slang%3D%22en-US%22%3ERe%3A%20Redirect%20from%20root%20to%20site%20collection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-725069%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F152900%22%20target%3D%22_blank%22%3E%40Matts%20Christensen%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20using%20the%20modern%20layout%20in%20your%20site%3F%3C%2FP%3E%3CP%3EWell%2C%20if%20you're%20not%20willinig%20to%20insert%20a%20script%2C%20I%20don't%20think%20there's%20much%20you%20could%20do.%20Just%20my%20two%20cents%2C%20though.%3C%2FP%3E%3CP%3EAlthough%2C%20from%20the%20top%20of%20my%20head%2C%20if%20you're%20familiar%20with%20the%20Sharepoint%20Framework%2C%20you%20could%20create%20an%20extension%20that%20just%20redirects%20the%20user%20to%20your%20desired%20site.%20Or%20maybe%20a%20Webpart%2C%20if%20you%20want%20it%20for%20just%20a%20page.%3C%2FP%3E%3CP%3ELemme%20know%20if%20you%20need%20any%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-725277%22%20slang%3D%22en-US%22%3ERe%3A%20Redirect%20from%20root%20to%20site%20collection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-725277%22%20slang%3D%22en-US%22%3EHi%20said%20he%20don't%20want%20to%20add%20the%20redirection%20in%20a%20script...something%20interesting%20since%20it's%20the%20way%20to%20make%20the%20redirection%20required%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-727848%22%20slang%3D%22en-US%22%3ERe%3A%20Redirect%20from%20root%20to%20site%20collection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-727848%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365643%22%20target%3D%22_blank%22%3E%40Carlos_Marins%3C%2FA%3E%20and%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20Replies%20-%3CSPAN%3E%26nbsp%3BAll%20right%20if%20I%20have%20to%20use%20a%20Script%20what%20would%20it%20look%20like%3F%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-727956%22%20slang%3D%22en-US%22%3ERe%3A%20Redirect%20from%20root%20to%20site%20collection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-727956%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F152900%22%20target%3D%22_blank%22%3E%40Matts%20Christensen%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20SharePoint%20Designer%20add%20redirect%20HTML%20code.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI.e.%26nbsp%3B%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-name%22%3Emeta%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3Ehttp-equiv%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-string%22%3E%22Refresh%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3Econtent%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-string%22%3E%220%3B%20url%3D%3CA%20href%3D%22https%3A%2F%2Fwww.w3docs.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.w3docs.com%3C%2FA%3E%22%3C%2FSPAN%3E%3CSPAN%3E%20%2F%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F121583iA734CD7E5922BD58%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Untitled.png%22%20title%3D%22Untitled.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20hope%20this%20helps.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ENorm%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor
Hi there
 
I have created a root site collection with following http://"name".sharepoint.com

I want to auto redirect all users who browse to the root site collection to another site collection with this http://"name".sharepoint.com/test1 so that nobody can use root site collection.

 

Note: I don't want to Add content editor web part method adding script to webpart What can be the best solution.

 

Thanks for advices.

4 Replies
Highlighted

Hey @Matts Christensen,

 

Are you using the modern layout in your site?

Well, if you're not willinig to insert a script, I don't think there's much you could do. Just my two cents, though.

Although, from the top of my head, if you're familiar with the Sharepoint Framework, you could create an extension that just redirects the user to your desired site. Or maybe a Webpart, if you want it for just a page.

Lemme know if you need any help.

 

Regards,

Highlighted
Hi said he don't want to add the redirection in a script...something interesting since it's the way to make the redirection required
Highlighted

Hi @Carlos_Marins and @Juan Carlos González Martín 

 

Thanks for the Replies - All right if I have to use a Script what would it look like?  

 

Highlighted

Hi @Matts Christensen,

 

Using SharePoint Designer add redirect HTML code.

 

I.e. <meta http-equiv="Refresh" content="0; url=https://www.w3docs.com" />

 

Untitled.png

 

I hope this helps.

 

Norm