Cloudflare
Connect Cloudflare API tokens, then manage your domains' DNS records, SSL/TLS settings and cache from ServerAvatar.
Connect a Cloudflare API token once for the organization and ServerAvatar shows the domains that token can reach. For each domain you can change the SSL/TLS and security settings, add and edit DNS records, read the edge certificates and clear the cache, without opening Cloudflare. Open Cloudflare in the organization's sidebar, in the Organization group.
The page has two tabs: Domains and API tokens. Domains shows once at least one token is connected. Until then the page opens on API tokens.
Connect a Cloudflare API token
Use a Cloudflare API Token, not the Global API Key.
-
In Cloudflare, open your profile, then API Tokens. The Open Cloudflare link on the page takes you there.
-
Select Create Token, then Custom token, then Get started. Give the token a name such as ServerAvatar.
-
Add these permissions, each under Zone:
- Zone → Read
- DNS → Edit
- Zone Settings → Edit
- SSL and Certificates → Read
- Cache Purge → Purge
-
Under Zone Resources, choose Include → All zones, or choose only the domains you want to manage. Other domains do not appear in ServerAvatar.
-
Leave Client IP filtering and TTL empty. An IP filter must allow the Central server.
-
Select Continue to summary, then Create Token. Copy the token. Cloudflare shows it only once.
-
In ServerAvatar, open the API tokens tab and select Connect token.

-
Enter a Name, for example "Main Cloudflare", and paste the API token. The dialog says: "Use a Cloudflare API Token, not the Global API Key. We check it before saving it securely." How to create an API token in the dialog repeats the steps above.

-
Select Connect token. You see "Cloudflare token saved."
ServerAvatar checks that the token can list your domains (Zone → Read). The token is stored encrypted and never shown again ("Write-only"). New domains may take up to a minute to appear.
Check, edit or disconnect a token
The API tokens tab lists each token with its Name, Status and Added date, and the domains it can reach. Status is Connected or Needs new token.
- Check token asks Cloudflare whether the token still works. You see "name is connected." or "name needs a new token."
- Edit: rename the connection, or paste a Replace API token. Leave the token empty to keep the saved one. A new token is checked before it is saved. Select Save changes. You see "Cloudflare token updated."
- Disconnect: "Its domains will disappear from this organization. Nothing changes on Cloudflare, including its DNS records and settings." Confirm with Disconnect token. You see "Cloudflare token disconnected."
When a token is refused, its domains are not shown and the list says "Token rejected. Its domains are not shown. Replace the token to reconnect." The Replace token link in the domain list takes you to the API tokens tab. Select Edit on the token there.
Find a domain
- Select the Domains tab. It lists every domain the tokens can see: "All domains visible to your organization's Cloudflare tokens."
- Read the columns: Domain (with its Cloudflare plan under it), Status (Active, Pending, Initializing, Moved, Deleted or Deactivated, and Paused when the domain is paused), API token and Nameservers.
- Use Search domains to find a domain by name. The API token filter (All tokens) shows the domains of one token.
- Select a domain to open it, or open the Open domain menu to go straight to SSL/TLS & security, DNS records or Cache.
A domain page is titled Cloudflare domain. It shows the token and plan under the name, a link back (All Cloudflare domains) and three tabs: SSL/TLS & security, DNS records and Cache.
Change SSL/TLS and security settings
Open the SSL/TLS & security tab. "Changes save to Cloudflare as soon as you make them." You see "setting updated." for each.
| Setting | Choices and what it does |
|---|---|
| SSL/TLS mode | Off, Flexible, Full or Full (strict). How Cloudflare connects to your server. Full (strict) is the safest. |
| Minimum TLS version | TLS 1.0, TLS 1.1, TLS 1.2 or TLS 1.3. Browsers older than this version can't open the site. |
| TLS 1.3 | On or off. The newest and fastest secure connection. |
| Always use HTTPS | On or off. Sends every http:// visit to https://. |
| Automatic HTTPS rewrites | On or off. Changes http:// links in your pages to https://. |
| Under Attack mode | On or off. Visitors see a short check page first. Turn it on only during an attack. |
Under the settings, Edge certificates lists the certificates Cloudflare serves to visitors, with Hostnames, Type / authority (for example Universal, Advanced, Dedicated or Custom, with the authority), Status and Expires. It is read only: "Read-only here; manage them in Cloudflare." With none it says "No edge certificates found".
Manage DNS records
Open the DNS records tab. The table shows each record's Type, Name, Content, Proxy status (Proxied or DNS only) and TTL. An MX record also shows its priority. Search DNS records and the type filter narrow the list, and it pages by 10, 25, 50 or 100.
Add a record
- Select Add record.
- Choose the Type: A, AAAA, CNAME, TXT or MX.
- Enter the Name:
@for the domain itself,wwwfor a subdomain, or*for every subdomain. - Enter the Content. Its label follows the type: IPv4 address, IPv6 address, Target hostname, Mail server or Text content.
- Choose the TTL: Auto, or 1 minute up to 1 day.
- For A, AAAA and CNAME records, choose the Proxy status. Proxied hides your server's IP and uses Cloudflare's cache and protection. DNS only lets visitors reach your server directly.
- For an MX record, enter the Priority. Lower numbers are tried first.
- Select Add record. You see "DNS record added."
Edit or delete a record
- Select Edit on a record, change it and select Save changes. You see "DNS record updated." Only A, AAAA, CNAME, TXT and MX records can be edited here.
- Select Delete on a record and confirm with Delete record. "This removes the DNS record from Cloudflare immediately. Services using it may stop working." You see "DNS record deleted."
Clear the cache
Open the Cache tab. It has three cards.
- Clear all cache removes every saved copy, so visitors get fresh pages from your server. Select Clear all, read "Every saved copy is removed. Your server gets more visits until the cache fills again.", and confirm with Clear cache. You see "Cache cleared."
- Clear specific items removes only what you list, one per line. Fill in Page or file URLs, Cache tags, Hostnames or URL prefixes, select Clear these items and confirm. Cache tags, hostnames and URL prefixes need a paid Cloudflare plan.
- Development mode turns the cache off so you see changes right away. It turns back on after 3 hours, and the card shows how long is left ("About h h m min remaining.").
Limits
- Name of a token: required, up to 100 characters. API token: 20 to 255
characters, letters, digits,
_and-, with no spaces. The same token cannot be saved twice in an organization. - Clear specific items: up to 30 URLs (each an
http://orhttps://address of up to 2048 characters), up to 100 cache tags (1024 characters each), up to 100 hostnames (253) and up to 100 URL prefixes (1024), and at least one item. - DNS records: Name up to 253 characters, or
@. Content up to 253 characters (2048 for TXT). A must be an IPv4 address and AAAA an IPv6 address. CNAME and MX need a hostname. TTL is Auto or 60 to 86400 seconds. Priority is required for MX only and is 0 to 65535. Only A, AAAA and CNAME records can be Proxied.
Who can do this
- One permission covers the page: Cloudflare (
organization.cloudflare). View shows the tokens and domains, and the domain tabs. Manage connects, edits, checks and disconnects tokens, and changes settings, DNS records and the cache. With view only the page says "You can view these connections, but cannot add, edit, check or disconnect tokens." and on a domain "You can view this domain, but cannot change its settings, DNS records or cache." - Connecting, editing, checking and disconnecting tokens needs a normal login. The personal API token is refused ("Sign in with your account to manage Cloudflare tokens."). See API reference.
- Changes are recorded in the organization's activity log, for example "Saved Cloudflare token name.", "Added type record record to domain on Cloudflare." and "Purged the whole Cloudflare cache of domain."
Common errors
- Cloudflare rejected this API token. Check that it is correct and has not expired or been revoked.
- The Cloudflare token is missing a required permission. Check its Zone permissions. Give the token Zone Read, DNS Edit, Zone Settings Edit, Cache Purge and SSL and Certificates Read.
- Cloudflare could not find this domain or record with this token. The token's Zone Resources may not include the domain.
- A DNS record like this already exists.
- Cloudflare refused this change. Check the values and try again.
- Cloudflare is receiving too many requests. Wait a minute and try again.
- Cloudflare could not be reached. Try again later.
- This Cloudflare token is already saved in the organization.
- This saved token cannot be read. Edit it and save the token again.
- No domains found. "Cloudflare has no domains visible to these tokens. Check their Zone Resources in Cloudflare."
- The TTL is 1 (automatic) or between 60 and 86400 seconds.
- Give at least one file, tag, host or prefix to purge.