I dont think so there is any permanent solution to it, I have used url's of my content transfer app, I have url shortners ....which help little bit but that works as redirect.
First deleting the product url rewrites from url_rewrite table, saving all products via Magento 2's mass update feature and finally updating the URL's with the mysql command mentioned earlier did the trick for us and we managed to get the extra .html away from product URL's.
We could not just run the update command as some of the products also had the normal .html version of the URL in the rewrites so we first had to delete all and re-create them.
hi,
where do you run the query please has same issue mag 2.1.6
this is one of many reason mag 2 is not production ready
But i have also .html url so when i am running this UPDATE url_rewrite SET request_path = REPLACE(request_path, '.html.html', '.html');
UPDATE url_rewrite SET request_path = REPLACE(request_path, '-html.html', '.html'); query is showing duplicate entry