I have created a very simple HTML single page which I want to use as a "Landing Page". Is it possible to replace the whole page with the HTML page? I've tried a web part page, and a wiki page and once it is in a web part, that is all it stays in leaves so much random white space, etc. My custom navbar, also covers the SharePoint settings and top ribbon so I am unable to even edit the page anymore because of the way it is.

Here is my JSFiddle: in my version everything is centered, not sure why the heading text is not centered: https://jsfiddle.net/Lrg37yfs/1/

2 Answers 2


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.

enter image description here

  • 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 SitePages library.
  • Switch to classic view
  • Click Upload and upload your custom HTML file with the .ASPX extension:

enter image description here

  • Now attempt open your .ASPX page by clicking on it. Verify that it opens correctly:

enter image description here

  • 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"

AFAIK, you cannot use a custom HTML page as the landing page in SharePoint Online. There is no feature supporting to do so. For SPO, it is suggested to use modern page and there is a feature called home site.

A home site is a SharePoint communication site that you create and set as the top landing page for all users in your intranet. It brings together news, events, embedded video and conversations, and other resources to deliver an engaging experience that reflects your organization's voice, priorities, and brand.

More information here.

Reference for you:https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/sharepoint-home-sites-a-landing-for-your-organization-on-the/ba-p/621933

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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