securitylevel with the /go/securitylevel Command

/go/securitylevel changes a domain's Security Level setting on Cloudflare through the Cloudflare API. The security level controls how aggressively Cloudflare challenges visitors it considers suspicious. Use it to: It can target: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Challenge more visitors on one domain
/go/securitylevel example.com high

# Turn on Under Attack Mode for every hosted domain
/go/securitylevel all under_attack

# Return every hosted domain to normal
/go/securitylevel all medium

Arguments

Position Argument Required Notes
1 <domain> or all Yes A hosted domain exactly as it appears in /home, or all for every hosted domain.
2 <level> Yes One of the values in Levels. Any other value, or no value, sets medium.

Levels

Matching is case-sensitive.

You type Applied to Cloudflare What it does
medium medium Normal protection. Challenges visitors Cloudflare rates as a moderate threat.
high high Stronger protection. Challenges more visitors.
under_attack under_attack Under Attack Mode. Every visitor sees a Cloudflare challenge page before reaching the site.
underattack under_attack Same as above.
under attack under_attack Same as above. Quote it: "under attack".
Anything else (low, High, a typo, nothing) medium No error is shown.

[!WARNING]
A typo or a missing level does not fail. It sets medium, which can silently lower a site that is currently on high or under_attack. Always check the level printed after the domain name, for example example.com (high)....

The Cloudflare levels essentially_off and low cannot be set with this command.

Examples

# One domain, strong protection
/go/securitylevel example.com high

# Spaces in the level need quotes
/go/securitylevel example.com "under attack"

# Under Attack Mode on every site during an attack, then back to normal
/go/securitylevel all under_attack
/go/securitylevel all medium

# Confirm the change was accepted
/go/securitylevel example.com high | grep -c '"success":true'

# Review recent calls
tail /var/log/go/securitylevel.log

Output

For each domain, the command prints one progress line, then the raw JSON that Cloudflare returned. It does not read the JSON, so the command always ends normally, even when Cloudflare rejects the change. Check the JSON for "success": true.

Single domain

example.com (high)...
{"result":{"id":"security_level","value":"high","editable":true,"modified_on":"2026-11-21T01:23:00.000000Z"},"success":true,"errors":[],"messages":[]}

All domains

Each line starts with a counter, [position/total].

[1/2] example.com (under_attack)...
{"result":{"id":"security_level","value":"under_attack",...},"success":true,"errors":[],"messages":[]}
[2/2] example.org (under_attack)...
{"result":{"id":"security_level","value":"under_attack",...},"success":true,"errors":[],"messages":[]}

Nothing printed

For a single domain, the command prints nothing if /home/<domain>/www doesn’t exist. This is not an error message; the domain was simply skipped.

See the full reference at /go/securitylevel and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *