Forum Discussion

Deepak Badki's avatar
Deepak Badki
Copper Contributor
Nov 01, 2017
Solved

SharePoint Farm Shutdown & DNS Redirect

I am working on a migration project which involves migration of SP On-Prem farm to SPO. We are planning to shutdown the source On-Prem farm. If user has any URl's stored in favorite then the requirement is to redirect the URL's to target site hosted on SPO. I understand it is a straightforward activity if you have your source farm up n running. I am thinking of below approach and would like to understand if someone has already implemented.

 

1. DNS mapping between Source URL's with a Azure Hosted (Redirect) Web Application

2. Host a web application in Azure which will redirect the request to the migrated site. We need the web application as the migrated content is restructured

3. Have a mapping list (source URL vs target URL) which will be used by the Azure Hosted Redirect Web Application

 

Thanks in Advance!

DB

  • I suggest you de-scope that requirement.
    If your old site is http://foo and you want it to now be https://foo.sharepoint.com, even if you get single sign on, migrate to Azure Active Directory or have some other federation in place, there can't be a way to get all links that pointed to and old location to a new location. I don't see this happening.
    Sure with group policy you can change the default home page. But if an old URL was http://foo/sites/hr/sitepages/home.aspx and now its https://foo.sharepoint.com/sites/hr/pages/home.aspx, you'd have to map every single page. what happens if they're using a new communications site online, but have a team site on prem? What about a publishing site becoming a wiki site? You can't possibly map every URL.
    People can post links under MyLinks web part. Their can be links in a links library. They can be hard coded on a page. They can be saved in someone's favorites, including edge, IE, chrome, firefox, or safari.
    I would love to hear how anyone successfully did this. I don't see it happening.
    But I am willing to learn how to solve this problem!
  • I suggest you de-scope that requirement.
    If your old site is http://foo and you want it to now be https://foo.sharepoint.com, even if you get single sign on, migrate to Azure Active Directory or have some other federation in place, there can't be a way to get all links that pointed to and old location to a new location. I don't see this happening.
    Sure with group policy you can change the default home page. But if an old URL was http://foo/sites/hr/sitepages/home.aspx and now its https://foo.sharepoint.com/sites/hr/pages/home.aspx, you'd have to map every single page. what happens if they're using a new communications site online, but have a team site on prem? What about a publishing site becoming a wiki site? You can't possibly map every URL.
    People can post links under MyLinks web part. Their can be links in a links library. They can be hard coded on a page. They can be saved in someone's favorites, including edge, IE, chrome, firefox, or safari.
    I would love to hear how anyone successfully did this. I don't see it happening.
    But I am willing to learn how to solve this problem!
    • Deepak Badki's avatar
      Deepak Badki
      Copper Contributor

      I agree it is a difficult task to map all the source items (Site URl, Doc URL, Page URL) to the target. I am thinking of following algorithm for redirection:

      1. If source URL is "Site Collection/SubSite URL", redirect to the target SC/SubSite URL. 

      2. If source URl is a document URL, extract site URL and check if site exists. Next check is, if the document exists with the same path. If yes, redirect to the target else redirect user to the site collection

      3. If source URL is a Page URl, follow the same logic as step 2

       

      My concern is, how can I pass the source URL as part of DNS mapping. If I understand DNS mapping correct, it's a mapping between root URL's. In my case, I would like to redirect the URL up to document level and to achieve that, I will have to pass the complete source URL to the target web application which will execute the above explained algorithm. 

       

      • David Leveille's avatar
        David Leveille
        Steel Contributor
        This sounds difficult to do. I don't know that you'll solve this. I haven't done any fancy URL ReWrite stuff in 15+ years.
  • That is exactly the approach to take. As you can't do a simple DNS CNAME from a vanity URL to a SharePoint Online URL, you have to do a web redirect which unfortunately does introduce a new point of failure - but it's the only way to keep your vanity URL.

Resources