{
  "id": "5ae8fe373c0e4d038f1f7c6b",
  "source": "solid:signals",
  "type": "github-document",
  "title": "server-setup",
  "content": "---\ntitle: Server setup\norder: 3\nuse_cases: \u003e-\n  ssr setup, server rendering, meta tags on server, seo optimization, initial\n  page load\ntags:\n  - ssr\n  - server\n  - meta\n  - seo\n  - setup\n  - rendering\nversion: '1.0'\ndescription: \u003e-\n  Configure server-side rendering for Solid Meta tags with MetaProvider. Learn\n  to properly inject head tags in SSR for optimal SEO and performance.\n---\n\nFor server setup, wrap your application with [`MetaProvider`](/solid-meta/reference/meta/metaprovider) on the server.\nThis component uses a `tags[]` array to pass down your head tags as part of your server-rendered payload.\nOnce rendered on the server, the component updates this array to include the tags.\n\n```js\nimport { renderToString, getAssets } from \"solid-js/web\";\nimport { MetaProvider } from \"@solidjs/meta\";\nimport App from \"./App\";\n\n// ... within the context of a request ...\nconst app = renderToString(() =\u003e (\n\t\u003cMetaProvider\u003e\n\t\t\u003cApp /\u003e\n\t\u003c/MetaProvider\u003e\n));\n\nres.send(`\n  \u003c!doctype html\u003e\n  \u003chtml\u003e\n    \u003chead\u003e\n      ${getAssets()}\n    \u003c/head\u003e\n    \u003cbody\u003e\n      \u003cdiv id=\"root\"\u003e${app}\u003c/div\u003e\n    \u003c/body\u003e\n  \u003c/html\u003e\n`);\n```",
  "url": "https://github.com/solidjs/solid-docs/blob/HEAD/src/routes/solid-meta/getting-started/server-setup.mdx",
  "metadata": {
    "path": "src/routes/solid-meta/getting-started/server-setup.mdx",
    "repo": "solidjs/solid-docs",
    "repo_url": "https://github.com/solidjs/solid-docs.git",
    "size": 1116,
    "source_type": "github"
  },
  "hash": "d6c0ab712606db9c990e250bad0b7e34097e013a78b9e3953428767875ee6347",
  "timestamp": "2026-02-23T11:43:00.191105521+01:00"
}