What is Cloudflare?

Learn what Cloudflare is, how CDN, DDoS protection, and WAF work. A practical configuration guide with examples. Check out the benefits for SEO and website security.

Table of contents

1. What is Cloudflare?

Cloudflare is a global network services platform that combines the functions of a proxy server, a content delivery network (CDN), a DNS system, and advanced security mechanisms. The company was founded in 2009 by Matthew Prince, Lee Holloway, and Michelle Zatlyn, and currently serves approximately 21% of all websites worldwide.

In practice, Cloudflare acts as an intermediary between the user and the server hosting the website. When someone enters your website address in their browser, the request first goes to Cloudflare's infrastructure, where it is analysed, optimised and secured before reaching the destination server.

The main benefits of using Cloudflare

  • Faster page loading thanks to a global CDN network with over 330 locations
  • Protection against DDoS attacks at no extra cost
  • Free SSL/TLS certificate for every domain
  • Advanced web application firewall (WAF)
  • Optimisation of images and source code
  • Hiding the server's real IP address

Who is Cloudflare for?

Cloudflare works well for both small blogs and large corporations. The free plan offers a surprising number of features, making it ideal for:

  • Owners of company websites and business cards
  • E-commerce shops (WooCommerce, PrestaShop, Magento)
  • Web applications and SaaS
  • Blogs and content portals
  • APIs and microservices

2. History and development of Cloudflare

Cloudflare's history dates back to Project Honey Pot, which Matthew Prince and Lee Holloway ran from 2004 onwards. The project tracked the sources of spam and malicious traffic on the internet, giving its creators a unique insight into the threats lurking online.

The name ‘Cloudflare’ was created as an alternative to the original proposal, ‘WebWall’ – the creators decided that it better reflected the idea of building a firewall in the cloud. The company officially launched in September 2010 during the TechCrunch Disrupt conference.

Cloudflare Milestones

YearEvent
2009The establishment of the company by Prince, Holloway and Zatlyn
2010Official launch of the service at TechCrunch Disrupt
2014Launch of Project Galileo – free protection for non-profit organisations
2017Introducing Cloudflare Workers – serverless at the edge
2019Listing on the NYSE under the symbol NET
2023Launch of Workers AI – AI models at the edge of the network
2025Acquisition of Replicate – a platform for running ML models

Interesting fact

Cloudflare's headquarters in San Francisco features a wall of lava lamps that serve as a source of randomness for generating cryptographic keys. This innovative solution uses the unpredictable movements of ‘lava’ as a source of entropy. In the London office, they use double pendulums for this purpose, and in Singapore, a Geiger counter.

3. Jak działa Cloudflare – architektura i mechanizmy

Understanding Cloudflare's architecture is key to effectively utilising all of the platform's capabilities. Cloudflare acts as a reverse proxy, which means that all traffic to your website passes through their infrastructure.

3.1. Traffic flow through Cloudflare

When a user enters your website address in a browser, the query goes through the following stages:

  1. The DNS query goes to Cloudflare servers (Anycast DNS)
  2. Cloudflare directs traffic to the nearest data centre (over 330 locations)
  3. Security analysis is initiated (DDoS, WAF, Bot Management)
  4. The CDN cache is being checked.
  5. If the content is in the cache, it is returned to the user immediately.
  6. If not, the query is forwarded to the source server.
  7. Response optimised and delivered to the user

3.2. Traffic Sequence

Cloudflare processes each request through a series of layers in a specific order. Understanding this sequence allows you to better configure rules and troubleshoot issues:

LayerFunction
1. DDoS ProtectionFirst line of defence – detecting and blocking volumetric attacks
2. URL RewritesRedirects and URL modifications before further processing
3. IP Access RulesBlocking or allowing traffic from specific IP addresses
4. Bot ManagementIdentification and filtering of automated traffic (bots)
5. WAFApplication firewall – protection against SQL injection, XSS, CSRF
6. Cache RulesCache rules – what to cache and for how long
7. WorkersCustom JavaScript logic at the edge of the network

3.3. CDN technology

The Content Delivery Network (CDN) is at the heart of Cloudflare's performance. The network consists of over 330 data centres located around the world, allowing it to serve approximately 95% of internet users with a latency of less than 50 milliseconds.

CDN stores copies of static website resources (images, CSS, JavaScript, fonts) on multiple servers. When a user requests access to a website, the content is delivered from the nearest geographical location, which drastically reduces loading times.

What does Cloudflare cache by default?

  • Images: jpg, jpeg, png, gif, webp, ico, svg
  • Styles: css
  • Scripts: js
  • Fonts: woff, woff2, ttf, eot
  • Documents: pdf
  • Multimedia: mp3, mp4, webm

3.4. Anycast DNS

Cloudflare uses Anycast technology, which allows the same IP address to be advertised from multiple locations around the world. When a user sends a DNS query, it is automatically routed to the geographically closest server.

Cloudflare's average DNS response time is under 15 milliseconds, making it one of the fastest DNS systems in the world.

4. Main features and services of Cloudflare

4.1. Protection against DDoS attacks

Distributed Denial of Service (DDoS) is one of the most common and destructive types of attacks on the internet. It involves flooding a server with a huge number of requests, leading to its overload and the unavailability of the website.

Cloudflare offers unlimited DDoS protection on all plans, including the free one. The network can handle attacks exceeding 100 Tbps (terabits per second), automatically detecting and neutralising threats at layers 3, 4 and 7.

How does DDoS protection work?

  1. Real-time traffic pattern analysis
  2. Automatic anomaly detection (sudden increase in queries, unusual sources)
  3. Distributed attack on a global network of 330+ data centres
  4. Filtering malicious traffic while allowing legitimate users to pass through

4.2. Web Application Firewall (WAF)

WAF is an advanced firewall that protects web applications from common vulnerabilities and attacks. Cloudflare WAF analyses every incoming HTTP/HTTPS request and blocks those that match known attack patterns.

What does WAF protect against?

  • SQL Injection – injecting malicious SQL queries
  • Cross-Site Scripting (XSS) – injecting malicious JavaScript
  • Cross-Site Request Forgery (CSRF) – forcing actions on behalf of the user
  • Remote File Inclusion – attempts to include external files
  • Directory Traversal – attempts to access restricted directories
  • Brute Force – attempts to guess passwords

4.3. SSL/TLS and encryption

Cloudflare offers free SSL/TLS certificates for all domains, ensuring encryption of the connection between the user and the server. This is crucial for both security and SEO – Google treats HTTPS as a ranking factor.

SSL modes in Cloudflare

ModeDescription
OffNo encryption – not recommended
FlexibleHTTPS only between the user and Cloudflare (HTTP origin server)
FullHTTPS throughout the entire route, without server certificate verification
Full (Strict)Full encryption with certificate verification – RECOMMENDED

Recommendation: Always use Full (Strict) mode in conjunction with Cloudflare's free Origin CA certificate installed on your origin server.

4.4. DNS and domain management

Cloudflare DNS is one of the fastest DNS systems in the world, offering an average response time of less than 15 milliseconds. Anycast technology ensures that DNS queries are routed to the nearest data centre.

Advantages of Cloudflare DNS

  • Instant propagation of changes (usually less than 5 minutes)
  • Protection against DNS Amplification attacks
  • DNSSEC support (cryptographic signing)
  • Proxy option (orange cloud) or DNS only (grey cloud)

4.5. Bot Management

Cloudflare distinguishes between good bots (Googlebot, Bingbot) and malicious ones. The system analyses:

  • User-Agent signature
  • Behaviour patterns
  • IP reputation
  • Solving JavaScript challenges

The free plan includes Bot Fight Mode, which automatically blocks the most aggressive bots.

5. Cloudflare and SEO – impact on search engine optimisation

Cloudflare has a direct impact on a website's search engine ranking. Google has been communicating for years that page load speed is one of the ranking factors, and the introduction of Core Web Vitals in 2021 further emphasised this.

5.1. How does Cloudflare improve Core Web Vitals?

MetricsJak Cloudflare pomaga?
LCP (Largest Contentful Paint)CDN reduces the delivery time of main content, image optimisation reduces their size
INP (Interaction to Next Paint)JS minification and Rocket Loader speed up script execution
CLS (Cumulative Layout Shift)Polish preserves image dimensions, Early Hints speeds up resource loading

5.2. Cloudflare features that support SEO

Image optimisation (Polish and Image Resizing)

Polish automatically compresses images losslessly or with loss, reducing their size by up to 35% without noticeable loss of quality. Image Resizing allows you to serve images in sizes appropriate for different devices.

Code minification

Cloudflare can automatically minify HTML, CSS, and JavaScript by removing unnecessary whitespace, comments, and formatting. This reduces file size and speeds up downloads.

Rocket Loader

Rocket Loader is an asynchronous JavaScript loading feature that delays the execution of scripts until the page is fully loaded. It drastically improves Time to Interactive (TTI) and INP.

Note: Rocket Loader may cause conflicts with some scripts. Test thoroughly before enabling it in production.

Early Hints (103)

Early Hints allows Cloudflare to send ‘hints’ to the browser about resources that will be needed before the full response is generated. The browser can start downloading CSS, fonts, or images in parallel.

HTTP/3 i QUIC

Cloudflare supports the latest HTTP/3 and QUIC protocols, which offer faster connection establishment and better performance over unstable connections (especially mobile).

5.3. Can Cloudflare harm SEO?

When configured correctly, Cloudflare does not harm SEO. However, there are situations that should be avoided:

  • ❌ Do not block Googlebot in IP access rules or WAF.
  • ❌ Avoid using ‘Under Attack’ mode for normal traffic (it increases loading time).
  • ❌ Ensure that redirects (e.g., www → non-www) are configured correctly.
  • ❌ Check that the cache is not serving outdated versions of the page.

5.4. Wpływ na indeksowanie

Cloudflare nie zmienia sposobu indeksowania strony przez Google. Googlebot bez problemu:

  • Rozpoznaje i przepuszcza ruch przez Cloudflare
  • Indeksuje treści serwowane z CDN
  • Obsługuje przekierowania Cloudflare
  • Radzi sobie z Early Hints

6. Step-by-step Cloudflare configuration

The process of implementing Cloudflare is relatively straightforward and does not require advanced technical knowledge.

6.1. Registering and adding a domain

  1. Go to cloudflare.com and create an account by entering your e-mail address.
  2. Click „Add a Site" and enter your domain name (without www).
  3. Select a plan (the free plan is sufficient to begin with).
  4. Wait for the automatic scanning of DNS records.

6.2. Verification of DNS records

After scanning, Cloudflare will display a list of detected DNS records. This is a crucial moment – check carefully to ensure that all records have been imported correctly.

What to look out for:

  • Record A for the main domain – should point to the server's IP address
  • Record CNAME for www – usually indicates the main domain
  • Record MX – essential for e-mail
  • Record TXT – Google, SPF, DKIM verifications
  • Subdomains – each subdomain requires a separate record

⚠️ Important: udflare does not automatically detect all custom records. If you have subdomains or special entries, you must add them manually before changing your nameservers!

6.3. Changing nameservers

Cloudflare will display two nameserver addresses, e.g.:

  • aria.ns.cloudflare.com
  • kai.ns.cloudflare.com

You must set them up with your domain registrar.

How to change nameservers:

  1. Log in to the registrar panel (e.g. home.pl, nazwa.pl, OVH)
  2. Find the DNS settings or „Nameservers" for your domain
  3. Delete the current entries and enter the nameservers provided by Cloudflare.
  4. Save your changes and wait for propagation (up to 48 hours, usually much faster).

After successful propagation, Cloudflare will display the status „Active" for your domain.

6.4. Podstawowa konfiguracja po aktywacji

Po aktywacji domeny wykonaj następujące ustawienia:

  1. SSL/TLS → wybierz tryb „Full (Strict)"
  2. SSL/TLS → Edge Certificates → włącz „Always Use HTTPS"
  3. SSL/TLS → Edge Certificates → włącz „Automatic HTTPS Rewrites"
  4. Speed → Optimization → włącz Auto Minify dla HTML, CSS, JS
  5. Speed → Optimization → rozważ włączenie Rocket Loader
  6. Caching → Configuration → ustaw Browser Cache TTL na odpowiednią wartość

6.5. Konfiguracja przekierowań www

Aby uniknąć problemów z duplikacją treści, skonfiguruj przekierowanie:

W sekcji Rules → Page Rules utwórz regułę:

  • URL: www.twojadomena.pl/*
  • Ustawienie: Forwarding URL (301 - Permanent Redirect)
  • Destination: https://twojadomena.pl/$1

Lub odwrotnie, jeśli preferujesz wersję z www.

7. Najważniejsze ustawienia bezpieczeństwa

7.1. Reguły zapory (WAF Custom Rules)

Cloudflare pozwala tworzyć własne reguły filtrowania ruchu. Możesz blokować lub challengować ruch na podstawie różnych kryteriów.

Przykładowe przydatne reguły:

Blokowanie krajów: Jeśli Twoja strona jest skierowana tylko do polskich użytkowników, możesz blokować ruch z krajów, z których najczęściej pochodzą ataki.

(ip.geoip.country ne "PL") Action: Managed Challenge

Ochrona panelu admina (WordPress):

(http.request.uri.path contains "/wp-admin" or http.request.uri.path contains "/wp-login") Action: Managed Challenge

Blokowanie podejrzanych User-Agentów:

(http.user_agent contains "sqlmap" or http.user_agent contains "nikto") Action: Block

7.2. Konfiguracja ochrony przed botami

  1. Security → Bots → włącz Bot Fight Mode (darmowy)
  2. Upewnij się, że „Verified Bots" mają dostęp (nie blokuj Googlebota!)
  3. Rozważ włączenie JavaScript Detection dla podejrzanego ruchu

7.3. Rate Limiting

Rate Limiting pozwala ograniczyć liczbę zapytań z pojedynczego źródła w określonym czasie.

Przykładowa konfiguracja:

ŚcieżkaLimitAkcja
/wp-login.php5 zapytań / minutęManaged Challenge
/api/*100 zapytań / minutęBlock
/* (wszystko)1000 zapytań / 10 sekundChallenge

7.4. Security Level

Cloudflare oferuje kilka poziomów bezpieczeństwa:

PoziomOpis
Essentially OffTylko najbardziej agresywne zagrożenia
LowZnane zagrożenia
MediumŚredni poziom ochrony
HighZalecany dla większości stron
I'm Under Attack!Maksymalna ochrona – JavaScript challenge dla każdego

Tip: Nie używaj trybu „I'm Under Attack!" na stałe – spowalnia ładowanie strony i może irytować użytkowników.

7.5. Origin CA Certificate

Aby używać trybu Full (Strict), zainstaluj certyfikat Origin CA na serwerze:

  1. SSL/TLS → Origin Server → kliknij „Create Certificate"
  2. Wybierz domeny i okres ważności (do 15 lat)
  3. Pobierz certyfikat i klucz prywatny
  4. Zainstaluj na serwerze (Apache, Nginx, lub panel hostingowy)

8. Optymalizacja wydajności w Cloudflare

8.1. Konfiguracja Cache

Prawidłowa konfiguracja cache to klucz do maksymalnej wydajności.

PoziomZachowanie
No Query StringCache tylko URL bez parametrów
StandardDomyślne – cachuje statyczne pliki z query stringiem
Ignore Query StringIgnoruje parametry URL – użyteczne dla wersjonowania
Cache EverythingCachuje wszystko, w tym HTML – wymaga Page Rules

8.2. Browser Cache TTL

Typ stronyRekomendowany TTL
Strony często aktualizowane4-8 godzin
Strony standardowe1-7 dni
Strony statyczne1 miesiąc lub dłużej

8.3. Optymalizacja obrazów

Polish (Plan Pro)

Automatyczna kompresja obrazów:

  • Lossless – bez utraty jakości
  • Lossy – większa kompresja, minimalna utrata jakości
  • WebP – konwersja do nowoczesnego formatu

Mirage (Plan Pro)

  • Lazy loading obrazów
  • Ładowanie w odpowiedniej rozdzielczości
  • Placeholder podczas ładowania

8.4. Tiered Cache

Tiered Cache (dostępny we wszystkich planach) zmniejsza liczbę zapytań do serwera źródłowego, wykorzystując hierarchię cache między data center Cloudflare.

Włącz w: Caching → Tiered Cache → Enable Tiered Cache

8.5. Argo Smart Routing

Argo Smart Routing (płatna opcja ~$5/mies. + $0.10/GB) analizuje warunki sieciowe w czasie rzeczywistym i kieruje ruch najszybszą trasą.

Według Cloudflare może przyspieszyć ładowanie stron o 30%.

8.6. Early Hints

Early Hints wysyła nagłówki 103 do przeglądarki, pozwalając na wcześniejsze pobieranie zasobów.

Włącz w: Speed → Optimization → Early Hints

9. Cloudflare Workers i AI – nowe możliwości

9.1. Co to są Cloudflare Workers?

Workers to platforma serverless pozwalająca uruchamiać kod JavaScript bezpośrednio na krawędzi sieci. Charakteryzują się:

  • Błyskawiczny cold start (poniżej 5ms)
  • Globalny zasięg (330+ lokalizacji)
  • Bez zarządzania infrastrukturą
  • Pay-per-request pricing

Przykłady zastosowań Workers:

  • Przekierowania i URL rewrites
  • Personalizacja treści na podstawie lokalizacji lub urządzenia
  • Testy A/B bez obciążania serwera
  • Obsługa API i mikroserwisów
  • Agregacja danych z wielu źródeł
  • Ochrona przed hotlinkingiem

9.2. Workers AI

Workers AI umożliwia uruchamianie modeli machine learning bezpośrednio na infrastrukturze Cloudflare, bez konieczności zarządzania klastrami GPU.

Dostępne kategorie modeli (ponad 50):

  • Generowanie tekstu: Llama 4, Mistral, DeepSeek, Granite
  • Generowanie obrazów: Stable Diffusion, Leonardo.AI
  • Rozpoznawanie mowy: Whisper, Deepgram
  • Embeddingi i wyszukiwanie semantyczne
  • Moderacja treści i bezpieczeństwo

Przykład użycia Workers AI:

 

 

javascript

export default {   async fetch(request, env) {     const response = await env.AI.run("@cf/meta/llama-4-scout-17b-16e-instruct", {       messages: [         { role: "system", content: "Jesteś pomocnym asystentem" },         { role: "user", content: "Opisz korzyści z używania CDN" }       ]     });     return new Response(JSON.stringify(response));   } }

9.3. AI Gateway

AI Gateway to warstwa proxy dla wywołań AI, oferująca:

  • Cachowanie odpowiedzi AI (oszczędność kosztów)
  • Rate limiting i kontrola budżetu
  • Logowanie i analityka użycia
  • Fallback między dostawcami (OpenAI → Anthropic → lokalne modele)
  • Ujednolicone API dla różnych providerów

9.4. Vectorize

Vectorize to wektorowa baza danych zintegrowana z Workers, idealna do:

  • Wyszukiwania semantycznego
  • Systemów rekomendacji
  • RAG (Retrieval-Augmented Generation)
  • Klasyfikacji treści

10. Cennik Cloudflare – który plan wybrać?

Porównanie planów

PlanCenaDla kogo?
Free$0Blogi, małe strony, hobby projekty
Pro$20/mies.Profesjonalne strony firmowe, sklepy e-commerce
Business$200/mies.Duże serwisy, aplikacje SaaS, wymagające WAF
EnterpriseIndywidualnieKorporacje, krytyczna infrastruktura, SLA 100%

Co zawiera plan Free?

Darmowy plan Cloudflare to zaskakująco bogate rozwiązanie, które dla wielu małych stron będzie całkowicie wystarczające. Otrzymujesz nieograniczoną ochronę przed atakami DDoS – bez żadnych limitów przepustowości czy dodatkowych opłat przy ataku. Twoja strona korzysta z globalnej sieci CDN obejmującej ponad 330 lokalizacji, co oznacza szybsze ładowanie dla użytkowników z całego świata.

W pakiecie znajdziesz również darmowy certyfikat SSL, który zapewnia szyfrowane połączenie HTTPS – niezbędne zarówno dla bezpieczeństwa, jak i pozycjonowania w Google. Do dyspozycji masz 3 reguły Page Rules pozwalające na podstawową customizację zachowania Cloudflare dla wybranych ścieżek URL.

Plan Free zawiera także podstawową wersję Web Application Firewall chroniącą przed najpopularniejszymi atakami, Bot Fight Mode do walki ze złośliwymi botami oraz obsługę nowoczesnych protokołów HTTP/3 i QUIC. Dodatkowo możesz korzystać z Tiered Cache, który zmniejsza obciążenie Twojego serwera, oraz wykonywać do 100 000 zapytań dziennie do Cloudflare Workers.

Co zyskujesz w planie Pro?

Plan Pro za 20 dolarów miesięcznie to naturalny krok dla profesjonalnych stron firmowych i sklepów e-commerce, które potrzebują więcej niż podstawowa ochrona i optymalizacja. Zachowujesz wszystko z planu darmowego, ale zyskujesz narzędzia, które realnie wpływają na szybkość ładowania strony.

Przede wszystkim otrzymujesz Polish – automatyczną optymalizację obrazów, która może zmniejszyć ich rozmiar nawet o 35% bez widocznej utraty jakości. Do tego dochodzi Mirage, inteligentny system lazy loadingu obrazów dostosowujący ich rozdzielczość do urządzenia użytkownika. Te dwie funkcje potrafią drastycznie poprawić wyniki Core Web Vitals, szczególnie na stronach z dużą ilością grafik.

Liczba dostępnych Page Rules wzrasta do 20, co daje znacznie większą elastyczność w konfiguracji. Rozszerzone reguły WAF zapewniają lepszą ochronę przed wyrafinowanymi atakami, a Cache Analytics pozwala analizować efektywność cachowania i podejmować świadome decyzje optymalizacyjne. W planie Pro zyskujesz także priorytetowe wsparcie e-mail, automatyczne przekierowania mobilne oraz ulepszoną ochronę przed botami.

Kiedy wybrać plan Business?

Plan Business za 200 dolarów miesięcznie jest przeznaczony dla dużych serwisów, aplikacji SaaS oraz firm, dla których każda minuta niedostępności strony oznacza realne straty finansowe. To rozwiązanie dla organizacji wymagających najwyższego poziomu bezpieczeństwa i gwarancji działania.

Kluczową różnicą jest możliwość tworzenia w pełni customowych reguł WAF, co pozwala precyzyjnie dostosować ochronę do specyfiki Twojej aplikacji. Liczba Page Rules wzrasta do 50, dając niemal nieograniczone możliwości konfiguracji. Otrzymujesz także Image Resizing – dynamiczną zmianę rozmiaru obrazów na żądanie, co eliminuje potrzebę przechowywania wielu wersji tego samego pliku.

Plan Business to jedyny poziom oferujący 100% SLA uptime, co oznacza gwarantowaną dostępność usługi z finansową rekompensatą w przypadku awarii. Wsparcie techniczne jest dostępne telefonicznie, a zaawansowana analityka dostarcza szczegółowych danych o ruchu, zagrożeniach i wydajności. Dla firm podlegających regulacjom PCI DSS ten plan zapewnia również niezbędną zgodność.

Nasza rekomendacja: Dla większości firmowych stron internetowych i sklepów e-commerce optymalnym wyborem jest plan Pro. Oferuje najlepszy stosunek ceny do możliwości, szczególnie dzięki optymalizacji obrazów i rozszerzonym regułom bezpieczeństwa. Przy małych stronach wystarcza zazwyczaj plan darmowy.

Dodatkowe płatne opcje

UsługaCenaOpis
Argo Smart Routing~$5/mies. + $0.10/GBInteligentne routowanie, ~30% przyspieszenie
Rate Limiting$0.05/10k zapytańOchrona przed brute-force
Workers (Paid)$5/mies. + usageWięcej requestów i CPU time
Workers AIPay-per-inferenceModele AI na edge
Images$5/mies. + usageTransformacje i hosting obrazów

11. Najczęstsze błędy i jak ich unikać

11.1. Błędy przy konfiguracji DNS

Problem: Brakujące rekordy DNS po migracji do Cloudflare

Rozwiązanie: Przed zmianą nameserverów dokładnie porównaj listę rekordów u obecnego dostawcy z tym, co wykrył Cloudflare. Ręcznie dodaj brakujące wpisy.

Problem: Poczta e-mail przestała działać

Rozwiązanie: Rekordy MX nie powinny być proxy przez Cloudflare (szara chmurka). Upewnij się też, że rekordy SPF, DKIM i DMARC są poprawnie skonfigurowane.

Problem: Subdomena nie działa

Rozwiązanie: Każda subdomena wymaga osobnego rekordu w Cloudflare. Sprawdź, czy rekord jest dodany i czy ma właściwy status proxy.

11.2. Problemy z SSL

Problem: Nieskończona pętla przekierowań (ERR_TOO_MANY_REDIRECTS)

Rozwiązanie: Najczęściej spowodowane konfliktem między trybem SSL Cloudflare (Flexible) a wymuszaniem HTTPS na serwerze. Zmień tryb na Full lub Full (Strict) i zainstaluj certyfikat na serwerze.

Problem: Mixed Content warnings

Rozwiązanie: Włącz „Automatic HTTPS Rewrites" w SSL/TLS → Edge Certificates. Upewij się też, że wszystkie zasoby na stronie używają HTTPS.

11.3. Problemy z cache

Problem: Zmiany na stronie nie są widoczne

Rozwiązanie: Wyczyść cache w Cloudflare:

  1. Caching → Configuration → Purge Everything
  2. Dla pojedynczych plików użyj „Custom Purge"

Problem: Strona logowania jest cachowana (błędy sesji)

Rozwiązanie: Stwórz regułę w Rules → Page Rules dla ścieżek logowania:

  • URL: *twojadomena.pl/wp-admin/*
  • Setting: Cache Level → Bypass

11.4. Problemy z WAF

Problem: WAF blokuje legalne zapytania (false positives)

Rozwiązanie:

  1. Sprawdź Security → Events
  2. Zidentyfikuj regułę powodującą blokadę
  3. Stwórz wyjątek w WAF → Tools → Skip

Problem: Formularz kontaktowy nie działa

Rozwiązanie: WAF może blokować żądania POST z określonymi danymi. Sprawdź logi i ewentualnie wyłącz konkretną regułę dla ścieżki formularza.

11.5. Problemy z wydajnością

Problem: Strona ładuje się wolniej po włączeniu Cloudflare

Rozwiązanie:

  1. Sprawdź, czy serwer źródłowy nie blokuje IP Cloudflare
  2. Dodaj zakresy IP Cloudflare do whitelist
  3. Upewnij się, że Rocket Loader nie powoduje konfliktów z JavaScript
  4. Włącz Tiered Cache

Problem: TTFB (Time to First Byte) jest wysoki

Rozwiązanie:

  1. Włącz Argo Smart Routing (płatne)
  2. Sprawdź wydajność serwera źródłowego
  3. Rozważ Cache Everything z Page Rules dla statycznych stron

11.6. Problemy z Workers

Problem: Worker nie działa na niektórych ścieżkach

Rozwiązanie: Sprawdź konfigurację Routes w Workers. Upewnij się, że pattern pasuje do żądanych URL-i.

12. Podsumowanie

Cloudflare to kompleksowa platforma, która może znacząco poprawić bezpieczeństwo, wydajność i niezawodność Twojej strony internetowej.

Kluczowe wnioski

Bezpieczeństwo

  • ✅ Darmowa, nieograniczona ochrona DDoS dla każdej strony
  • ✅ WAF chroni przed najpopularniejszymi atakami (SQL Injection, XSS)
  • ✅ Darmowe certyfikaty SSL/TLS
  • ✅ Ukrycie prawdziwego IP serwera

Wydajność

  • ✅ Globalna sieć CDN z ponad 330 lokalizacjami
  • ✅ Automatyczna optymalizacja (minifikacja, kompresja)
  • ✅ Polish i Mirage dla obrazów (plan Pro)
  • ✅ Obsługa HTTP/3 i QUIC

SEO

  • ✅ Poprawa Core Web Vitals (LCP, INP, CLS)
  • ✅ HTTPS jako czynnik rankingowy
  • ✅ Szybsze ładowanie = lepsza pozycja w Google

Nowe technologie

  • ✅ Workers – serverless computing na edge
  • ✅ Workers AI – modele ML bez zarządzania infrastrukturą
  • ✅ AI Gateway – ujednolicone API dla providerów AI

Rekomendacje dla różnych scenariuszy

ScenariuszRekomendowany planKluczowe ustawienia
Blog / strona wizytówkaFreeSSL Full, Auto Minify, Bot Fight Mode
Sklep e-commercePro+ Polish, Mirage, rozszerzone WAF
Aplikacja SaaSBusiness+ Custom WAF, Image Resizing, SLA
KorporacjaEnterprisePełna customizacja, dedykowane wsparcie

Następne kroki

  1. Załóż konto na cloudflare.com
  2. Dodaj swoją domenę i zweryfikuj rekordy DNS
  3. Zmień nameservery u rejestratora
  4. Skonfiguruj podstawowe ustawienia (SSL, optymalizacja)
  5. Monitoruj statystyki i dostosowuj konfigurację

Artykuł przygotowany przez zespół MITS Sp. z o.o. – boutique software house specjalizujący się w Laravel, Vue.js i rozwiązaniach e-commerce.

Potrzebujesz pomocy z konfiguracją Cloudflare? Skontaktuj się z nami – pomożemy zoptymalizować Twoją stronę pod kątem bezpieczeństwa i wydajności.

Źródła i przydatne linki

Share

Adam Terepora

Adam Terepora

President

Mits sp. z o.o.

Professionally involved in programming since 2010. Certified PHP programmer, web solutions architect, IT consultant. Helps translate technical language into business language (and vice versa).
Questions? icon Questions?
+48 538 537 623