🔥 Just Launched! Werra Premium Template for HyväSee it in Action

Solved: Magento 2 Product URLs Double html Suffix Problem

By Sanjay JethvaUpdated on Apr 22, 2025 1 min read

Have you recently migrated to Magento 2? Are your product URLs end with .html.html?

Working on customizations and Magento 2 migration, we recently faced an issue. After Magento 1 to Magento 2 migration, the imported product URLs were having double html suffix.

Original URL: example.com/tshirt.html

With double .html suffix problem: example.com/tshirt.html.html

Steps to get rid of Magento 2 Product URLs Double html Suffix Problem:

  1. Take the backup of your current Magento 2 database.
  2. Run the following command in your Magento 2 database:
    UPDATE url_rewrite SET request_path = REPLACE(request_path, '.html.html', '.html') WHERE url_rewrite.request_path like '%html.html';
  3. Run the below command to flush the cache
    bin/magento cache:flush

That’s it and double html suffix in Magento 2 product page issue is no longer there! Still, stuck somewhere while implementing the solution or having any question regarding it? Do comment your queries and I will be happy to help! You can get all products URL in Magento 2 and check the results to see if the problem persists!

Don’t forget to share the solution to other Magento community members!

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.