To provide the best user experience, search engines will rarely show multiple, duplicate or identical search results. Search engines are forced to choose which version is most likely to be the best result for you.
But what if you have similar pages or products? Then its a good idea to use canonical urls.
Basically you can use canonical urls to ‘tell’ the search engines: “hey look, this is my original page/product. The other ones are just replica’s.”
You can set the canonical url with the YOAST SEO plugin. Just open a product/post in WordPress then open the “YOAST SEO” options.
The Perfect SEO Url creates these canonical urls automatically for you(!) So you don’t have to change settings, but you will be able to finetune it.