Pre-production and staging websites

Michael
Written by MichaelLast updated 55 minutes ago

Most websites are built and updated on a test address before anything goes live. CookieScript supports this in two ways, made for two different situations:

Your situation

Use

Plans

Your website is not live yet. You are building it on a temporary address and want to move everything to the real domain later.

Pre-production website

All plans, including Free

Your website is already live with a CookieScript banner. You want to try banner changes on a test copy of the site first.

Staging mode

Paid plans

You cannot use both on the same banner at the same time. A banner marked as pre-production does not have staging mode — but as soon as you move it to your production domain, staging mode becomes available.

Pre-production website

When to use it

You are building a new website. Right now it only exists at a temporary address like staging.example.com, example.webflow.io or a test URL from your hosting. The real domain example.com is not online yet, so there is nothing to scan and nothing to install the banner on.

You still want to start now: scan your temporary site, set up your banner and install the code. Later, when the real domain goes live, everything should follow it — without building anything again.

How to set it up

In the banner setup wizard, enter your temporary domain as usual and tick This domain is temporary.

You can only do this while you are creating the banner, and the mark stays until you move the banner to your production domain.

Your banner then works completely normally:

  • it scans your temporary website,

  • it blocks cookies and scripts,

  • it records consents, logs and statistics as usual,

  • scheduled scans run as usual.

The only difference is that CookieScript knows this domain will change, so you get a Move to production domain button.

Moving to your production domain

When your real website goes live:

  1. Open your banner and click Move to production domain.

  2. Enter your real domain, for example example.com.

  3. Confirm.

CookieScript replaces the domain everywhere it is used for this banner — in the banner settings, in the cookie report and everywhere else. From now on this is a normal production banner.

What changes and what stays the same

After the move

Your banner code

Stays the same. The code you used on your temporary site is the same code your production site uses. Nothing to replace.

Domain in banner settings

Changed to your production domain

Cookie report

Moved to your production domain

Cookie scan

Not started automatically. Your existing report is simply moved. If your live website has different cookies, start a new scan from your dashboard.

Consents and statistics

Kept, nothing is lost

The Move to production domain button

Gone. This is a one-time action.

Staging mode

Now available (on paid plans)

Example

You build staging.example.com, tick This domain is temporary, scan the site, design your banner and add the code to your page template. Six weeks later example.com goes live with the same code already in place. You click Move to production domain, type example.com, and your banner and cookie report now belong to example.com. You do not touch your website at all. Because your live site has a few new third-party scripts, you start one manual scan to refresh the cookie report.

Common questions

Can I move the domain more than once? No, the button works once. If you need to change the domain again, contact our support and we will do it for you.

I forgot to tick the checkbox when I created my banner. What now? Banners that are not marked as pre-production do not have the button, but our support can move your domain manually at any time. Just write to us.

Should I tick it just in case? Only if the address really is temporary. If you enter the domain you plan to keep, leave the checkbox empty.

Can I remove the mark later without moving the domain? No, and you do not need to. Moving the banner to your production domain is exactly what removes it.


Staging mode

When to use it

Your website is already live and already has a CookieScript banner. You want to change the banner — its design, texts or blocking rules — but you do not want your real visitors to see unfinished work. So you test the changes on staging.example.com first, check that everything behaves correctly, and only then publish them.

Staging mode is available on paid plans. You will find it in the Staging section of your banner.

How it works

You have two banner codes:

  • your normal code, from cdn.cookie-script.com, which is on your live website;

  • your staging code, from dev-cdn.cookie-script.com, which you put on your test website.

When staging mode is on and you save the banner, your settings are written to the staging code only. Your normal code is not touched — it keeps serving the settings from the last time you saved with staging mode off, so your visitors see no changes.

When you switch staging mode off and save, your current settings are written to your normal code and go live.

Step by step

Let’s say example.com is your live site and staging.example.com is your test copy.

  1. Open the Staging page, enter your staging domain and turn on Staging mode. The domain is needed to turn staging mode on, and the staging code only works on that domain — this way it cannot end up on a real website by accident. We remember the domain, so you do not need to enter it again next time.

  2. Copy the staging banner code and add it to staging.example.com. Leave the normal code on example.com exactly as it is — do not replace it.

  3. Change your banner settings and save. Every save updates the staging banner only.

  4. Open your staging website and check the result. Cookie blocking really works here, so you can test that scripts are blocked before consent and released after it.

  5. When you are happy, turn Staging mode off and save. Your new settings go live on example.com.

Your staging code keeps working after that — it still serves the last version you saved in staging mode. The next time you turn staging mode on and save, it is simply overwritten with your new test version.

What the staging banner does and does not do

Staging banner

Cookie and script blocking

Works normally. Each code knows which website it belongs to, so blocking behaves exactly as it will on your live site.

Consents

Not recorded

Statistics and consent log

Not recorded, so your reports stay clean

Notice inside the banner

The staging banner always shows a short text saying it is a test banner. This text cannot be changed or removed.

The notice exists so that nobody uses the staging code on a real website by mistake. Never put the staging code on a public site with real visitors: those consents are not saved and cannot be used as proof of consent.

One banner keeps one set of settings

A banner stores a single configuration. Staging mode only decides where that configuration is published — it does not keep two different configurations at the same time.

So staging mode is made for testing and then publishing, not for running a permanently different banner on your test site.

If you want your test site and your live site to have two really different banners at the same time — different texts, different languages, different design — create two separate banners, one for example.com and one for staging.example.com. Each one then has its own settings and its own code.

Staging mode ON

Staging mode OFF

Scheduled scans

Paused. A scan that was planned during staging mode runs on the day you switch back to live mode.

Run normally

Manual scans

You can start them any time. They scan your staging domain.

You can start them any time. They scan your live domain.

Results of a manual scan made in staging mode

Moved to your live banner as soon as you save with staging mode off

While staging mode is on, your dashboard shows the newest staging report. When you save with staging mode off, that report becomes your live report and its domain is changed to your live domain.

If you run several scans, the newest one is always the one that counts.

Nothing is lost while you test: a missed scheduled scan is only postponed, and a cookie report made during testing follows your settings when they go live.

Example

Your banner has a monthly scan planned for the 3rd. On the 1st you turn on staging mode to try a new blocking setup. The 3rd passes with no automatic scan. On the 8th you start a manual scan of staging.example.com to check some new third-party scripts, look at the results, then turn staging mode off and save. Your live banner now has both the new settings and the cookie report from the 8th, and the postponed scheduled scan runs the same day.


Questions about both

Can I use pre-production and staging together?

Not at the same time. While a banner is marked as pre-production, staging mode is not available. After you move the banner to your production domain, you can use staging mode as usual.

Do I need to change anything on my live website when I use staging mode?

No. Your live website keeps the same code forever. You only add the staging code to your test website, once.

What do my visitors see while staging mode is on?

The banner you saved last time in live mode. Nothing changes for them.

Do consents from my staging site count towards the limits of my plan?

No. Nothing at all is recorded from the staging banner.

Can CookieScript scan a website that is protected by a password?

Yes. If your test website uses standard HTTP authentication, add the login and password in your scan settings and the scanner will reach it. If that is not possible, simply scan your live website instead and do not start a new scan for your staging domain — your cookie report does not have to come from the test site.

What happens if I move from a paid plan to the Free plan while staging mode is on?

Nothing is published automatically. Your banner keeps the settings it has until you save it again. Staging mode is no longer available to you, so you cannot change the staging banner any more, but the staging code you already have keeps working and keeps serving its last saved version.

My website is not live yet and I am on the Free plan. What can I do?

Use the pre-production option — it is available on all plans, including Free.

Did this article help you solve your issue?