Agent Wranglers

SEO Recommended

Send the content in the HTML

Put each page's content, metadata, links and structured data in the HTML the server sends. Don't leave them to JavaScript to build later.

How to do it

Render pages on the server or at build time (static generation). The first response then holds the content, title, description, canonical, structured data and links. Let JavaScript add behaviour only.

Example

<!-- Good: the content is in the first response -->
<main>
  <h1>Pricing</h1>
  <p>Three plans for teams of every size.</p>
</main>

<!-- Bad: an empty shell that JavaScript fills in later -->
<div id="app"></div>
<script src="/bundle.js"></script>

How to check

curl -s URL shows the full content, and the page works with JavaScript off.

Measured

On a reference site, we built the same content in the browser instead of the HTML. Mobile Performance dropped from 99 to 85, and layout shift rose from 0 to 0.295.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/seo/server-side-rendering.