logo
search
SharePoint Document Issues

How to Use ASPX Templates on SharePoint Online Sites

Kushani NimanthikaKushani Nimanthika Oct 21, 2026 868 views

Question details

The user wants to apply an existing ASPX site template to another SharePoint Online site, such as a department site connected to a hub.

How to Use ASPX Templates on SharePoint Online Sites
Product
SharePoint Online
Device & OS
not provided
Scenario
Attempting to upload or reuse downloaded ASPX files as default templates for new or existing SharePoint department sites.
Observed behavior
SharePoint Online does not provide an out-of-the-box feature to directly upload and apply existing ASPX files as default site templates.
Before you start

Ensure you have SharePoint Administrator privileges for your Microsoft 365 tenant, as applying custom configurations requires scripting and access to the organization template gallery.

Solution 1Recommended

Create and Publish a Custom SharePoint Site Template

Since direct ASPX uploads are restricted, you must use PowerShell to create a custom site script and publish it to your organization's template gallery.

SharePoint Online prevents the direct uploading of ASPX files as site templates for architectural and security reasons. The modern approach requires administrators to define layouts and configurations using JSON site scripts.

Once a site script is created and registered as a site design (template), end-users can easily apply it to their department sites directly from the SharePoint user interface.

1
Extract the existing site configuration

Open the SharePoint Online Management Shell and use the 'Get-SPOSiteScriptFromWeb' PowerShell cmdlet on the existing site to extract the desired site configuration into a reusable JSON script.

2
Add the site script to your tenant

Run the 'Add-SPOSiteScript' cmdlet, passing your generated JSON script to register the configuration in your SharePoint Online tenant.

3
Create the site template

Use the 'Add-SPOSiteDesign' cmdlet to link your newly uploaded site script to a custom template name, making it available for users.

4
Apply the template from the gallery

Navigate to the target SharePoint site, click 'Settings' (the gear icon in the top right), select 'Apply a site template', and choose your new custom template from the 'From your organization' tab.

Create and Publish a Custom SharePoint Site Template
Development Resources: For complex ASPX customizations and advanced scripting parameters, refer to Microsoft's official guidance on applying and customizing SharePoint site templates, or post specific questions in the Microsoft Q&A community under the SharePoint Development tag.
Free Microsoft Office alternative

Looking for a Simpler Way to Manage Daily Documents? Try WPS Office

While SharePoint handles complex enterprise intranet templates, your daily document creation shouldn't require complex scripting. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, letting you create, edit, and manage Word, Excel, and PowerPoint files without a steep learning curve.

Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) for seamless sharing across teams.Lightweight architecture ensures fast loading and smooth performance on older devices.Built-in rich template library for documents, spreadsheets, and presentations, requiring no code or scripting.Completely free to use with an intuitive, tabbed interface that feels instantly familiar.
microsoft office alternative - wps office

Frequently Asked Questions

Can I upload a downloaded ASPX file to the Site Pages library to use as a template?

No, SharePoint Online does not support using manually uploaded ASPX files as default site templates. Even if you upload an ASPX file to the Site Pages library, it will function only as a standard page rather than a reproducible template for other sites.

Where do I find custom templates my organization has already created?

Go to your SharePoint site, click the Settings (gear) icon, select 'Apply a site template', and navigate to the 'From your organization' tab. Any custom templates successfully published by your tenant administrators will appear here.

Do I need admin rights to publish a SharePoint site template?

Yes, creating and publishing a custom site template using site scripts and site designs requires SharePoint Administrator privileges within your Microsoft 365 tenant.

Why did Microsoft remove the classic 'Save site as template' option?

The classic 'Save site as template' feature is unsupported on modern SharePoint Online sites, especially communication sites or Microsoft 365 group-connected team sites, because it conflicts with the modern underlying architecture. Microsoft replaced this capability with the modern site scripts and custom site templates framework.