I was wondering if there is a way to replace the default tenantname.sharepoint.com to something else using javascript. A sort of url masking is that possible?
2 Answers
Not possible. There was a way to add external domain to the public website but that's discontinued.
-
Yes am aware of that but with javascript is there no way to change or hide that url. @Aveenav Commented Nov 14, 2017 at 16:01
Aveenav is correct - it is not possible. If you change window.location.href in code, it will redirect the page to the new URL. Therefore, you cannot remove sharepoint.com from the URL in JavaScript. The only way to do this would be with server-side redirects or domain name aliases, which are both not available in SharePoint Online