How Can I Integrate Prerender With My React/Angular/Vue Application?
Prerender improves SEO for SPAs by integrating it with a CDN or web server (like Nginx, Apache, or Node.js), ensuring proper functionality and caching for better performance.
Prerender is an excellent solution for enhancing the SEO of single-page applications (SPAs) developed with frameworks like React, Angular, and Vue. These frameworks are client-side JavaScript frameworks that operate in the browser after the initial HTTP request is made and the page has loaded. Since they cannot detect the requester's user agent or rewrite the URL to forward the request to the Prerender service before fulfilling the request, you need to integrate Prerender into another system component to achieve proper functionality.
For the best results, it is recommended that Prerender be integrated as close to the visitors as possible. Ideally, this should be done at the CDN or reverse proxy level. If that's not feasible, you should integrate Prerender directly into your web server.
-
CDN integration:
-
Web server integration:
-
Nginx integration
We have three available Nginx integrations for the use cases of Nginx.
- Single Page Application: nginx.conf
- PHP application: nginx-php/nginx.conf
- Reverse proxy: nginx-reverse-proxy/nginx.conf
-
Apache webserver
-
Node.js with Express: for Node.js applications using Express, you can use the prerender-node middleware:
const prerenderMiddleware = require('prerender-node');
app.use(prerenderMiddleware.set('prerenderToken', 'YOUR_TOKEN'));
-
Getting an Error?
If you see the message "Prerender Integration Not Detected," you can refer to the troubleshooting guide here to help resolve the issue.
Expert Assistance
For those who need additional help or want to ensure a smooth and secure launch, we offer a specialized package:
Kickstart Package
Price: $800 (one-time payment)
This one-time package empowers you with expert setup and configuration, ensuring a smooth and secure launch.
Features:
-
- Three setup and configuration sessions with our experts
- Onboarding assistance
- Security assessment
To learn more about this package or to purchase, visit the Packages section under the Billing menu in your Prerender dashboard.
Get Support
If you're still encountering issues after implementing Prerender:
- Review your implementation against our documentation
- Contact our support team:
- Email: support@prerender.io
- Chat: Available from your Prerender dashboard
Related Articles:
- Available integrations
- Troubleshooting Apache .htaccess integration
- What should I do if I receive a 'Prerender integration not detected' error?
- How Can I Integrate Prerender If I'm Using a Hosting Platform That Doesn't Allow Direct Server Access?
- How Does Prerender Work With CDNs Like Cloudflare, Fastly, or Akamai?
- How to check cached versions of your URLs?
- How to Fix CSS Caching Issues in React Sites?
- Why Am I Seeing 403 or 404 Errors After Integrating Prerender?
- What to do if some pages are not getting cached
- How to add additional bots (integrations maintained by Prerender)
- How to add multiple domains?