How can I match canonical URL with page URL?

Hello guys,

I’ve a issue with canonical URL.
So, the products URL page is ShopURL/collections/collections name/products/product name, but the canonical is ShopURL/products/product name.
How can I make the canonical the same of URL page?

Can you help me, please?
Thank you so much

Hi @PaulDigital ,
thank you so much for your reply.

I’m sorry but it’s not clear.

Right now I’ve this snippet on my theme.liquid about canonial:
{% if template contains ‘collection’ %}

{% else %} {% endif %}

How can I edit on that to make canonical the same of URL?

of course!

https://lookeronline.com

Or, if you check here. https://lookeronline.com/collections/moncler-sunglasses/products/moncler-ml0246-anodize-01a-shiny-black-smoke you’ll see the canonical it’s different to URL.