How to remove URL parameters from canonical URLs in Shopify

This implementation resolves common search console indexation issues, such as "Alternate page with proper canonical tag" and "Crawled - currently not indexed", by ensuring query parameters do not populate canonical URL strings in Shopify storefronts.

To drop URL parameters for all the pages:

`<link rel="canonical" href="{{ canonical_url | split: "?" | first }}">`
``` Based on the https://shopify.github.io/liquid/filters/first/ and https://shopify.github.io/liquid/filters/first/ This implementation resolves common search console indexation issues, such as "Alternate page with proper canonical tag" and "Crawled - currently not indexed", by ensuring query parameters do not populate canonical URL strings. 
TRUSTED BY LEADING BRANDS
Tower London
Out and Out
Bedstar
Hunter Boots
Care Fertility
Aroma Zone
Interflora
Unbiased
Vera John
Bubble
Mint Outdoor

Ready to Improve Your SEO?

Contact us for a free assessment—no commitment required.