Add SEO metadata to your theme
You can include search engine optimization (SEO) metadata in your theme using HTML and Liquid. There are three main aspects to consider:
- The title tag
- The meta description
- Canonical URLs
The code for the above SEO metadata should be included in the <head>
element.
For example:
layouts/theme.liquid
For another example of including metadata in a theme, you can refer to Dawn's implementation.
Anchor to The title tagThe title tag
You can include a <title>
element for search engines to read the page title from. The title for most pages can be set in the admin, and you can access this title with the Liquid page_title object.
Anchor to The meta descriptionThe meta description
You can include a <meta />
element for search engines to read the page description from. The description for most pages can be set in the admin, and you can access this description with the Liquid page_description object.
Anchor to Canonical URLsCanonical URLs
You can specify a canonical URL for a given page using the global Liquid canonical_url object.