you are being redirected to the following URL that was not registered as the app launch URL

This SharePoint tutorial, we will disucss how to fix an error which occurs when you click on any app or add-in in SharePoint 2013, you are being redirected to the following URL that was not registered as the app launch URL.

You are being redirected to the following URL that was not registered as the app launch URL https://siteurl?SPHostUrl=hostweburl&SPLanguage=enSPClientTag=0&SPProductNumber=xx&SPAppWebUrl=url&{AppContextToken}. If you trust this URL, click here to proceed to the app now. Otherwise, go back to the previous page or close this page.”

We have developed and deployed a SharePoint provider hosted add-in and when we click on the app, it showing the warning message which is difficult for the end-user to understand.

you are being redirected to the following url that was not registered as the app launch url
you are being redirected to the following url that was not registered as the app launch url

you are being redirected to the following URL that was not registered as the app launch URL

If you have changed the domain name or you have moved your app (provider hosted app to any other IIS server) then you also need to update in the App registration page.

sharepoint 2013 app redirect not working
sharepoint 2013 app redirect not working

Check below article

How to update app registration in SharePoint online site?

you are being redirected to the following URL that was not registered as the app launch URL SharePoint Apps

If you are getting the error in SharePoint 2013 on-premise, then you can run the below PowerShell command:

Add-PSSnapin Microsoft.SharePoint.PowerShell
$farm = Get-SPFarm
$farm.Properties["CustomAppRedirect"] = $true
$farm.Update()

You may like following SharePoint tutorials:

After this, the error you are being redirected to the following URL that was not registered as the app launch URL will not come.

>