In some cases,
TheΒ categories entity
Β had an emptyΒ request_path
.
Go to the database and with the help of this command find theΒ categories or products
Β entities that have an emptyΒ request_path
SELECT * FROM `url_rewrite` WHERE request_path='';
Delete all those entries and use the cache clean and flush command:
php bin/magento cache:clean
php bin/magento cache:flush
Revisit theΒ url
, and the homepage will work fine once again.