Cloudflare on SharkCluster: DNS, Activation, Security and Caching

Put a domain behind Cloudflare with SharkCluster: the DNS records it needs, how activation works, and every tab of the Cloudflare dashboard, from security rules and caching to redirects, Origin Protection and alerts.

12 min read, 16 sections, Updated , Published

SharkCluster's Cloudflare option puts one of your domains behind Cloudflare's network, which gives it an edge SSL certificate, caching and DDoS protection, plus a dashboard for security rules, redirects, caching and analytics. The domain is added to SharkCluster's own Cloudflare account, so you do not need a Cloudflare account of your own: you only point a DNS record at your application.

Getting here: Servers → select a server → Applications → select an application → Cloudflare. You can also open it from a domain's More options menu on the Domains page by choosing Cloudflare Dashboard.

1. Before You Start

  • Cloudflare is available for your own domains and subdomains, not for the application's SharkCluster address.
  • It is a paid add-on, charged per domain per month. The price is shown next to the option when you turn it on, and if a free trial is offered, the option shows how many days it lasts. Billing stops when you turn Cloudflare off for the domain.
  • You need access to your domain's DNS settings at your DNS provider, to add a CNAME record.
  • The Cloudflare dashboard shows data only for the application's primary domain.

2. Turning Cloudflare On

For a New Domain

  1. 1On the Domains page, click Add domain and enter the domain.
  2. 2In Settings, turn on Proxy through Cloudflare.
  3. 3In Point DNS, add the records shown (see section 3), click Check DNS, then Save Domain.

For an Existing Domain

  1. 1On the Domains page, open the domain's More options menu and choose Domain Settings & Redirects.
  2. 2Turn on Proxy through Cloudflare and save.
  3. 3Change the domain's DNS record to the one shown (see section 3) and click Check DNS.

With Cloudflare on, the Required DNS Records table shows Routing: Cloudflare Proxy (CNAME).

3. DNS Records for Cloudflare

With Cloudflare on, your domain points to your application's SharkCluster address with a CNAME record instead of pointing to the server's IP address with an A record. The Required DNS Records table shows the exact values to copy.

Your domainRecords to add
Subdomain (app.example.com)A CNAME for the subdomain pointing to your SharkCluster address.
Root domain (example.com)A CNAME for @ and a CNAME for www, both pointing to your SharkCluster address.
www domain (www.example.com)A CNAME for www pointing to your SharkCluster address, and an A record for @ pointing to the server's IP address.

If your domain's DNS is hosted at Cloudflare under your own account, set these records to DNS only (grey cloud). SharkCluster's Cloudflare option provides the proxy itself.

When you click Check DNS, each record shows one of these results:

ResultWhat it means
VerifiedThe record is correct.
Not verifiedThe record was not found yet, or it points somewhere else.
Record MismatchAn A record was found, but Cloudflare needs a CNAME. Replace the A record with the CNAME shown, or turn Cloudflare off.
Proxy MismatchThe domain points to Cloudflare's proxy, but Cloudflare is off for this domain in SharkCluster. Turn Cloudflare on, or point an A record directly to the server's IP address.

4. Activation and the Domain Card

Once the CNAME is found, SharkCluster registers the domain with Cloudflare. Cloudflare then validates it and issues an edge SSL certificate. This usually takes about a minute but can take longer, up to a couple of hours. The Domains page refreshes every 20 seconds, and a message appears when Cloudflare is fully active for the domain.

The card showsMeaning
Routing: Cloudflare (Pending CNAME)DNS has not been verified yet.
Cloudflare SSL Deploying, HTTPS: Cloudflare SSL deploying (~1 min), Routing: Cloudflare - setting upDNS is verified and Cloudflare is issuing the edge certificate.
HTTPS: Cloudflare edge certificate, Routing: Cloudflare proxy onCloudflare is fully active.

Cloudflare provides the HTTPS certificate for the domain, so you do not need a Let's Encrypt certificate for it. SSL Management shows the certificate type as Cloudflare Edge SSL.

5. Opening the Cloudflare Dashboard

Open Cloudflare from the application's menu, or Cloudflare Dashboard from a Cloudflare domain's More options menu. Click Back to Domains to return. Instead of the dashboard, you may see:

MessageWhat to do
No Domain FoundAdd a domain to the application first.
Cloudflare is Not EnabledTurn on Proxy through Cloudflare for the domain on the Domains page.
Set Domain as PrimaryThe dashboard only works for the primary domain. Make this domain primary on the Domains page.

The dashboard has eight tabs: Overview, Security, Performance, Redirects, Analytics, Advanced Rules, Origin Protection and Notifications. Some features need a Cloudflare Pro plan on SharkCluster's Cloudflare account; these are greyed out with a Pro Required label. A setting marked Unavailable could not be read from Cloudflare.

6. Overview

  • Status cards: Protection Status, SSL Status, Hostname and Proxy Mode for the domain.
  • Traffic: Requests Today, Blocked Requests, Rate Limited, Bandwidth Saved and Cache Hit Ratio, each with its change. Rate Limited needs a Pro plan.
  • Quick Actions: shortcuts to Origin Protection, Clear Cache, Security Settings and Performance.
  • Protection Status: whether DDoS Protection, Origin Protection, SSL / TLS, Country Rules, Rate Limiting and Bot Protection are Active or Off.
  • Recent Firewall Events: the latest security events from the last 24 hours. View All opens Analytics. This needs a Pro plan.

7. Security

Most security settings apply when you click Save Security Settings at the bottom of the tab. URL Lockdown rules are the exception: they are added and removed straight away. After saving, an amber note under a section means the current Cloudflare plan limits that feature, and a red note means it failed to save.

SectionWhat it does
DDoS ProtectionShows the DDoS protection status, level, mode and last event. It is always on and cannot be changed here.
Country RestrictionsDisabled, Allow Countries (only the listed countries can visit) or Block Countries (the listed countries cannot). Enter two-letter country codes such as US, GB or IN, pressing Enter after each.
IP Access ControlNot available per domain, because Cloudflare IP Access Rules would apply to every domain on SharkCluster's account. Use Admin Area Protection or URL Lockdown instead.
Admin Area ProtectionAllows only the IP addresses you list (comma-separated, CIDR ranges allowed) to open /wp-admin, /admin and similar paths.
URL LockdownAllows only chosen IPs to open specific paths. Enter one or more paths and IPs, then click Add Lockdown Rule. Remove a rule with its - button.
Login ProtectionRestricts a login path (default /login) to the countries and IPs you list. Visitors matching an allowed country or an allowed IP get through; everyone else is blocked.
Rate LimitingLimits how often one visitor can request a path. Defaults: path /*, 25 requests per 10 seconds, action Block for 60 seconds. The action can also be Challenge or Managed Challenge. A summary line shows the active rule.
Bot ProtectionFour switches: Protect Login Pages (challenge on /login), Protect Admin Pages (challenge on /admin and /wp-admin), Block Common Scrapers (blocks curl, wget and python-requests) and Challenge Unknown Bots.
Maintenance ModeBlocks all visitors except the IPs you list, so you can keep working on the site.
Force HTTPSRedirects all HTTP requests to HTTPS with a permanent (301) redirect.

8. Performance

Performance Profile

Choose a caching strategy and click Save Performance Profile. SharkCluster creates the matching Cloudflare cache rule for this domain only.

ProfileCaching
Dynamic WebsiteLight caching for static files only; pages always stay fresh. This is the default.
E-CommerceCaches static files; cart, checkout and account pages always bypass the cache.
Static WebsiteAggressive caching across the whole site for maximum speed.
Download HostingLong caching tuned for large files such as zip, pdf and media.
API ServiceCaching turned off; responses are never cached.
CustomNo SharkCluster cache rule. Configure caching yourself if needed.

Cache Purge

Click Clear Cache to remove this domain's cached content from Cloudflare, for example after a deployment. Only this domain's cache is cleared. The card shows when the cache was last cleared and by whom.

9. Redirects

Redirects run at Cloudflare's edge, before requests reach your server. Choose a tab, fill in the form, pick 301 (permanent) or 302 (temporary), and click the add button. Each redirect can be edited or deleted from its table.

TabFieldsExample
URL RedirectsSource Path and Destination URL/old-path or /old/* to /new-path or https://destination.com
Domain RedirectsSource Domain (without http://) and Destination Domainold-domain.com to new-domain.com
Geo RedirectsCountry and Destination URLVisitors from India to https://india.example.com

Geo redirects can target India, the United States, the United Kingdom, Canada, Australia, Germany, France, the United Arab Emirates and Singapore.

10. Analytics

Choose 24h, 7d or 30d. The tab shows total requests, bandwidth saved, threats stopped and average cache hit rate, then Traffic Overview, Cache Performance, Top Countries, Top Blocked Countries, Top Blocked IPs and Recent Security Events.

Without a Cloudflare Pro plan, the 7-day and 30-day views and the detailed charts are locked and show Cloudflare Pro Plan Required.

11. Advanced Rules

Custom Firewall Rules

Build a rule as IF a condition, THEN an action, give it a Rule Name, and click Add Rule.

PartOptions
IF fieldCountry, IP Address, URI Path or User Agent
Operatorequals, does not equal or contains
ValueFor example RU, /admin or an IP address
THEN actionAllow, Block, Challenge or Rate limit

Each rule can be disabled and enabled again, edited or deleted.

Hotlink Protection

Stops other websites from embedding your images and media. The switch applies straight away.

Custom Error Pages

Shows your own page from Cloudflare for 403, 404, 429, 500 and 503 errors. Choose the error code, enter the Custom Page URL and click Save Configuration. This needs a Cloudflare Pro plan.

12. Origin Protection

Origin Protection makes your server accept web traffic only from Cloudflare, so visitors cannot bypass Cloudflare by using the server's IP address. The tab runs five checks, each marked Pass or Action Needed, and shows Fully Protected, Partially Protected or Not Protected:

CheckPasses when
Cloudflare Proxy EnabledCloudflare is on for the domain.
Firewall Restricted to CloudflareThe server's firewall only accepts web traffic from Cloudflare's IP ranges.
Origin ReachableThe web server responds on the server.
SSL ActiveSSL is active at Cloudflare.
Origin IP HiddenCloudflare is on and the firewall is restricted.

Show Ranges lists Cloudflare's IPv4 and IPv6 ranges. Enable Protection applies the firewall rules automatically. When all five checks pass, the button changes to Disable Protection, which opens ports 80 and 443 to all visitors again.

13. Notifications

Turn on Email Notifications, enter the Notification Email, choose the alerts you want, and click Save Notification Settings. If you changed any alerts, a confirmation email lists the changes.

GroupAlerts
SSL & CertificatesSSL Failure, SSL Renewal, Hostname Validation Failure
Security EventsRate Limit Triggered, Firewall Rule Triggered, Origin Protection Disabled
OperationsMaintenance Enabled, Maintenance Disabled

SharkCluster checks every Cloudflare domain every 15 minutes and emails you if its SSL certificate or hostname validation fails, when those alerts are on.

14. Turning Cloudflare Off

  1. 1On the Domains page, open the domain's More options menu and choose Domain Settings & Redirects.
  2. 2Turn off Proxy through Cloudflare and save.
  3. 3At your DNS provider, replace the CNAME with the record now shown in the table, usually an A record pointing to the server's IP address, and click Check DNS.

The domain is removed from Cloudflare and billing for it stops. Its Cloudflare security rules, redirects and caching no longer apply. If Automatic HTTPS & SSL is on, a Let's Encrypt certificate is issued once DNS points to the server. If Origin Protection is enabled, disable it first.

15. Common Problems

ProblemWhat to check
Record MismatchAn A record is in place but Cloudflare needs a CNAME. Replace it with the CNAME shown.
Proxy Mismatch or Cloudflare Error 1001The domain points to Cloudflare but Cloudflare is off in SharkCluster. Use Fix: Turn ON Cloudflare on the card, or point an A record to the server's IP address.
Your DNS provider will not accept a CNAME for the root domainUse an ALIAS, ANAME or flattened CNAME record, or use the www address as the primary domain.
Cloudflare SSL Deploying for a long timeCloudflare is still validating the domain. Check that the CNAME is still correct; validation can take up to a couple of hours.
The dashboard says Set Domain as PrimaryMake the Cloudflare domain the application's primary domain.
A section shows an amber note after savingThe feature is limited by the current Cloudflare plan. Other settings were saved.
You locked yourself outAdmin Area Protection, Login Protection or Maintenance Mode is blocking your IP. Add your IP from another network, or turn the setting off.
Other sites on the server stopped loadingOrigin Protection is restricting the whole server to Cloudflare. Disable it, or put those domains behind Cloudflare too.
Changes do not show on the siteClick Clear Cache on the Performance tab.

16. Related Pages

WhereWhat it covers
Domains & SSLAdding domains, DNS records, Let's Encrypt certificates and the primary domain.
FirewallThe server's firewall rules, including the ones Origin Protection adds.
Maintenance ModeA maintenance page served by your server, without Cloudflare.

Frequently asked questions

Which DNS records does a domain need for Cloudflare?

The domain points to your application's SharkCluster address with a CNAME record instead of an A record. For a root domain, use your DNS provider's ALIAS, ANAME or CNAME flattening if it does not allow a CNAME on @.

What is Cloudflare Origin Protection?

Origin Protection makes your server accept web traffic only from Cloudflare, so visitors cannot bypass Cloudflare by using the server's IP address. The tab runs five checks and shows whether the domain is fully protected.

How long does Cloudflare activation take?

After the CNAME is found, Cloudflare validates the domain and issues an edge SSL certificate. This usually takes about a minute but can take up to a couple of hours.

What does SharkCluster's Cloudflare option provide?

It puts one of your domains behind Cloudflare's network for an edge SSL certificate, caching and DDoS protection, with a dashboard for security rules, redirects, caching and analytics. It is a paid add-on charged per domain per month.

Something here not matching what you see in the panel?

Start your journey today

How do you start with SharkCluster?

Create a SharkCluster account, then create your first server on DigitalOcean, Contabo or OVHcloud. SharkCluster provisions it, installs your stack, and handles the firewall, backups and health alerts from one panel. You can start without a credit card and with no lock-in contract.

No lock-in contractsNo credit card requiredSupport replies within one business day