I am trying to remove ".html" from the URL. Attached are my catalog SEO setting in the Magento 2. As you can see I have remove the ".html" from both Category URL Suffix and Product URL Suffix. I'm stumped as to why it still shows the .html at the end. I have cleared all caches and reindexed all indexes.
I had the same issue,
for me, all pages are working except the home page.
I did all the all settings and reindexed, cache cleared etc, but the error remained. so finally found the solution for this issue
remove "noroute" from "Default No-route URL" field under Default Page in Stores -> Configuration -> web.
Finally, filed value ll be "cms/index".
this may help one day for someone.
Here are the steps to solve the issue:
- Backup your current Magento2 database
Delete all records from table
url_rewrite. You can run the following SQL command:
DELETE FROM url_rewrite WHERE entity_type = 'product';
Login to your Magento 2 backend
- Re-save all your Categories
- Clean the Magento2 cache
- Now, you should be able to save/update the
Product URL Suffixin the
This worked for me:
UPDATE `url_rewrite` SET `request_path` = REPLACE(`request_path`, ".html", "")
It simply removes the
.html suffix from the URL rewrites table. You then need to reindex after.