magento custom url rewrites to .html for cms pages

magento custom url rewrites to .html for cms pages

September 8, 2026 · Illustrated author avatarBy Stefan Bogdanescu
magento custom url rewrites to .html for cms pages

Preserving Custom URLs for CMS Pages in Magento

When migrating an ecommerce site into Magento, it’s crucial to preserve as many indexed links as possible to maintain SEO value and avoid broken links. This is particularly important when your existing site uses custom URL rewrites with extensions like .html.

Understanding the Problem

Consider a scenario where you have a CMS page on your current site at domain.com/about.html. When migrating this content into Magento, it typically gets rewritten as domain.com/about by default. If you manually add an SEO-friendly URL rewrite to force the inclusion of .html, Magento may return a 404 Page Not Found error.

Is It Possible to Achieve This?

Yes, it is possible to achieve this by following some best practices in Magento’s URL rewrites management. Let me guide you through the process.

Step 1: Ensure Your Magento Installation is Up-to-Date

Before proceeding, ensure that your Magento installation is up-to-date with the latest stable version (e.g., Magento 2.4.x). Outdated versions may have limitations in handling custom URL rewrites.

Step 2: Manage Your Custom Rewrites

Navigate to the Magento back-end and go to Marketing > SEO > URL Rewrites.

  1. Click on the Add URL Rewrite button.
  2. Select your Store View and click on Add Rewrite.
  3. In the new window, choose Custom as the Request Path type.

Step 3: Configure Your Custom Rewrite

Here’s how to configure the custom rewrite:

  • Target Path: Enter the path to your CMS page without the .html extension (e.g., about).
  • ID Path: Leave this field empty.
  • Rewrite and Redirect: Choose whether you want a rewrite or redirect. For SEO purposes, it’s recommended to use Rewrite.

Step 4: Save Your Rewrite

Click on Save URL Rewrite. Ensure that the Request Path in your new entry includes the .html extension (e.g., about.html).

Step 5: Reindex and Test

After saving the rewrite:

  1. Reindex your store by navigating to System > Index Management and reindexing all required indexes.
  2. Flush the Magento cache from the back-end under System > Cache Management.
  3. Open a private browser window or use an incognito mode to test if domain.com/about.html redirects correctly to your CMS page.

Conclusion

By following these steps, you should be able to preserve custom URL rewrites for your Magento CMS pages while maintaining SEO value and avoiding 404 errors. Remember that proper configuration of the URL Rewrite management in the Magento back-end is key to this process.

If you’re looking for more advanced solutions or need assistance with your Magento migration, feel free to reach out to the experts at Laravel Company. We specialize in providing tailored Magento development and consulting services to help businesses like yours succeed online.

Magento 2 Database Extensions Configuration

Our network