I have configured communication site as https://sub.mydomain.com/sites/commsite. I want to redirect the user to this URL when the user only enters https://sub.mydomain.com

When accessing other site collection, such as https://sub.mydomain.com/sites/another it should take the user to that site as normal. How can I achieve this?

1 Answer 1


It depends on SharePoint version.

Is it SharePoint on-prem? Then they can do redirect set up in the IIS on the application server. Or if it's SharePoint 2013 and below - master page can be modified with a javascript code to automatically redirect users once they hit the page

Is it SharePoint online? Then redirect can be done by publishing spfx in the application catalog. App customizer can handle redirects in this case. But this is considered customization. This app catalog should be added to a site collection. SPFX solution as app customizer should be developed and published to that site collection where redirect should happen. It will require some development time to set it up.

  • Question is tagged with SharePoint server 2019 Sep 19, 2022 at 17:51
  • It is Sharepoint 2019. Any idea how to do redirect setup on IIS?
    – Noorul
    Sep 20, 2022 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.