Duplicate content is one of the most penalising principles to rank on a search engine like Google. The term 'duplicate content' is used when content appears on several pages belonging or not to the same domain and is identical or substantially similar.
This problem can come from a site that does not correctly handle trailing slashes. In these cases, 2 URLs (with and without the final slash) offer the same version of the same page at two different addresses.
Example:
https://www.mysite.fr/directory1/https://www.mysite.fr/directory1To solve this issue of duplication of content, you just need to set up 301 redirects between duplicate versions and original versions.
To force redirections without the trailing slash (https://www.mysite.com/directory1/ to https://www.mysite.com/directory1):
RewriteCond% {REQUEST_FILENAME}! -DRewriteRule ^ (. *) / $ / $ 1 [L, R = 301]To force redirects with the trailing slash (https://www.mysite.com/directory1 to https://www.mysite.com/directory1/):
RewriteCond% {REQUEST_FILENAME}! -FRewriteRule ^ (. * [^ /]) $ / $ 1 / [L, R = 301]Important: do not forget to link the chosen version of URL within your site (only!)