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?

  • 1
    short answer: not possible – Aveenav Nov 14 '17 at 15:29
  • 1
    @Aveenav please add this as an answer as it is the correct answer. – Trevor Seward Nov 14 '17 at 15:42

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 – Keshav Taurah Nov 14 '17 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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