Staging setup
Njideka Akunyili Crosby
Created: Sep 11, 2024
Within Headlesshost you can have multiple staging sites. For the Next.js application to know what instance to use we need to pass the instance id of the staging site in the URL. If this is not configured then hot reloading of content will not work. To get started click the staging site link.
Select setup from the left menu.
Click on the "Edit details" button
Copy your domain from your Vercel project
Paste the domain in the Stage URL field.
For the website to know what staging site to render you need to add a /{instance} to the end of the URL as in the example below.
Open your staging site using the link in the right hand menu. Verify that the URL has the staging site instance id appended.
Correct:
https://react-nextjs-knowledgebase.vercel.app/b08ca852-7166-475c-a3d5-157cdcd74209/gs_intro
Wrong:
https://react-nextjs-knowledgebase.vercel.app/knowledgebase/gs_intro