Most organic traffic disasters are not caused by a bad keyword strategy. They are caused by a pull request. A router change turns every product URL to lowercase without redirects. A new front-end framework renders category pages client-side and ships an empty <title> for the first second. A staging robots.txt file with Disallow: / gets copied to production on a Friday. None of these breaks a unit test, and all of them can cost a business a large share of its search traffic before anyone notices.
Developers are not to blame for that; SEO requirements are rarely written as specifications. They arrive as vague requests (“make it SEO friendly”) or as bug reports weeks after release. This guide turns them into something engineers can work with: concrete rules for routing, rendering, links, templates, performance and environments, each tied to Google’s own documentation, plus a set of automated checks you can add to CI.
It is written for engineers who build and ship websites, and for the SEO people who need a shared language with them.
Six engineering decisions that quietly decide organic traffic
Search engines interact with your site through a small number of interfaces: URLs, HTTP responses, HTML (raw and rendered), links and performance. Every one of them is owned by engineering.
| Decision | How it fails | Symptom in Search Console |
|---|---|---|
| URL scheme and routing | Duplicate URLs, changed URLs without redirects | Spike in “Not found (404)” or “Duplicate without user-selected canonical” |
| Status codes | Error pages returning 200 | “Soft 404” growth |
| Rendering strategy | Content only in rendered DOM, render failures | “Crawled – currently not indexed”, thin snippets |
| Link markup | Navigation built from buttons and click handlers | Orphaned sections, slow discovery |
| Head templates | Missing, duplicated or conflicting titles, canonicals, robots tags | Wrong canonical chosen, pages excluded by noindex |
| Performance and payload | Heavy bundles, late LCP image, layout shifts | Poor Core Web Vitals report URLs |
Routing rules: one URL per resource and honest status codes
Google’s URL structure guidance reads like a style guide for routers. The essentials:
- Hyphens, not underscores, to separate words in paths.
- Case is significant. Google treats
/APPLEand/appleas different URLs. If your server treats them as the same, standardise on one and redirect the other. - Standard parameters. Use
=between key and value and&between parameters, and drop parameters that do not change the content. - No session IDs in URLs. Use cookies.
- Root-relative links. Parent-relative paths can generate endless bogus URLs if the server answers nonsense paths with 200.
“Don't use fragments to change the content of a page, as Google Search generally doesn't support URL fragments.”
— Google Search Central, URL structure best practices for Google Search
For client-side routing, that means using the History API with real paths rather than hash routes. Our guide to SEO-friendly URLs covers naming choices; this section is about mechanics.
Status codes are the other half of routing. Google’s documentation states that it does not use content from URLs returning 4xx codes and that 5xx responses make its crawlers temporarily slow down. The engineering rules follow directly:
- Unknown routes return 404 from the server, not a 200 with a “not found” component.
- Permanently moved routes return 301 or 308 to the final destination in one hop. If the platform cannot do that, read about how Google treats meta refresh and JavaScript redirects before falling back to them.
- Maintenance windows return 503, not a 200 maintenance page.
- Rate limiting for bots uses 429 sparingly; persistent errors lead to URLs being dropped.
Choosing a rendering strategy Googlebot can index
Google processes JavaScript sites in three phases: crawl, render and index. In the first phase it reads the raw HTML and extracts links. Pages are then queued for rendering in headless Chromium, which Google says can take a few seconds or longer, and the rendered HTML is what gets indexed. Anything that exists only after JavaScript runs is therefore delayed and at the mercy of rendering succeeding.
| Strategy | What the crawler receives first | SEO risk | Good fit |
|---|---|---|---|
| Client-side rendering (CSR) | Near-empty shell plus scripts | High: content, links and metadata depend on rendering | Logged-in apps, dashboards |
| Server-side rendering (SSR) with hydration | Complete HTML | Low, if hydration does not change content or head tags | Ecommerce, listings, content that changes often |
| Static generation (SSG) | Complete HTML from build | Low; watch build times and stale content | Docs, blogs, marketing pages |
| Incremental or on-demand regeneration | Complete HTML, cached | Low; ensure cache invalidation on price or stock changes | Large catalogues |
| Dynamic rendering (separate HTML for bots) | Pre-rendered HTML for bots only | Medium: complexity, parity drift | Legacy workaround only |
Google has been clear that the last row is not a long-term solution:
“Instead, we recommend that you use server-side rendering, static rendering, or hydration as a solution.”
— Google Search Central, Dynamic rendering as a workaround
Two hydration traps cause most problems in practice. First, head tags that differ between server and client: if the server sends one title and the client replaces it, Google may index either. Second, a noindex in the server HTML that JavaScript later removes. Google warns that when it sees noindex it may skip rendering entirely, so the removal never happens. For a framework-by-framework view see our server-side rendering guide and the broader JavaScript SEO guide.
Links Google can follow: the <a href> rule
“Google can only discover your links if they are <a> HTML elements with an href attribute.”
— Google Search Central, Understand JavaScript SEO basics
Google’s link documentation gives concrete examples. An <a href="/products/category/shoes" onclick="..."> is fine: the handler can do whatever it likes as long as the href holds a real URL. An <a routerLink="products/category"> without href, an <a onclick="goto(...)">, or href="javascript:..." are not recommended. In component libraries this usually means making sure the framework’s link component renders an anchor with href, and banning click-handler navigation on div and button elements in code review.
Links also determine crawl paths. Filters, sort orders and site search can generate millions of URLs. Our guides on whether internal search pages should be indexed and on crawl control for 100,000+ page sites cover how to keep those under control.
Templating titles, canonicals and structured data so they never ship empty
Head tags are generated from templates and data, which means a single bug affects every page of a type. Treat them as part of the data contract.
- Title and meta description come from fields with sensible fallbacks. A missing field should produce a generic but unique value (product name plus brand), never an empty tag or the site name alone.
- Canonical is an absolute URL, in the
<head>, rendered server-side, and there is exactly one. Google’s JavaScript guide says the best way to set it is in HTML. - Robots meta defaults to indexable on production and is driven by explicit config for exceptions, not by an environment variable that might be wrong.
- Structured data is generated from the same data that renders the visible page, so prices and ratings cannot drift. See our schema markup guide for types.
- Hreflang and pagination links, where used, are generated from the router, not hand-maintained.
Google’s canonicalisation guide adds two engineering-relevant rules: use absolute URLs rather than relative paths, and do not specify different canonical URLs for the same page through different methods (for example, a sitemap listing one URL and a canonical tag naming another).
Performance budgets tied to Core Web Vitals and crawl limits
Performance work is easier to defend when it is expressed as budgets that fail a build. Start with Google’s user-centric thresholds, measured at the 75th percentile of page loads, and add payload limits that protect them.
| Budget | Target | Why |
|---|---|---|
| Largest Contentful Paint | 2.5 s or less (poor above 4.0 s) | web.dev LCP thresholds at p75 |
| Interaction to Next Paint | 200 ms or less | Core Web Vitals responsiveness threshold |
| Cumulative Layout Shift | 0.1 or less | Core Web Vitals visual stability threshold |
| HTML document size | Well under 2 MB | Googlebot crawls the first 2 MB of a supported file |
| Each JS or CSS file | Well under 2 MB | Referenced resources are subject to the same limit |
| Long tasks on main thread | Under 50 ms each | web.dev guidance for improving INP |
The web.dev list of the most effective Core Web Vitals improvements is a good engineering backlog: make the LCP image discoverable in the HTML with fetchpriority="high" and never lazy-load it; reserve space for images and dynamic content; break up long tasks; keep pages eligible for the back/forward cache. Our posts on preload, preconnect and speculation rules and HTTP/2 and HTTP/3 go deeper on the network side, and the metrics themselves are explained in our Core Web Vitals guide.
Environment hygiene: staging, robots.txt and preview URLs
The most expensive SEO bug is usually an environment bug. Common patterns:
- Staging protected only by robots.txt, which does not stop indexing if anyone links to it. Use authentication instead; see our staging site SEO guide.
- A
noindexorDisallow: /meant for staging deployed to production because both read the same config file. - Preview deployments on public subdomains with absolute canonicals pointing at themselves.
- Hard-coded staging hostnames in canonicals, sitemaps or structured data after a release.
The fix is the same in each case: make production SEO settings explicit, version-controlled and tested, rather than inferred from the environment.
Pre-release SEO tests to add to your CI pipeline
These checks are cheap to automate and catch most regressions. Run them against a preview build with a sample of URLs per template, not just the homepage.
- Status codes. Request a known-good URL per template (expect 200), a nonsense path (expect 404) and a list of legacy URLs (expect 301 to a 200 in one hop).
- Raw HTML content. Fetch without JavaScript and assert that the
<h1>, main copy and primary links are present. - Head tags. Assert exactly one non-empty
<title>, exactly one absolute canonical on the production host, and nonoindexon indexable templates. - Robots.txt. Diff production robots.txt against the approved version; fail on any new
Disallowcovering key paths. - Links. Count
<a href>elements in navigation; fail if it drops sharply versus the previous build. - Structured data. Parse JSON-LD and validate required properties against the visible price and availability.
- Payload and vitals. Run Lighthouse CI with budgets for LCP, CLS, total blocking time and bundle size.
A minimal head-tag assertion in Python looks like this:
import re, requests
html = requests.get(url, timeout=20).text
assert len(re.findall(r'<link[^>]+rel="canonical"', html)) == 1
assert 'name="robots" content="noindex' not in html
assert re.search(r'<title>[^<]{5,}</title>', html)
If your SEO colleagues want to run similar checks themselves, our Python for SEO guide includes a bulk status and redirect checker.
A worked example: the framework upgrade that changed 3,000 URLs
A hypothetical but typical case. An online retailer with 3,000 product pages upgrades its front-end framework. The new router lowercases paths and drops a trailing .html. In testing everything works, because internal links are generated by the new router. After launch:
- Every external backlink and every indexed URL now points to a path that returns 404.
- Product pages render prices client-side, so the raw HTML lacks the price shown in structured data.
- The canonical tag is injected after hydration and briefly points at the staging host.
Had the CI tests above existed, test 1 (legacy URL list returning 301) and test 3 (absolute canonical on the production host) would both have failed the build. The cost of adding them is a few hours; the cost of recovery is redirect mapping for 3,000 URLs plus weeks of reprocessing. For bigger estates, budget for this kind of testing as part of an enterprise SEO engagement.
Questions engineers ask their SEO team
Do we need server-side rendering for SEO?
Not strictly. Google renders JavaScript, but rendering happens in a later phase and can fail, and many non-Google crawlers do not render at all. Google recommends server-side rendering, static rendering or hydration over dynamic rendering. For content that must rank, server-rendered or pre-rendered HTML is the lower-risk choice.
Is it fine to set the canonical tag with JavaScript?
Google says it is possible but not recommended, and that the best way to set the canonical URL is in the HTML. If JavaScript changes it, the value must match the original HTML and there must only be one canonical tag.
What status code should a missing product return in a single-page app?
Ideally a real 404 from the server. If the router can only decide client-side, Google’s guidance is to redirect with JavaScript to a URL that returns 404, or add a noindex robots meta tag with JavaScript, so the page is not indexed as a soft 404.
Does Googlebot read the whole HTML file?
Google’s Googlebot documentation says it crawls the first 2MB of a supported file type, and each referenced resource such as CSS or JavaScript is subject to the same limit (PDFs are allowed 64MB). Very large inline JSON payloads can push important content past that point.
Should developers add nofollow to internal links?
Rarely. Internal nofollow is mostly useful for infinite spaces such as calendars, which Google’s URL structure guidance mentions. For filters and site search, controlling which URLs exist and blocking unneeded patterns in robots.txt is usually more effective.
Putting SEO into your team’s definition of done
The practical outcome of this guide is a short list: server-rendered or pre-rendered HTML for indexable content, real status codes, real links, one canonical per page from the server, explicit production robots settings, performance budgets, and a CI job that checks them all on every release. Add an SEO reviewer to pull requests that touch routing, head templates or robots.txt, and you remove most of the risk.
If you would like a technical SEO review of an upcoming release or framework migration, our SEO team works directly with engineering teams. Request a free quote and tell us what you are shipping.
Further reading on seo for developers
- Large-Site SEO: Managing Crawling and Templates on 100,000+ Page Websites
- Python for SEO: Beginner Scripts That Save Hours
- Should Internal Search Result Pages Be Indexed?
Sources for this SEO for developers checklist
- Google Search Central: Understand JavaScript SEO basics
- Google Search Central: Dynamic rendering as a workaround
- Google Search Central: URL structure best practices
- Google Search Central: How to specify a canonical URL
- Google Search Central: Make your links crawlable
- Google Search Central: Googlebot
- Google Search Central: HTTP status codes and network errors
- web.dev: Largest Contentful Paint (LCP)
- web.dev: The most effective ways to improve Core Web Vitals




