is there a way to host a webpage I created in Sharepoint?

Stephen Padayhag 0 Reputation points
2024-04-08T11:32:52.8666667+00:00

i recently created a small instructional material using html. I created a main index page and then the rest as linking pages. I tried to upload that into sharepoint but it it does not load as a webpage but merely an unknown file. Is there a way for it to load as a regular HTML page using sharepoint?

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-04-09T02:57:54.03+00:00

    Hi @Stephen Padayhag,

    You will need to convert extension from .HTML to .aspx before upload the file to sharepoint. And you need to enable Custom Script by following powershell

    Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/StaticSite 
    $site = Get-PnPSite 
    Set-PnPSite -Identity $site.URL -NoScriptSite $false
    
    
    

    Here is a nice article for upload html file steps. Please make a reference

    https://sharepoint.handsontek.net/2022/02/07/host-static-html-sites-modern-sharepoint-site-collections/


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.