I have a Drupal 8 site with clean URLs. Recently, URLs are similar to example.com/index.php/page-url-alias. The page still loads correctly, but I don't want the index.php
part to be indexed.
If I empty the cache, the URLs are shown correctly.
How can I force Drupal not to add index.php in the URLs it generates?