- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
This guide will walk you through integrating Prerender into your Rails server, improving your SEO.
Video guide:
You can find the required codes in the text guide.
Text guide:
- Navigate to your project's root directory. e.g.:
/home/rails/example/
- Add the middleware gem by inserting the line below into you project's Gemfile.
Usually located at/<project root directory>/Gemfile
gem 'prerender_rails'
- Then add the line below to your production config file usually located at
/<project root directory>/config/environments/production.rb
.
config.middleware.use Rack::Prerender, prerender_token: 'YOUR_TOKEN'
- Make sure to replace the YOUR_TOKEN place holder with your Prerender token from your Dashboard.
- Restart your rails server and check your Prerender integration by following this guide.
Was this article helpful?