Welcome to Cloudflare | Cloudflare Docs

archived 11 Dec 2025 08:21:03 UTC
Skip to content
Cloudflare Docs
Log in

Welcome to Cloudflare

Explore guides and tutorials to start building on Cloudflare's platform

Build with Cloudflare

JavaScript
export default {
async fetch(request) {
const html = `<!DOCTYPE html>
<body>
<h1>Hello World</h1>
<p>This markup was generated by a Cloudflare Worker.</p>
</body>`;
return new Response(html, {
headers: {
"content-type": "text/html;charset=UTF-8",
},
});
},
};
JavaScript
export default {
async fetch(request) {
const data = {
hello: "world",
};
return Response.json(data);
},
};
JavaScript
export default {
async fetch(request) {
/**
* Replace `remote` with the host you wish to send requests to
*/
const remote = "https://example.com";
return await fetch(remote, request);
},
};
JavaScript
export default {
async fetch(request) {
const destinationURL = "https://example.com";
const statusCode = 301;
return Response.redirect(destinationURL, statusCode);
},
};
JavaScript
export default {
async fetch(request) {
function MethodNotAllowed(request) {
return new Response(`Method ${request.method} not allowed.`, {
status: 405,
headers: {
Allow: "GET",
},
});
}
// Only GET requests work with this proxy.
if (request.method !== "GET") return MethodNotAllowed(request);
return fetch(`https://example.com`);
},
};

Developer Platform section image Developer Platform section image

Developer Platform

The Cloudflare Developer Platform provides a serverless execution environment that allows you to create entirely new applications or augment existing ones without configuring or maintaining infrastructure.
If playback doesn't begin shortly, try restarting your device.

More videos

You're signed out
Videos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.
0:00 / 13:26

Install the WARP Client
The Cloudflare WARP client allows individuals and organizations to have a faster, more secure, and more private experience online.

Set up a tunnel
Cloudflare Tunnel provides you with a secure way to connect your resources to Cloudflare without a publicly routable IP address.

Zero Trust section image Zero Trust section image

Zero Trust

Cloudflare Zero Trust replaces legacy security perimeters with our global network, making the Internet faster and safer for teams around the world.

Other docs you might also like

Install an Origin CA certificate
Use Origin Certificate Authority (CA) certificates to encrypt traffic between Cloudflare and your origin web server and reduce origin bandwidth.

Change your nameservers
Make Cloudflare your primary DNS provider by updating your authoritative nameservers at your domain registrar.

SSL/TLS Encryption mode
Your domain's encryption mode controls how Cloudflare connects to your origin server and how SSL certificates at your origin will be validated.


Community
Share ideas, answers, code and compare notes with the Cloudflare community.
Open source
Cloudflare contributes to the open-source ecosystem in a variety of ways, including:
Blog
Get the latest news on Cloudflare products, technologies, and culture.
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%