Skip to content
  • There are no suggestions because the search field is empty.

NextJs Integration Guide

This guide provides all the necessary information for integrating Prerender into your NextJS project to boost your ranking on search result pages.

Video guide:

 

Prerender token
The Prerender token has been relocated. It can now be found under the Security and Access menu under Prerender Token.

 

Text guide: 

  1.  Copy the Integration's source code from here to your NextJS project's SRC directory. Make sure to name the file middleware.js.  
  2. Add your Prerender token to the middleware.js file's source code.
    1. You can add the Prerender token to the integration's source code by replacing process.env.PRERENDER_TOKEN with your Prerender.io Token from the Security and Access menu.
      image-1706549407672
    2.  Alternatively, add your Prerender token as an environment variable. In this case, the name of the environment variable must be PRERENDER_TOKEN.
      The exact method depends on your setup. For example, you can add it from the Project Settings menu under the Environment variables settings in Vercel.
      image-1706549857190 
  3.  Push and commit your changes after the new version is deployed the integration should work. 

 


 

Verify Your Installation

After integration, it’s important to verify that everything is working as expected. We’ve provided an easy-to-follow guide to help you test your setup and confirm that Prerender is functioning properly.

 

Is the Prerender integration working on other pages?

Test if the Prerender integration works on the other pages based on this guide: Verify the integration

If you don't see the Prerender headers / IDs, then the Integration is not working, which might be why the other URL is not cached. 

 

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:

To help us resolve your issue as quickly as possible, please gather and include any relevant information, such as:

  • Error messages you're seeing
  • Steps you've already taken to troubleshoot
  • Screenshots or screen recordings (if applicable)

Providing these details up front will help our team diagnose the problem more efficiently and get you back on track faster.

 

Related Articles / FAQs: