Staging environment?

I’ve been pondering for a few weeks now a good way to actually separate my worker scripts into staging and production (and other) environments. There’s a page called debugging tips in the documentation for workers that recommends using a “staging site”. However, as a hobbyist web developer, this would effectively double my costs with a second domain name and a second workers subscription.

I thought I could get away with using a subdomain as an independent site and only paying the second subscription, but they’ve thought of that, giving me an error code 1116. It doesn’t really make sense to disallow that, but that’s a different issue.

What is the most cost effective way to setup a proper testing/staging environment for workers? i.e. without registering another domain name.

Is this something that the workers team is thinking about? or is this a ploy to make people register more domain names?

:wave: @ssttevee

FWIW freenom will allow you to register a free domain name which can be used on Cloudflare.


So it turns out that using workers with a second domain isn’t costing me anything?

Whether this is a bug or not is beyond me, but it certainly contradicts what this Help Center article says about it.

Yes, it won’t cost you extra $5 for additional domains. Workers are billed per account, not per domain.

You pay $5 monthly and if you keep total requests under 10 million all over your domains, you won’t be charged anything extra.

Source: I have Workers enabled on 3 different domains for testing and my bill is only $5/month for workers.


You are correct, but it’s just a temporary (or not so temporary) bug. It shouldn’t be this way and the team confirmed it to me, they will change it to what the KB article mentioned by @ssttevee says.

1 Like

Well, this is first time when I can use “It’s not a bug, it’s a feature!” without sarcasm :sweat_smile::+1:

1 Like