-
Print
-
DarkLight
-
PDF
Sign up and get your Prerender.io token first if you don't have on yet.
Prerender.io officially maintained middleware:
- ExpressJS (JavaScript)
- Use the Express middleware with NuxtJs
- Rails (Ruby)
- Nginx
- Apache
- IIS
- Cloudflare
- Docker
Community maintained middleware:
- Spring (Java)
- ASP.NET MVC (C#)
- Zend Framework2 (PHP)
- Symfony 2 (PHP)
- Laravel (PHP)
- Tornado (Python)
- Django (Python)
- Spray (Scala)
- Koa (Javascript)
- Hapi (Javascript)
- HAProxy
- CloudFront
- Akamai
- Netlify
ExpressJS (Javascript)
Run this command in your node project.
shell npm install prerender-node --save
And when you set up your express app...
javascript app.use(require('prerender-node').set('prerenderToken', 'YOUR_TOKEN'));
Using the express middleware with nuxtjs
In the nuxt.config.js add a new middleware.
serverMiddleware: [
'~/prerender-middleware.js'
]
And the prerender-middleware.js :
const express = require('express')
const app = express();
app.use(require('prerender-node').set('prerenderToken', 'API TOKEN'));
module.exports = {
path: '/',
handler: app
}
Rails (Ruby)
Add the middleware gem to your Gemfile.
shell gem 'prerender_rails'
In config/environment/production.rb...
ruby config.middleware.use Rack::Prerender, prerender_token: 'YOUR_TOKEN'
Nginx
View the nginx config here:
https://github.com/prerender/prerender-nginx
Apache
View the Apache config here:
https://github.com/prerender/prerender-apache
Cloudflare
The Cloudflare integration is done using a simple worker. More details and example here: https://github.com/prerender/prerender-cloudflare-worker
Spring (Java)
Installation instructions should be in the README here:
https://github.com/greengerong/prerender-java
ASP.NET MVC (C#)
Installation instructions should be in the README here: https://github.com/greengerong/Prerender_asp_mvc
Zend Framework2 (PHP)
Installation instructions should be in the README here: https://github.com/zf-fr/zfr-prerender
Symfony 2 (PHP)
Installation instructions should be in the README here: https://github.com/rjanot/YuccaPrerenderBundle
Laravel (PHP)
Installation instructions should be in the README here:
https://github.com/codebar-ag/Laravel-Prerender
https://github.com/JeroenNoten/laravel-prerender
Tornado (Python)
Installation instructions should be in the README here: https://github.com/dailymuse/torender
Django (Python)
Installation instructions should be in the README here: https://github.com/skoczen/django-seo-js
Spray (Scala)
Installation instructions should be in the README here: https://github.com/Jarlakxen/spray-prerender
Koa (Javascript)
Installation instructions should be in the README here: https://github.com/RisingStack/koa-prerender
Hapi (Javascript)
Installation instructions should be in the README here: https://github.com/wrangr/hapi-prerender
HAProxy
View the HAProxy config here: https://gist.github.com/roylines/7dc14c419523975daaa7
CloudFront
The CloudFront integration is done using Lambda@Edge functions. View the example here: https://github.com/jinty/prerender-cloudfront/blob/master/prerender-cloudfront.yaml
Akamai
There is a blogspot that descibes the integration with akamai here: https://developer.akamai.com/blog/2020/01/14/improve-seo-akamai-and-prerenderio
Netlify
You need to ask netlify support to turn on prerender.io integration for you:
https://docs.netlify.com/site-deploys/post-processing/prerendering/