How to Convert HTML Files to ASPX and Update Links in SharePoint Online
Question details
The user needs to convert HTML files to ASPX in SharePoint Online and update the internal links pointing to the old .htm or .html extensions without relying on SharePoint Designer.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Migrating or converting site pages from standard HTML format to ASPX format within a modern SharePoint environment.
- Observed behavior
- Renaming files from .html to .aspx breaks existing internal links, and SharePoint Designer cannot be used to perform bulk replacements because it is unauthorized on the target platforms.
Before making bulk changes to file extensions and internal links, ensure you have set up a dedicated sandbox environment to safely test your migration script without affecting live data.
Use a Controlled Migration Script to Update Links
Since SharePoint Designer is restricted in modern environments, deploying a programmatic script or search-and-replace process is the most effective way to safely update internal links.
Modern SharePoint Online environments often restrict or completely disable SharePoint Designer, meaning manual bulk search-and-replace operations are not a viable option. A controlled programmatic approach using PowerShell (such as PnP PowerShell) or a specialized migration tool allows administrators to execute safe link updates across the entire site structure.
Create a separate SharePoint sandbox site and duplicate a sample of your current HTML files to safely validate the conversion and link-updating process.
Within your document library, rename the target .htm or .html files so that they possess the new .aspx extension.
Run your designated migration script (e.g., via PnP PowerShell) to scan the site pages, locate all hyperlink references to the old '.html' extensions, and replace them with '.aspx'.
Navigate through a sample of the updated SharePoint pages and click the internal links to ensure they successfully route to the newly converted ASPX pages.

Manage Your Migration Documentation with WPS Office
While updating SharePoint site structures and configuring scripts, managing your migration logs and planning documentation is crucial. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office, making it perfect for preparing scripts, reviewing logs, and formatting project documents seamlessly.
- 1. Download and Install: Visit the official WPS website to download the free WPS Office suite for your operating system.
- 2. Open Documentation: Open your existing Microsoft Word or Excel migration logs directly within the WPS interface without losing any formatting.
- 3. Edit and Share: Use the built-in PDF tools and document editors to update your plans and share them with your SharePoint administration team.

Frequently Asked Questions
Why can't I use SharePoint Designer to replace links in SharePoint Online?
Many modern SharePoint Online environments restrict or completely disable SharePoint Designer for security, platform modernization, and compatibility reasons, blocking its search-and-replace functionality.
Do links update automatically when renaming a file in SharePoint?
No, manually renaming a file's extension from HTML to ASPX does not automatically update the hardcoded hyperlinks within other site pages that point to the original file extension.
Can I use PnP PowerShell to update SharePoint links?
Yes, PnP PowerShell is widely used by administrators to write scripts that iterate through SharePoint site pages, locating and replacing outdated HTML link references with updated ASPX URLs.




