Render Static Sites
RenderOfficialCreated by Render
- Skill
- Tool integration
- Cloud and DevOps
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides guidance for deploying static frontends—such as React, Vue, Hugo, and Gatsby—to Render's global CDN. It covers the necessary configuration for build commands, publish paths, SPA routing, custom headers, and PR previews, ensuring optimal performance with features like Brotli compression and automatic TLS.
What it does
- Configures build commands and publish paths for various static site generators and frameworks.
- Sets up SPA fallback routing to ensure client-side navigation works correctly.
- Defines custom HTTP response headers for security and caching optimization.
- Enables PR preview environments for automated testing of changes.
- Provides guidance on choosing between static sites and web services.
When to use it
- When deploying a static site or single-page application (SPA) that does not require server-side rendering.
- When you need to configure specific redirect or rewrite rules for your site.
- When setting up security or cache-control headers for your assets.
- When you need to enable automatic preview environments for pull requests.
Advantages
- Leverages a global CDN for fast content delivery.
- Includes automatic TLS, Brotli compression, and DDoS protection.
- Supports atomic, zero-downtime deployments with immediate cache invalidation.
- Provides a free tier for static hosting.
Usage examples
- “How do I configure a React SPA on Render?”
- The agent will provide the necessary build command (e.g., npm run build), the publish path (e.g., build or dist), and the required rewrite rule to serve index.html for all routes.
- “How can I add security headers to my static site?”
- The agent will show you how to define headers in your Blueprint or Dashboard, such as adding X-Frame-Options or Cache-Control for specific paths.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/render-oss/render-static-sites/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip render-static-sites.zip -d .agents/skills
Documentation by Render
Render Static Sites
Deploys static frontends (React, Vue, Hugo, Gatsby, Docusaurus, Jekyll, etc.) to Render's global CDN with automatic TLS, Brotli compression, HTTP/2, and DDoS protection. Free tier available.
When to Use
Deploying a static site or SPA (no server-side rendering)
Choosing between a Static Site and a Web Service for a frontend
Configuring SPA fallback routing, redirects/rewrites, or custom headers
Setting up PR preview environments for a static site
Troubleshooting build failures or stale content on a CDN-hosted site
For SSR frameworks (Next.js, Nuxt, SvelteKit) that need a running server, use render-web-services instead. For Blueprint authoring, see render-blueprints.
When choosing between a static site and a web service, read references/service-types.md.
Static Site vs Web Service
| Need | Use | Why |
|---|---|---|
| Pure HTML/CSS/JS, SPA, docs, blog | Static Site | Free, global CDN, instant cache invalidation |
SSR (Next.js next start, Nuxt server) | Web Service | Needs a running Node/Python/etc. process |
| Static export from SSR framework | Static Site | If the framework supports full static export (next export, nuxt generate) |
| API backend | Web Service | Static sites cannot run server code |
Key constraint: Static sites are not on the private network. They cannot communicate with other Render services over internal hostnames.
Build and Publish
| Setting | Purpose |
|---|---|
buildCommand | Installs dependencies and builds assets (e.g. npm ci && npm run build) |
staticPublishPath | Directory of built output to serve (e.g. build, dist, public) |
Render auto-detects and installs dependencies. Set SKIP_INSTALL_DEPS=true to handle installation yourself in the build command.
Common frameworks
| Framework | Build command | Publish path |
|---|---|---|
| Create React App | npm ci && npm run build | build |
| Vite (React/Vue/Svelte) | npm ci && npm run build | dist |
| Next.js (static export) | npm ci && next build | out |
| Nuxt (static) | npm ci && nuxt generate | .output/public |
| Hugo | hugo --minify | public |
| Gatsby | npm ci && gatsby build | public |
| Docusaurus | npm ci && npm run build | build |
| Jekyll | bundle exec jekyll build | _site |
| Astro | npm ci && astro build | dist |
SPA Routing and Redirects
Single-page apps need a catch-all rule so the CDN serves index.html for all routes instead of returning 404.
Configure Redirect/Rewrite Rules in the Dashboard (Settings > Redirects/Rewrites) or via the Blueprint routes field:
routes:
- type: rewrite
source: /*
destination: /index.htmlFor multi-path redirects (e.g. old blog URLs), add specific rules above the catch-all so they take priority.
See references/routing-and-headers.md for redirect types, header rules, and caching patterns.
Custom Response Headers
Add security and performance headers from the Dashboard (Settings > Headers) or the Blueprint headers field:
headers:
- path: /*
name: X-Frame-Options
value: DENY
- path: /assets/*
name: Cache-Control
value: public, max-age=31536000, immutablePR Previews
Static sites support automatic PR previews—each pull request gets a unique URL with the built site.
Enable in Dashboard: Settings > PR Previews
Blueprint: set
previews.generationtoautomaticormanualPreview URLs follow the pattern
<service>-<pr-id>.onrender.com
Blueprint Configuration
services:
- type: web
runtime: static
name: my-frontend
buildCommand: npm ci && npm run build
staticPublishPath: dist
routes:
- type: rewrite
source: /*
destination: /index.html
headers:
- path: /*
name: X-Frame-Options
value: DENY
previews:
generation: automaticNote: Static sites use type: web with runtime: static in Blueprints. There is no separate type: static.
CDN and Performance
Global CDN with edge caching worldwide
Brotli compression (better than gzip)
HTTP/2 by default
Immediate cache invalidation on every deploy (zero-downtime, atomic deploys)
DDoS protection included
Billing
Static sites have a free tier. They count against workspace-level monthly included amounts for:
Outbound bandwidth (data served to users)
Pipeline minutes (build time)
Usage beyond included allowances can incur additional cost. Confirm current allowances and charges at Render pricing.
References
| Document | Contents |
|---|---|
references/routing-and-headers.md | Redirect types, rewrite rules, header patterns, SPA config |
references/framework-configs.md | Build commands and publish paths for 10+ frameworks |
references/service-types.md | Service-type selection and execution models |
Related Skills
render-web-services — For SSR frameworks that need a running server
render-blueprints — Full
render.yamlschema for static site fieldsrender-domains — Custom domain and TLS setup
render-deploy — Deploy flows, CLI, MCP operations
<!-- shared:documentation-retrieval -->
Current documentation retrieval
Whenever this skill directs you to consult current Render documentation:
Retrieve the linked Markdown document directly with an available URL-fetching tool or HTTP client, such as
curl. Do not substitute web-search summaries for the document.Confirm that retrieval succeeded and returned the expected document, then read its contents. Saving a file or printing its path is not sufficient.
If the request fails or your tool cannot read the Markdown response, open and read the linked HTML version instead.
If neither version can be retrieved, disclose that the current reference is unavailable and follow any topic-specific fallback in the skill. Use bundled guidance only for stable constraints, and do not guess at changeable platform details.
When a task requires multiple references, apply this workflow to each one and distinguish the documents you verified from those that remain unavailable.
<!-- /shared:documentation-retrieval -->
Files
- ATTRIBUTION.mdAdded by AutoGineer899 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md6.9 KiB
- references/framework-configs.md2.4 KiB
- references/routing-and-headers.md2.4 KiB
- references/service-types.md4.6 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
The author says: Render static sites (free tier available)
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Render
- Publisher
- Render (Official)
- Source
- render-oss/skills · skills/render-static-sites · commit b985a63
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Render.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download render-static-sites.zip