Rotate a token
Last reviewed
Open the domain's Settings (or Setup) page and press Rotate token. A new token is shown once, and the old one stops working at once, so update your integration right away.
Steps
- Open the domain in the dashboard and go to Settings or Setup.
- Press Rotate token and confirm.
- Copy the new token. It is shown only this once.
- Replace the value of
PREBAKED_TOKENwhere your integration runs: a Worker secret, your hosting provider's environment variables or your server's.env. - Redeploy or restart if your platform needs it, then check that it works.
Between steps 2 and 4, crawler requests with the old token get 401 from Prebaked. The integrations then serve your own page, so crawlers still get a response.
When to rotate
- You lost the token. Prebaked stores only a hash of it, so it cannot be shown again.
- You think the token leaked. Rotate it and tell us at hello@prebaked.io.
- Someone who had the token no longer works on the site.
Each domain has its own token. Rotating one does not change your other domains.
If you use the Cloudflare one-click install, connecting again also creates a new token and puts it in the Worker for you.
FAQ
I lost my token. Can I see it again?
No. Prebaked stores only a hash of the token. Rotate it to get a new one.
Does rotating a token affect my other domains?
No. Each domain has its own token, and the other domains keep theirs.
What happens to crawlers while I update the token?
Requests with the old token get 401. With the recommended setup your integration then serves your own page, so crawlers are not shown an error.
My token leaked. What do I do?
Rotate it in the dashboard at once, update your integration and tell us at hello@prebaked.io.