Creating an SEO Component

Learn why we should use an SEO component that can ensure an ideal technical SEO for our site.

Having an SEO component present in our layout can ensure that the HTML tags responsible for improving technical SEO are present on all pages. This helps with perfecting our technical SEO for our website across all pages. In this lesson, we’ll take a look into what types of tags we need to include in all our pages to ensure an ideal SEO.

Creating the SEO component

In the code widget below, notice an empty SEO component next to Layout.astro. Import the component into the Layout component using an import alias (configured in tsconfig.json) and call it inside head.

Get hands-on with 1400+ tech skills courses.