I would like to be able to determine if a SharePoint web application URL is a SharePoint online instance or not.
Previously, I used to think that you could check to see if a sharepoint web application URL had the form https://{tenantname}.sharepoint.com
to see if it was a sharepoint online instance URL.
But now I've seen Office 365 sharepoint online urls that looks like https://prefix.mycompany.com
.
Is there some simple way to check a URL for sharepoint online versus sharepoint on prem?
I'd rather not have to add a "SharePoint Online" checkbox in my UI.