I strongly discourage anyone from using completely custom HTML pages in SharePoint Online. It's a bad idea but still possible. I only explain how to do it for everyones's awereness since I heard a lot of misinformation claiming that it's not possible ever since SharePoint 2007. However, it's still possible even in the cloud.
Here are the steps:
- Change the extension of your custom page from .HTML to .ASPX.
- Open PowerShell and run these commands. This will allow uploading custom ASPX pages to the Pages library among other things. Note: You can skip this step for the for classic Team sites.
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser
Connect-SPOService -Url https://YOUR_TENANT-admin.sharepoint.com
Set-SPOSite -Identity https://YOUR_TENANT.sharepoint.com/sites/YOUR_SITE -DenyAddAndCustomizePages $false
- Navigate to your SharePoint
- Switch to classic view
- Click Upload and upload your custom HTML file with the .ASPX extension:
- Now attempt open your .ASPX page by clicking on it. Verify that it opens correctly:
- Next you want to make this page your site's home page. To do it, open a new PowerShell window.
- Run the following PowerShell command:
Install-Module -Name SharePointPnPPowerShellOnline -Scope CurrentUser
Connect-PnPOnline -UseWebLogin https://YOUR_TENANT.sharepoint.com/sites/YOUR_SITE
Set-PnPHomePage -RootFolderRelativeUrl "SitePages/CustomHome.aspx"