Cloudflare Docs
Version Management
Visit Version Management on GitHub
Set theme to dark (⇧+D)

How it works

Version Management works through a combination of environments and versions.

​​ Environments

An environment is a place to test different versions of your zone configurations.

When you first enable version management, Cloudflare will automatically create three environments for you:

  • Development: Meant to validate that changes work correctly. The default traffic filters are that the cf.zone.name matches your zone name, the Edge Server IP is a specific value, and the request contains a cookie with development=true.
  • Staging: Meant to test changes before sending them to Production. The default traffic filters are that the cf.zone.name matches your zone name and the Edge Server IP is a specific value.
  • Production: Meant to hold all settings applied to your zone. You cannot edit the traffic filters - which are just that the cf.zone.name is equal to your zone’s name - and cannot delete this environment.

When you create a new version, that version will be available to apply to your Development environment (or whatever environment has the lowest rank). Once you test a version in your Development environment, you would promote that version to the Staging environment and - with no issues - then promote it to Production.

To send traffic to specific environments, send requests to that environment that match the pattern specified in its traffic filters.

​​ Versions

A version is a collection of configuration settings related to your zone, such as Firewall Rules, Page Rules, and other optimization settings.

Once you enable Version Management, Cloudflare will automatically create:

  • Version Zero of your zone, which duplicates all existing settings that are compatible with version management. Since this version is initially applied to your read-only Production environment, you cannot edit any settings.
  • Version 1 of your zone, which is the same as Version Zero but its settings can be updated and applied to environments.
  • Global Settings, which controls the settings that are not compatible with version management.

Any changes made to Global Settings will immediately apply to your zone and all versions of your zone.

Cloudflare also automatically creates environments for Production, Staging, and Development.

When your version is ready, you would then test and promote it through various environments until it reaches Production (or whatever your final environment is).

You can create a new version at any time by choosing to Clone an existing version, which automatically copies over configuration settings from an existing version.

Version settings are applied to zone traffic when you when you promote a version to a new environment and then send traffic to that environment that matches the pattern specified in its traffic filters.