(client list at bottom of this page, or see pre-render API reference)
This page describes our server-side rendering feature. Sometimes referred to as pre-rendering or dynamic rendering, the goal is to make your website more SEO friendly by serving HTML to search engines and social media crawlers.
We have separate documentation for our simpler features: screenshots, PDFs, and scraping.
Pre-rendering quick start
Requirements for server-side rendering
Use our pre-configured pushstate server
Can be run from Node.js or Docker. Our prerendercloud-server works for both dev/test and production use of Headless-Render-API.
npm install -g prerendercloud-server
prerendercloud-server ~/path/to/build
# or
cd build && npx prerendercloud-server
If testing from your dev machine: you will need a public IP or SSH remote port forwarding (we'll prompt you for this). Use ngrok if you don't have a public IP and/or don't want to configure SSH port forwarding.
Terminology
Server-side rendering on Fly.io
See example code here: Server-side rendering on Fly.io (this Fly.io integration is how Headless-Render-API.com is hosted)
Server-Side Rendering Docker
Read more about pre-rendering using our Docker image here
# run prerendercloud-server for the current directory
docker run \
-e PRERENDER_TOKEN="my-secret-token" \
-e DEBUG=prerendercloud \
-p 9000:9000 \
-v $(pwd):/wwwroot \
prerendercloud/webserver
# run prerendercloud-server for an s3 bucket
docker run \
-e AWS_ACCESS_KEY="my-aws-key" \
-e AWS_SECRET_KEY="my-aws-secret" \
-e PRERENDER_TOKEN="my-secret-token" \
-e DEBUG=prerendercloud \
-p 9000:9000 \
prerendercloud/webserver s3://my-s3-bucket
Full client list