DEV Community

Cover image for Astro: The epitome of SEO
Santiago Vedia
Santiago Vedia

Posted on

Astro: The epitome of SEO

Lately I've been very concerned about SEO and how my websites are being indexed by Google. Because of that I've searched about alternatives to my actual framework: React.

Turns out React is a strong framework if your website's focus is User Experience (UX). This is useful when you build applications to private enterprises that need cool animations, smooth transitions, a Dashboard or charts. But when it comes to SEO... React is a mess.

SPA (Single Page Application) is the concept that React relies to, but turns out to be a bunch of Javascript sent to the client (CSR, Client Side Rendering) that loads way after the search engines opens your website.

That affects negatively your main SEO metrics such as LCP (Largest Contentful Paint), INP (Interaction to Next Paint) and CLS (Cumulative Layout Shift), making your website incomprehensible for search engines. In consequence, Google does not position your website higher than others because it is not capable of understand it's contents.

This is where Astro comes. Astro is a framework whose main goal is making optimized websites that lead to high-metrics in SEO. They achieve this by using SSR (Server Side Rendering). But what is SSR? Well, It's simple. You serve static HTML files that come from your server (including It's metadata for SEO purposes) instead of rendering everything in the client with a bunch of Javascript code.

In fact, there is a concept called Astro Islands that allows you to make interactive components in your website. This is called "Partial Hydratation", but this could lead us to discuss this topic in another post.

The key here is that I wanted to test myself if this was true by making my own Landing Page in Astro (visit my landing here) and guess what: My metrics are IMPRESSIVE.

I tested the metrics using PageSpeed Insights and the results where AMAZING. Here is a screenshot of the result:

seo-results

I still have so much to learn from Astro but for the moment I can say that their framework works pretty well (their docs are super clear and easy to follow)

Now It's your time to see it by yourself. What do you think? Do you find it interesting? Comment below so we can discuss about SEO and what Astro brings to the table! I read you!

Thank you for reading. This is my first post :)

Top comments (0)