Skip to main content

SEO with Gatsby

Gatsby helps your site place better in search engines. Some advantages come out of the box and some require configuration.

Server rendering

Because Gatsby pages are server-rendered, all the page content is available to Google and other search engines or crawlers.

You can see this by viewing the source for this page with curl (in your terminal):

curl https://www.gatsbyjs.org/docs/seo

Right-Click => View source won’t show you the actual HTML (but the pages are still server-rendered!) as this site is using service workers. Read these notes to learn more.

Speed boost

Gatsby’s many built-in performance optimizations, such as rendering to static files, progressive image loading, and the PRPL pattern—all help your site be lightning-fast by default.

Starting in January 2018, Google rewards faster sites with a bump in search rankings.

Page metadata

Adding metadata to pages, such as page title and description, helps search engines understand your content and when to show your pages in search results.

A common way to add metadata to pages is to add react-helmet components (together with the Gatsby React Helmet plugin for SSR support) to your page components.

Some examples using react-helmet:


edit this page on GitHub