Meta Data and Canonical URL Code Appears in Body Instead of Head Section in theme.liquid

Topic summary

Meta and canonical URL tags in a Shopify theme render in the body instead of the head on the live site, despite appearing correctly implemented in theme.liquid. This misplacement is reported to affect SEO and page indexing.

Verification: The theme.liquid file was reviewed and seems correct, and the code functions, but the live output shows the tags inside the body.

Context/definitions: Meta tags and canonical URLs belong in the head; a canonical URL indicates the preferred version of a page for search engines.

Recent updates: A community member offered to review privately. The site URL (https://gyanfashions.com/) was shared, and a video attachment was provided to demonstrate the issue (attachment central to understanding).

Outstanding items: Root cause is unknown; no specific fixes or causes (e.g., app/scripts injecting tags, theme includes, or Liquid rendering order) were identified. No resolution yet; the request remains open for insights and remediation steps.

Summarized with AI on January 9. AI used: gpt-5.

Hello Shopify Community,

I hope you’re all doing well. I’m currently facing an issue with the placement of meta data and canonical URL code in my Shopify store’s theme.liquid file. Despite the code being correctly implemented in the theme.liquid file and functioning as expected, the live website displays this code in the body section instead of the head section.

I have verified the theme.liquid file, and it seems to be in order. However, the live website does not reflect the correct placement of this crucial code. This is impacting the SEO and proper indexing of my pages.

Has anyone else encountered a similar problem? If so, could you please share any insights or suggestions on what might be causing this issue and how I can rectify it?

Thank you in advance for your assistance!

Best regards,

Thats very odd. DM me and I’ll have a look for you

Hello JoshHighland,

Thank you for offering your assistance. I appreciate your willingness to help.

Here is my website URL: https://gyanfashions.com/

I’ve encountered an issue with the placement of meta data and canonical URL code in my Shopify store’s theme.liquid file. Although the code is correctly implemented in the theme.liquid file and functions as expected, the live website displays this code in the body section instead of the head section.

I would be grateful if you could take a look and provide any insights or suggestions on what might be causing this issue and how I can rectify it. For a more clear explanation of my issue, I have attached the video with you.

Thank you in advance for your assistance!

Best regards,
Gyan Fashion