Türkçe çeviri: Gatsby SEO

nasıl -e optimize bir Gatsby site bençin arama — Gatsby's four rendering paths (SSG, DSG, SSR, client-yalnızca) ve ne her anlamına gelir bençin crawlability, modern Head API vs legacy react-helmet, sitemaps, canonicals, image SEO, React-bundle CWV maliyet, ve Netlify-era maintenance risk.

İlk yayın tarihi: 26 Haz 2026 · Son güncelleme: 8 Ağu 2026 · Advanced
Diller
Bu sayfada 1 kanıt sinyali

Gatsby sahiptir four rendering options: SSG ( default — sayfalar pre-rendered -e static HTML at gatsby oluştur), DSG (deferred static generation on ilk istek), SSR (server-side rendering per istek via Gatsby Functions), ve client-yalnızca routes (rendered entirely in browser). en çok Gatsby siteler lean on SSG, hangi verir crawlers fully rendered HTML on ilk fetch ile no rendering queue -e wait on — bir güçlü SEO baseline, far daha iyi -den bir pure client-side React app. ama şu baseline değildir universal: DSG ve SSR sayfalar generate HTML outside oluştur adım ve ihtiyaç duy onların kendi production kontroller, ve client-yalnızca routes shouldn't olmak assumed -e expose route-specific bençerik in initial HTML at tümü. Whichever path serves bir sayfa, Gatsby hâlâ ships full React runtime (~200KB+) ve hydrates o client-side — bir temel Web Vitals maliyet, değil bir crawlability bir. güncel way -e manage metadata dır oluşturulmuş-in Gatsby Head API (v4.19+), hangi çalışır genelinde tümü four rendering paths ve replaces gatsby-plugin-react-helmet. recurring pitfalls dır double canonical tags, draft/orphan sayfalar leaking -e sitemaps, missing alt text, production-yalnızca sitemap gotcha, DSG/SSR/client-yalnızca routes needing explicit sitemap ve production-behavior kontroller, ve bir framework whose maintenance sahiptir slowed sharply since Netlify's 2023 acquisition.

TL;DR — Gatsby sahiptir four rendering options — SSG ( default), DSG, SSR, ve client-yalnızca routes — ve onlar yapmayın tümü put bençerik in raw HTML aynı way. SSG pre-renders -e static HTML at oluştur time (gatsby build), bu nedenle bençerik dır in raw HTML önce ilk crawler istek — no Web Rendering Service, no rendering queue. DSG defers generation -e ilk istek; SSR generates per istek on bir server; client-yalnızca routes render nothing route-specific until browser runs JavaScript. Whichever path serves bir sayfa, Gatsby hydrates bir full React bundle (~200KB+) on client, bu da bir temel Web Vitals maliyet, değil bir crawlability bir. güncel metadata approach dır oluşturulmuş-in Gatsby Head API (v4.19+), hangi çalışır genelinde tümü four rendering paths ve replaces gatsby-plugin-react-helmet. recurring başarısızlık modes dır double canonical tags (Head API + react-helmet her ikisi firing), draft/orphan sayfalar leaking -e sitemaps, production-yalnızca sitemap gotcha, missing alt text on GatsbyImage, trailing-slash inconsistency, ve DSG/SSR/client-yalnızca routes şu never aldı bir production kontrol et. ve elephant in room: since Netlify’s 2023 acquisition, Gatsby’s maintenance sahiptir slowed sharply.

Gatsby’s four rendering options — ve neden onlar önem taşır bençin SEO

Google süreçler JavaScript sayfalar in three phases — tarama, o hâlde rendering, o hâlde dizine ekleme — ve rendering olur in bir separate geç -den bir queue kullanarak headless Chromium. Google’ın kendi rehberlik dır blunt hakkında neden siz shouldn’t lean on şu: “Server-side veya pre-rendering dır hâlâ bir great idea çünkü o yapar sizin web sitesi faster bençin kullanıcılar ve crawlers, ve değil tümü bots -ebilir çalıştır JavaScript.”

bir Gatsby site değildir universally oluştur-time static HTML — Gatsby supports four distinct rendering paths, seçilen per sayfa veya template Evidence for this claim gatsby build writes production output, including generated HTML, to the public directory. Scope: Gatsby production builds. Confidence: high · Verified: Gatsby CLI: build :

  • SSG (Static site Generation) — default. gatsby build emits fully rendered static HTML -e /public bençin sayfa. Googlebot’s ilk-wave raw-HTML fetch zaten contains complete bençerik — text, bağlantılar, metadata. bu safe, low-risk path, ve o’s ne en çok Gatsby sayfalar kullan.
  • DSG (Deferred Static Generation). Generation dır deferred until sayfa’s ilk istek yerine happening bençin her sayfa at oluştur time — yararlı bençin siteler ile huge numbers of low-trafik sayfalar nerede bir full oluştur -irdi olmak slow. oluştur alone yapmaz söyle siz ne bir crawler sees; sayfa’s HTML yapmaz var ol until something istekler o, bu nedenle ilk-istek ve cached behavior ihtiyaç duy onların kendi kontrol et, değil sadece bir oluştur log.
  • SSR (Server-Side Rendering). sayfa dır rendered per istek, kullanarak istek-time data, via Gatsby Functions. çünkü o runs at istek time, SSR sayfalar ihtiyaç duy production kontroller bir oluştur-time sayfa yapmaz: response status, caching headers, timeout behavior, ve ne bir crawler sees on bir empty veya error response — none of bu visible -den bir successful local oluştur.
  • Client-yalnızca routes. bunlar render entirely in browser ve yapmayın al route-specific bençerik in initial HTML — aynı profile olarak bir plain client-side React app. yapmayın assume Google (veya herhangi bir crawler) sees anything sayfa-specific burada until JavaScript runs; ele al bunlar olarak JS-dependent tarafından design, bu da fine bençin gated/authenticated bençerik ama yanlış bençin anything siz iste dizine eklenmiş ile bençerik.

React hydration (ReactDOMClient.hydrateRoot()) olur client-side on top of whichever of bunlar produced HTML, purely -e ekle interactivity — şu part dır aynı regardless of rendering path, ve dır bir separate concern -den hangi path generated sayfa (daha on hydration maliyet below).

Contrast SSG/DSG/SSR ile bir pure client-side React app, hangi serves bir empty <div id="root"> ve depends on browser (veya renderer) -e oluştur sayfa. en çok Gatsby sayfalar ship meaningful HTML tarafından default — şu’s indexability win, ve o’s gerçek, ama o’s bir per-sayfa property, değil bir framework guarantee. Rendering options ve image tooling yapmayın guarantee temel Web Vitals, dizine ekleme, veya sıralamalar on onların kendi; verify gerçek production output bençin whichever path bir route kullanır.

catch ile SSG/DSG/SSR alike dır bir performance bir, değil bir crawlability bir: Gatsby ships full React runtime -e her sayfa ve re-hydrates o. daha on şu, ve Astro comparison, below.

Gatsby Head API ve gatsby-plugin-react-helmet karşılaştırması

bu tek en çok önemli “are you doing it the modern way?” soru in Gatsby SEO.

** legacy approach — gatsby-plugin-react-helmet.** bençin years, standard way -e ayarla <title>, meta description, ve diğer head tags idi react-helmet library plus bu plugin. plugin’s job idi -e ver react-helmet SSR support — olmadan o, sizin title/meta tags -irdi yalnızca görün sonra JS execution, değil in raw HTML, hangi defeats benşaret et. o çalışır, ama o sahiptir known sorunlar ile React Hooks ve concurrent rendering, plus bir background-tab title bug siz patch ile defer={false}.

** modern approach — Gatsby Head API (v4.19+).** Gatsby now sahiptir bir oluşturulmuş-in way -e ekle head elements: bir named Head export -den herhangi bir sayfa veya template file. Evidence for this claim Gatsby pages and templates can export a named Head function to add head elements. Scope: Gatsby Head API. Confidence: high · Verified: Gatsby: Head API

export const Head = () => (
  <>
    <title>Page Title</title>
    <meta name="description" content="..." />
  </>
)

o receives yararlı props — location.pathname, params, data (-den sayfa’s GraphQL sorgu), ve pageContext — ve o deduplicates tags şu share bir id prop (son bir wins), gerçben çalışbir two farklı head-tag mechanisms at once (Head API plus bir leftover react-helmet çbirğrı) -ebilir hâlâ conflict hatta ile deduplication. o çalışır yalnızca in sayfa files ve templates, değil in arbitrary components. advantages üzerinde react-helmet: no üçüncü-party bundle, no Provider wrapper, deterministic tag sıra ile React 18 streaming. kullan Head API bençin tümü yeni projects, ve plan bir migration bençin existing ones.

Head API çalışır aynı way genelinde tümü four rendering paths — SSG, DSG, SSR, ve client-yalnızca routes tümü support bir Head export. ne differs dır ne zaman onun output lands in HTML bir crawler -ebilir fetch: on SSG o’s baked in at oluştur time; on DSG ve SSR o’s generated at ilk-istek veya per-istek time; on bir client-yalnızca route o değildir in initial HTML at tümü. yapmayın assume “I added a Head export” dır eşdeğeri -e “this is in the raw HTML for every route” — kontrol et gerçek production output (view-source: veya curl) bençin whichever path her route kullanır, değil sadece bir temsilci sayfa.

** “meta tags in DevTools but not in source” bug.** bir classic Gatsby SEO symptom: sizin title/meta tags göster up in Chrome DevTools ama dır missing -den view-source:. neden ol dır şu DevTools shows hydrated DOM (sonra JS runs), -iken view-kaynak shows raw HTML. eğer sizin tags yalnızca görün in DevTools, sizin SEO component dır rendering client-side yerine olma baked -e Gatsby’s static output — genellikle çünkü o’s kullanılan olarak bir regular component yerine olarak (veya bençinde) sayfa’s Head export. her zaman verify in raw HTML, değil DevTools.

Wiring up bir SEO component ( GraphQL data layer)

Gatsby’s data layer dır GraphQL, ve o’s nasıl siz feed metadata -e sizin sayfalar.

  • useStaticQuery pulls global defaults -den siteMetadata (title, description, siteUrl) defined in gatsby-config.js.
  • sayfa-level GraphQL sorgular geç bir data prop straight -e Head export — no extra wiring gerekli.
  • standard pattern dır prop || siteMetadata fallback: kullan per-sayfa değer eğer o vardır, otherwise site default.

bir Head export şu takes sayfa data görünür like:

export const Head = ({ data }) => (
  <>
    <title>{data.post.title}</title>
    <meta name="description" content={data.post.excerpt} />
  </>
)

Sitemaps: gatsby-plugin-sitemap (ve onun traps)

Install gatsby-plugin-sitemap ve configure o in gatsby-config.js. bir few things trip kişiler up:

  • o generates sitemap-index.xml, değil /sitemap.xml. Submit dizin URL in Google arama Console — yapmayın submit /sitemap.xml ve expect o -e resolve.
  • o yalnızca runs in production builds. o yapar nothing in gatsby develop. -e test et o, çalıştır gatsby build && gatsby serve. kişiler file “my sitemap is missing” raporlar şu dır gerçekten sadece “I never ran a production build.”
  • createLinkInHead: true tarafından default adds sitemap reference -e HTML head automatically.
  • o her zaman excludes /dev-404-page, /404, ve /offline-plugin-app-shell-fallback.
  • <priority> ve <changefreq> dır ignored tarafından Google — plugin docs söyle bu nedenle yapğrudan. Focus on bir accurate <lastmod> instead.
  • entryLimit defaults -e 45 000 URLs per file.

Excluding drafts dır sizin job. Gatsby builds everything o bulur, bu nedenle draft bençerik sails straight -e sitemap unless siz filter o. yap şu in gatsby-node.js ile bir GraphQL filter (e.g. excluding entries olmadan bir publish date), değil tarafından hiding o in bir React component — tarafından o hâlde o’s zaten oluşturulmuş ve listed.

DSG, SSR, ve client-yalnızca routes ihtiyaç duy bir explicit sitemap decision. gatsby-plugin-sitemap reflects ne o -ebilir see at oluştur time. bir SSG sayfa dır straightforward — o vardır olarak bir static file, bu nedenle o’s naturally sitemap-eligible. bir DSG sayfa’s HTML yapmaz var ol henüz at oluştur time (o generates on ilk istek), bir SSR sayfa never sahiptir düzeltilmiş HTML at tümü, ve bir client-yalnızca route sahiptir no route-specific bençerik -e dizin in ilk place. yapmayın assume herhangi bir of bunlar dır in sitemap (veya -meli olmak) sadece çünkü route vardır — decide, sayfa tarafından sayfa, whether o belongs, ve verify generated sitemap-index.xml aslında reflects şu decision yerine bir oluştur-time guess.

robots.txt: gatsby-plugin-robots-txt eklentisi

gatsby-plugin-robots-txt generates robots.txt at oluştur time. yararlı detail bençin SEO dır environment awareness: o reads process.env.GATSBY_ACTIVE_ENV o hâlde process.env.NODE_ENV, bu nedenle -ebilirsiniz sun farklı kurallar per environment. classic kullan dır blocking crawlers on Netlify preview/branch deploys bu nedenle sizin staging URLs yapmayın al accidentally dizine eklenmiş, -iken leaving production open.

Canonical URLs (ve double-canonical bug)

İki uygulanabilir yaklaşım:

  1. gatsby-plugin-canonical-urls adds bir <link rel="canonical"> -e her sayfa. ayarla stripQueryString: true bu nedenle /blog?tag=foo ve /blog yapmayın al ele alınır olarak separate canonicalized sayfalar — recommended bençin en çok siteler.
  2. ** Head API**, ayarlama canonicals yourself -den location.pathname:
export const Head = ({ location }) => (
  <link rel="canonical" href={`https://example.com${location.pathname}`} />
)

** double canonical bug.** bu bir known, easy—e-hit sorun: -erseniz kullan gatsby-plugin-canonical-urls ve bir react-helmet canonical etiketi at aynı time, siz emit two <link rel="canonical"> tags. seç bir mechanism. (-erseniz’re on react-helmet, gatsby-plugin-react-helmet-canonical-urls dır helmet-aware option; on Head API, ayarla canonical orada ve drop plugin.)

Trailing slashes. Gatsby sayfalar -ebilir olmak reachable ile ve olmadan bir trailing slash, ve Gatsby’s <Link> component kullanır client-side History API routing — hangi bypasses server-side 301 yönlendirmeler siz’d normally kullan -e normalize trailing slashes. Decide on bir form, enforce o at ana makine/CDN level, ve koru canonicals consistent ile o.

Görsel SEO: gatsby-plugin-image

gatsby-plugin-image dır genuinely bir of Gatsby’s strengths. Two components:

  • StaticImage — bençin images whose path dır known ve hardcoded at oluştur time.
  • GatsbyImage — bençin dynamic images coming -den GraphQL.

ne yaptığı automatically: birden çok sizes, WebP/AVIF formats, lazy loading, ve breakpoints (750/1080/1366/1920px). o ayrıca generates placeholders (blurred, dominant color, veya traced SVG) şu reserve space ve prevent Cumulative Layout Shift — bir temel Web Vitals metric. çünkü dimensions dır ayarla, siz kaçın CLS, ve modern formats plus lazy loading yardım et LCP.

** bir thing o yapmaz yap dır yaz alt text.** şu’s on siz, her time — missing alt text on GatsbyImage dır bir of en çok yaygın Gatsby SEO oversights. (Migrating -den eski gatsby-image package? orada’s bir codemod: npx gatsby-codemods gatsby-plugin-image.)

Structured data (JSON-LD)

Google’s tercih edilen structured-data format dır JSON-LD, ve temiz way -e ekle o in modern Gatsby dır via Head API ile bir script tag:

export const Head = ({ data }) => (
  <script type="application/ld+json">
    {JSON.stringify({
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": data.post.title,
    })}
  </script>
)

gatsby-plugin-next-seo offers pre-oluşturulmuş JSON-LD components -erseniz’d rather değil hand-roll them. bir frequent confusion -e clear up: gatsby-plugin-manifest dır değil bir structured-data plugin — o generates PWA web app manifest (icons, theme color), nothing -e yap ile schema.

React bundle ve temel Web Vitals

burada’s Gatsby’s gerçek weakness relative -e zero-JS generators.

  • Full hydration ( Gatsby 1–4 default) hydrates entire React tree ve ships bir 200KB+ React runtime -e her sayfa. HTML dır pre-rendered, bu nedenle bu yapmaz hurt crawlability — ama o absolutely affects load speed ve CWV.
  • Partial hydration (Gatsby 5, experimental) hydrates yalnızca components marked "use client" ve leaves rest olarak static HTML, cutting JS shipped ve yapğrudan improving TTI ve CWV. limitations dır gerçek: production builds yalnızca, hâlâ beta, ve incompatible ile emotion, styled-components, ve gatsby-plugin-offline.

takeaway: Gatsby’s JS payload dır bir performance sorun, değil bir indexability bir. Googlebot hâlâ renders JS -e assess sayfa-experience sinyaller, bu nedenle bundle -ebilir maliyet siz on CWV hatta gerçben sizin bençerik indexes fine.

Gatsby vs Astro bençin SEO

-erseniz’re choosing bir static framework today, bu comparison şu önem taşır en çok bençin SEO.

DimensionGatsbyAstro
JS shipped -e browser200KB+ (full React runtime)~5KB (interactive islands yalnızca)
Rendering modelSSG → SPA (full hydration)SSG → MPA (zero hydration tarafından default)
oluştur speed (40 sayfalar)2–3 minutesaltında 10 seconds
SEO plugin ecosystemMature (gatsby-plugin-*)Growing
tarama-budget impactHigher (daha JS bençin Google -e render)Lower
Framework futureUncertain (Netlify ownership, slowed activity)Active, growing

her ikisi pre-render indexable HTML — şu’s bir wash. difference dır JS tax: Astro’s islands ship bir fraction of JavaScript, hangi bir Vaihe comparison frames olarak “Reduced JavaScript execution conserves tarama bütçesi ve accelerates sayfa scanning.” (bir historical caveat on diğer side: Astro’s image handling lacked automatic width/height at time of şu comparison, hangi produced Lighthouse warnings — kontrol et güncel Astro docs, olarak o -ebilir olmak resolved.)

bençin context on nasıl whole field compares, see static site generators hub.

honest part: Gatsby’s maintenance trajectory

ben won’t sugarcoat bu, ve ben won’t catastrophize o either.

Netlify acquired Gatsby Inc. in February 2023. Gatsby Cloud idi sunset ve customers idi moved -e Netlify; Netlify stated acquisition -irdi “değil impact Gatsby JS.” Since o hâlde, activity sahiptir slowed markedly. bir widely-okuyun community GitHub discussion (#39062) argues Gatsby dır effectively abandoned — minimal commits, no React 19 support, bir 2024 roadmap şu wasn’t delivered, ve telemetry service shut down. Maintainers sahip framed güncel state olarak security düzeltmeler, limited dependency updates, ve low-hanging-fruit bug düzeltmeler.

ne şu anlamına gelir bençin SEO ekipler. bençin bir existing Gatsby site, none of bu bir emergency — o builds, o indexes, o çalışır. risk dır ecosystem decay üzerinde time: SEO depends on plugins (gatsby-plugin-sitemap, image, canonical-urls), ve aging plugins (e.g. gatsby-source-shopify facing API deprecation) -ebilir eventually break in ways şu quietly degrade dizine ekleme. bençin bir yeni project, weigh şu seriously — frameworks kişiler dır migrating -e dır Astro ve sonraki.js.

Production checklist: verify her rendering path

bir local gatsby develop session veya hatta bir temiz gatsby build log yapmaz prove ne bir crawler aslında receives. çünkü SSG, DSG, SSR, ve client-yalnızca routes her generate HTML differently, kontrol et production behavior per path yerine assuming bir temsilci sayfa kapsar tümü of them:

  • Raw HTML bençerik. her biri bençin rendering path in kullan, fetch bir gerçek production URL ile curl -s <url> veya view-source: — değil DevTools — ve yapğrula bençerik, title, ve meta tags bir crawler -irdi see dır aslında orada.
  • Metadata (Head export output). yapğrula Head export’s tags land in şu raw HTML bençin path in soru. bu nerede DSG/SSR differ en çok -den SSG: tags var ol in sizin kaynak either way, ama yalnızca bir production fetch proves onlar yapılmış o -e response.
  • HTTP status. kontrol et response status code on production, especially bençin SSR ve DSG routes — bir sayfa şu renders fine locally -ebilir 500 in production on ilk istek veya altında load in ways bir oluştur never surfaces.
  • Caching behavior. SSG output dır bir static file ile predictable caching. DSG caches sonra ilk istek — yapğrula ikinci istek dır fast ve correct, değil sadece ilk. SSR responses depend on sizin caching headers ve hosting layer; verify stale veya per-istek bençerik değildir sunulan -e yanlış ziyaretçben.
  • başarısızlık ve empty-state behavior. bençin SSR ve DSG sayfalar backed tarafından istek-time veya ilk-istek data, kontrol et ne bir crawler sees eğer şu data fetch fails veya döndürür empty — bir unhandled error state değildir aynı sayfa siz tested locally ile good data.
  • Sitemap generation ve exclusions. Re-yapğrula bu yalnızca olur on bir production oluştur (gatsby build && gatsby serve, never gatsby develop), ve şu exclusions siz expect — drafts, client-yalnızca routes, anything siz decided shouldn’t olmak listed — dır aslında absent -den generated sitemap-index.xml, değil sadece absent -den sizin intent.

None of bu optional per rendering path — bir working gatsby build proves SSG output, değil DSG, SSR, veya client-yalnızca behavior.

yaygın Gatsby SEO mistakes

  1. hâlâ kullanarak gatsby-plugin-react-helmet — legacy; migrate -e Head API.
  2. Meta tags in DevTools ama değil in sayfa kaynak — SEO component dır rendering client-side; kontrol et view-source:, değil DevTools.
  3. Draft bençerik in sitemaps — filter drafts in gatsby-node.js ile GraphQL, değil in bir React component.
  4. Orphan sayfalar -den src/pages — Gatsby auto-routes everything orada; stale files oluştur ve land in sitemap.
  5. Double canonical tagsgatsby-plugin-canonical-urls + react-helmet her ikisi firing.
  6. Trailing-slash inconsistency<Link> client-routing bypasses server-side trailing-slash yönlendirmeler.
  7. değil stripping sorgu strings -den canonicals — ayarla stripQueryString: true.
  8. Alt text omitted on GatsbyImage — o değildir auto-generated.
  9. Submitting /sitemap.xml — gerçek file dır /sitemap-index.xml.
  10. Testing sitemap in gatsby develop — o yalnızca generates on gatsby build.
  11. Noindex toggled tarafından React state — Google -ebilir sahip zaten processed raw HTML; ve ne zaman o sees noindex in raw HTML o -ebilir skip rendering entirely. koru noindex decisions in static HTML veya server headers.

bençin JavaScript-rendering fundamentals behind tümü of bu, see parent JavaScript SEO hub.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.