#What is the best SEO integration for Astro now
7 messages · Page 1 of 1 (latest)
Hi @grave jacinth. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the Astro documentation for more information on various topics: https://docs.astro.build.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@grave jacinth kapa.ai is still learning and improving, please let us how it did by reacting below
@sharp hatch How do I do SEO optimisations on Astro now?
Let me check the knowledge base for you. One moment! :books:
Astro has built-in support for SEO optimizations. You can use the @astrolib/seo package to improve your site's SEO. Additionally, you can generate sitemaps using the @astrojs/sitemap integration.
To get started with @astrolib/seo, you can follow these steps:
- Install the package:
npm install @astrolib/seo
- Import and use the
Seocomponent in your Astro pages:
---
import Seo from '@astrolib/seo';
---
<Seo
title="Your Page Title"
description="Your Page Description"
canonical="https://example.com/your-page-url"
openGraph={{
type: 'website',
url: 'https://example.com/your-page-url',
title: 'Your Page Title',
description: 'Your Page Description',
images: [
{
url: 'https://example.com/your-image-url',
width: 800,
height: 600,
alt: 'Your Image Alt Text',
},
],
}}
/>
For generating a sitemap, you can use the @astrojs/sitemap integration:
- Install the package:
npm install @astrojs/sitemap
- Follow the instructions in the Astro Sitemap integration documentation (https://docs.astro.build/en/guides/integrations-guide/sitemap) to configure and generate a sitemap for your site.
By using these packages and following best practices for SEO, you can optimize your Astro site for search engines.
Sources:
- Astro SEO Package (https://astro.build/integrations/2#astrolibseo)
- Astro Sitemap Integration (https://docs.astro.build/en/guides/integrations-guide/sitemap)