How Does Deferred Static Generation Affect SEO?

Dan Giordano
October 20th, 2021

The latest updates to Google’s Core Web Vitals and its emphasis on performance and user experience has speed at the top of the list for most developers and digital marketers. With the launch of Gatsby 4 and the new rendering method, Deferred Static Generation, many of our users have been asking about its impact on their website’s search engine rankings.  To answer that, let’s walk through first how Google is calculating their own metrics and then how Deferred Static Generation may affect the Google algorithm, based on what we know today.

How Google Calculates Core Web Vitals

Google measures its Core Web Vitals in a myriad of ways, trying to paint the most accurate picture of a site’s performance for any user. Most of the data is gathered from real-world usage data tied to Chrome browser and Android measurements. This means that the score is triangulated from thousands of data points and doesn’t have a consistent, single source that it derives a score from.

What Deferred Static Generation Does

When a Gatsby site uses Deferred Static Generation, it means they are deferring or delaying the building of particular pages on their website until run-time. Once a delayed page is requested (visited) by a site visitor it will be built on the fly in the same manner as any Server-Side Rendered page, but it will now persist as a static build on the edge. So, for that first, and only first user on a deferred page – they will get the performance of any other SSR page, but each and every user after that will receive a completely statically generated page.

This means that on the aggregate – your site is still very much a static site. And Google will see it that way, in most cases. Deferred Static Generation is on a spectrum of Developer Experience at one end and User Experience at the other. DSG gives developers a better solution to balance that spectrum, but it still should be used strategically.

Which Core Vitals Does DSG possibly affect?

Google Core Web Vitals are focusing on three different metrics in 2021.

  • Loading – Largest Contentful Paint
  • Interactivity – First Input Delay
  • Visual Stability – Cumulative Layout Shift

The slower loading time of SSR vs SSG affects the Loading portion of Core Web Vitals – meaning that a page rendered at run-time will load slower than a page that renders at build time. But remember, Deferred Static Generation only mimics the performance of SSR for a single request, then it loads as SSG. So for 99.9% of data, your site’s deferred pages will score just as well as your critical pages rendered at build time! This is great news for marketers and developers alike, as they both are able to gain the best experience possible – without compromises.

Talk to our team of Gatsby Experts to supercharge your website performance.