Faster loading via Cloudflare
Qubix serves your domains through Cloudflare — a global network of servers — and sets everything up itself. For domains connected through the main key, a company key or a personal key, caching is on by default, so pages load several times faster for visitors while the load on your server is an order of magnitude lower. All of it is free: Cloudflare charges nothing for its network or caching, and Qubix handles the setup.
What Qubix configures automatically
When a domain is connected through Cloudflare with a key saved in Qubix, Qubix sets up its Cloudflare zone itself:
- Zone and DNS — creates the zone (or picks up the one you already have) and an
Arecord for the domain pointing at your server, proxied through Cloudflare (the orange cloud). - SSL/TLS — encryption mode Full, Always Use HTTPS on, Minimum TLS Version 1.2.
- Authenticated Origin Pulls — the Global switch under SSL/TLS → Origin Server is on: Cloudflare presents its certificate every time it connects to your server.
- Browser Cache TTL — Respect Existing Headers: browsers keep files exactly as long as your server tells them to.
- Browser Integrity Check — off: otherwise Cloudflare refuses postbacks that affiliate networks send with common server HTTP clients such as Python's urllib, Java's HttpURLConnection or Perl's LWP, and they never reach your server.
- Origin Rule «Qubix origin port …» — tells Cloudflare which port of your server to connect to.
- With faster loading on (see below) — the Cache Rule qubix:pwa-asset-cache. If faster loading on a domain was turned off through the AI assistant, the zone keeps the disabled rule qubix:pwa-asset-cache:off instead: by it Qubix knows not to turn faster loading back on. If you delete it by hand, Qubix will turn faster loading on again the next time it sets the domain up while the switch is on.
- For the domain of your panel, with the panel's faster loading on (see below) — the Cache Rule qubix:panel-static-cache for the panel's own static files on the panel's domain.
You don't have to do anything for this. Qubix applies these settings when the domain starts working through Cloudflare — for a newly connected domain, at the moment it switches to Ready. Until then the zone keeps its previous settings, and that's expected. After that Qubix doesn't put back a setting you change in Cloudflare by hand on its own. It looks again only at Browser Integrity Check: each time your server starts, Qubix turns it off in zones where it is still on by Cloudflare's default — that is, nobody has switched it yet.
A domain connected with the Through my Cloudflare option is the exception: its zone stays in your own Cloudflare account, and Qubix doesn't change its settings, even if a key to that account is saved. The connection window lists what to set there yourself — see Connect a domain through your own Cloudflare.
Your server accepts connections from Cloudflare only with Cloudflare's certificate. With Authenticated Origin Pulls off, the domain stops opening: visitors get the page 400 Bad Request — No required SSL certificate was sent. This applies to every domain served through Cloudflare, including the address of your panel if it's served through Cloudflare too.
To bring the domain back, turn the switch on again: in Cloudflare, open the domain's zone, go to SSL/TLS → Origin Server → Authenticated Origin Pulls and switch Global to On. You don't need to upload a certificate: your server trusts only Cloudflare's own one, so a certificate uploaded for the zone doesn't work either.
Keep the encryption mode at Full as well: in the Off and Flexible modes Cloudflare connects to your server without encryption and doesn't present its certificate. And don't delete the Qubix origin port rule: without it Cloudflare connects to port 443, while your server may be listening on another one — the rule's name ends with that port number.
Why Cloudflare beats a direct connection
A domain can be connected to Qubix directly, but serving it through Cloudflare wins on every count:
- Faster for the visitor — site files are served from the Cloudflare server nearest to them (see caching below).
- Less load on your server — the Cloudflare network takes the bulk of requests.
- Your server's address is hidden — the visitor connects to Cloudflare, not to your server directly. Your real server IP isn't exposed, making it harder to find and attack.
- Cloudflare takes the hit — traffic spikes and attacks are absorbed on its network and simply never reach your server.
A direct connection leaves the load on your server and exposes its address. That's why serving through Cloudflare is the preferred mode for production domains.
Both modes are available when you connect a domain: Qubix lets you choose Cloudflare or your own DNS on the spot, and the domain's zone can also stay in your own Cloudflare account. See Connect an existing domain for how to pick, and how to switch later.
Faster loading — on by default
Faster loading works by default for domains connected through the main key, a company key or a personal key — once the main key is saved, Qubix turns it on itself as soon as the domain starts working through Cloudflare. You can manage it in Qubix settings → Connections → Cloudflare, the Faster loading block, the Speed up loading via Cloudflare switch — for example, if you need to turn it off temporarily. The switch changes the zones of domains connected through the main key and company keys at once, each with the key of its own account, including domains connected earlier. It doesn't change domains connected through a personal key: such a domain gets faster loading when it starts working if the switch is on, and after that the key's owner turns it on and off through the AI assistant — see Connections. Without the main key there is no switch, and a domain connected through a personal key gets faster loading only through the assistant. If faster loading on a domain was turned off through the assistant, Qubix doesn't turn it back on by itself, even when the domain is set up again: it comes back when it is turned on through the assistant or, for domains of the main key and company keys, when the switch is pressed. Domains connected through a company key or a personal key before Qubix started speeding such domains up don't have faster loading yet: for company keys, press the switch (if it is on, turn it off and back on); for a personal key, the key's owner turns it on through the assistant. The switch doesn't reach domains connected through your own Cloudflare either: Qubix doesn't change their zones, even if a key to the account is saved.
What it gives you:
- Much faster for the visitor — page files are served from the Cloudflare server nearest the person, not from your server on the other side of the world. Landings and sites open almost instantly worldwide.
- An order of magnitude less load on your server — each page pulls dozens of static files (scripts, styles, icons, screenshots), and Cloudflare serves them from its servers. The server handles only the dynamic part — on the same hardware you serve an order of magnitude more visitors.
- Free — both caching and fast delivery across the Cloudflare network cost nothing.
Faster panel loading
The panel itself loads faster too when its domain is served through Cloudflare with the main key or a company key: its scripts, styles, fonts, icons and the files for call effects and noise suppression come from the Cloudflare server nearest to you. It is on by default and has its own switch: Qubix settings → Connections → Cloudflare, the Faster panel loading block, the Speed up the panel via Cloudflare switch. A press applies it to the zone of the panel's domain at once, and while the switch is on Qubix keeps the rule in place every hour — also after the panel moves to another domain. To take the rule out of the zone, turn the switch off.
What is cached, and what isn't
Only files that don't change are cached: scripts, styles, images, icons and site screenshots. They're safe to keep on Cloudflare's servers for any length of time.
The dynamic part always stays fresh and runs on your server: the cloaking decision and the landing itself are served per visitor and aren't cached. So the speed-up never interferes with cloaking or tracking.
What you need
Everything above — the zone setup and faster loading — works through a Cloudflare API token, the key the domain is connected through: usually the main key in Qubix settings → Connections → Cloudflare, or a company key or your personal key — see Connections. Create the token in Cloudflare Dashboard → My Profile → API Tokens. It needs these permissions, all on all zones of the account:
- Zone:Read, Zone:Edit — to find existing zones and create new ones;
- Zone.DNS:Edit — to add the domain's
Arecord; - Zone.Settings:Edit — to set SSL/TLS, Authenticated Origin Pulls, Browser Cache TTL and Browser Integrity Check. Without it Qubix can't turn Authenticated Origin Pulls on — and a domain without that switch doesn't open (see above);
- Zone.Origin Rules:Edit — for the Origin Rule «Qubix origin port …» that sends Cloudflare to your server's port;
- Zone.Cache Rules:Edit, Account.Account Rulesets:Edit, Account.Account Filter Lists:Edit — for faster loading.
Give the token these permissions before you connect a domain: Qubix applies the zone settings when the domain starts working through Cloudflare and, except for Browser Integrity Check, doesn't come back to them. If a domain went live while the token lacked Zone.Settings:Edit, set SSL/TLS, Authenticated Origin Pulls, Browser Cache TTL and Browser Integrity Check from the list above in Cloudflare by hand.
Once the main key is saved, faster loading is on: Qubix applies caching to domains connected through the main key, company keys and personal keys when they start working through Cloudflare, and your sites' files start being served from Cloudflare servers near your visitors. If the key a domain is connected through lacks the faster-loading permissions, the domain still works, just without caching. You can turn it off anytime with the Speed up loading via Cloudflare switch.