How to do if canonical link not in head section shopify

Topic summary

A Shopify store owner encountered an SEO issue where the canonical link tag was not appearing in the head section of their theme.

Solution provided:

  • Navigate to Online Store > Themes > Actions > Edit Code
  • Open the theme.liquid file in the Layout folder
  • Insert the canonical link tag within the <head> section:
    <link rel="canonical" href="{{ canonical_url }}">
    
  • Save changes and verify using the SEO Inspector tool

A screenshot was included demonstrating the code placement. The issue appears resolved with this straightforward Liquid template modification.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

Hi, there,

The seo inspector showed that canonical link not in head section. How can I fix it?

Hi @mythgreece ,

To fix the canonical link issue:

  1. Go to Online Store > Themes > Actions > Edit Code.

  2. Open theme.liquid in the Layout folder.

  3. Add this inside the section if it’s missing:

  4. Save and test using your SEO Inspector.