---
title: Welcome to Cloudflare
description: Explore guides and tutorials to start building on Cloudflare's platform
image: https://developers.cloudflare.com/cf-twitter-card.png
---

[Skip to content](#%5Ftop) 

![](https://developers.cloudflare.com/_astro/Dev-Docs-Header-Illustration-Dark-Mode-cropped.DDWqKYx5_1cIhMB.svg) ![](https://developers.cloudflare.com/_astro/Dev-Docs-Header-Illustration-Light-Mode-cropped.COpWJJAy_ZaWBfS.svg) 

[Directory](https://developers.cloudflare.com/directory/) [Resources](https://developers.cloudflare.com/resources/) [API](https://developers.cloudflare.com/api/) [Use cases](https://developers.cloudflare.com/use-cases/) [Changelog](https://developers.cloudflare.com/changelog/) 

# Welcome to Cloudflare

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

Featured 

* [ AI tools ](https://developers.cloudflare.com/style-guide/ai-tooling/)
* [ Troubleshoot errors ](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/)
* [ Register a domain ](https://developers.cloudflare.com/registrar/)
* [ Setup 1.1.1.1 ](https://developers.cloudflare.com/1.1.1.1/setup/)
* [ Get started with Cloudflare ](https://developers.cloudflare.com/learning-paths/get-started/concepts/)

**[View all docs](https://developers.cloudflare.com/directory/)** 

Developer Products 

* [ Workers ](https://developers.cloudflare.com/workers/)
* [ Pages ](https://developers.cloudflare.com/pages/)
* [ R2 ](https://developers.cloudflare.com/r2/)
* [ Images ](https://developers.cloudflare.com/images/)
* [ Stream ](https://developers.cloudflare.com/stream/)

**[View all developer products](https://developers.cloudflare.com/directory/?product-group=Developer+platform)** 

AI Products 

* [ AI Search ](https://developers.cloudflare.com/ai-search/)
* [ Workers AI ](https://developers.cloudflare.com/workers-ai/)
* [ AI Crawl Control ](https://developers.cloudflare.com/ai-crawl-control/)
* [ AI Gateway ](https://developers.cloudflare.com/ai-gateway/)
* [ AI Agents ](https://developers.cloudflare.com/agents/)

**[View all AI products](https://developers.cloudflare.com/directory/?product-group=AI)** 

Zero Trust 

* [ Access ](https://developers.cloudflare.com/cloudflare-one/access-controls/policies/)
* [ Tunnel ](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/)
* [ Gateway ](https://developers.cloudflare.com/cloudflare-one/traffic-policies/)
* [ Browser Isolation ](https://developers.cloudflare.com/cloudflare-one/remote-browser-isolation/)
* [ Replace your VPN ](https://developers.cloudflare.com/learning-paths/replace-vpn/concepts/)

**[View all Cloudflare One products](https://developers.cloudflare.com/directory/?product-group=Cloudflare+One)** 

---

## Build with Cloudflare

**Return HTML** **Return JSON** **Fetch HTML** **Redirect** **Respond with another site** 

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",

      },

    });

  },

};


```

[Run Worker in Playground](https://workers.cloudflare.com/playground#LYVwNgLglgDghgJwgegGYHsHALQBM4RwDcABAEbogB2+CAngLzbPYZb6HbW5QDGU2AAwBWAJwiAbAA5BARgDsggCwAuFizbAOcLjT4CR44dLmKlAWABQAYXRUIAU3vYAIlADOMdO6jQ7Kkk08AmISKjhgBwYAIigaBwAPADoAK3do0lQoMCcIqNj45LToq1t7JwhsABU6GAcAuBgYMD4CKDtkFLgANzh3XgRYCABqYHRccAcrK0SvJBJcB1Q4cAgSAG9LEhI+uipeQIcIXgALAAoEBwBHEAd3CABKDa3tkl47e5ITiGAwEgYSAADAA8AEIXAB5axVACaAAUAKJfH5gAB8L22wIouDo6Ner2BJ1kqIAEg4wGB0CQAOqYMC4YHIIl4-EkYEwVFVE4eEjARAAaxAMBIAHc+iQAOZOBwIAgOXDkOg7EjWSkgXCoMCIBw0zD8mVJRkcjFs5DY3GAoiWE2XCAgBBUMIOEUkABKdy8VHcDjO31+ABpnqyvg44IsEO4Aptg9tou9ys4ILUHNEAtFHAkUH6wERTohvRAGABVKoAMWwUmi-pN2wAvtX8bWHla69Xa0QrOpmJptLoePwhGJJDIFMpSnZHM43J5vL52lQAkFtKRwpEYpFCNoMoFsrk19EyJSyCUbBOKtVkw0mi1eG0Omk7NNLOtony4gB9MYTHKpgqLIrpLWnZdj2IR9vog5GCYo5KMwVhAA)

JavaScript

```

export default {

  async fetch(request) {

    const data = {

      hello: "world",

    };


    return Response.json(data);

  },

};


```

[Run Worker in Playground](https://workers.cloudflare.com/playground#LYVwNgLglgDghgJwgegGYHsHALQBM4RwDcABAEbogB2+CAngLzbPYZb6HbW5QDGU2AAwAOAIwAmAGwBmAOwAWaYOnyAXCxZtgHOFxp8BIiTIVKVAWABQAYXRUIAU3vYAIlADOMdO6jQ7qki08AmISKjhgBwYAIigaBwAPADoAK3do0lQoMCcIqNj45LToq1t7JwhsABU6GAcAuBgYMD4CKDtkFLgANzh3XgRYCABqYHRccAcrK0SvJBJcB1Q4cAgSAG9LEhI+uipeQIcIXgALAAoEBwBHEAd3CABKDa3tkl47e4WQkgZn19eTg4wGB0AFogB3TBgXDRAA0L22AF8iJYESRLhAQAgqCQAEp3LxUdwOVLuOxnHQPFFI+HIqwaZhaHR6Hj8IRiKRyRTKeSlOyOZxuTzeXztKgBII6UjhSIxSKEHQZQLZXKy6JkEFkEo2fkVaq1eo7JotXhtDppOzTSzraLAOBxAD6YwmOWiqgKiyK6UR9IZTJCLIM7OMXLM8mYViAA)

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);

  },

};


```

[Run Worker in Playground](https://workers.cloudflare.com/playground#LYVwNgLglgDghgJwgegGYHsHALQBM4RwDcABAEbogB2+CAngLzbPYZb6HbW5QDGU2AAwAWAOyCAbBIBMAZmEBWBQE4AXCxZtgHOFxp8BI8VLmKVAWABQAYXRUIAU3vYAIlADOMdO6jQ7qki08AmISKjhgBwYAIigaBwAPADoAK3do0lQoMCcIqNj45LToq1t7JwhsABU6GAcAuBgYMD4CKDtkFLgANzh3XgRYCABqYHRccAcrK0SvJBJcB1Q4cAgSAG9LEhI+uipeQIcIXgALAAoEBwBHEAd3CABKDa3tkmQAKneX1-eSACUHM04LwHCQAAaXMaOMEkADuvhOJAgJ1BJ28azolDhHkREHQJHcTlwJEuNzuEHcSPQ32272QNN4dnuJIcUNBDBI0ROEAgMHcqmQyESEWaDiSjOAGUsNMuEBACCoO1hcF8h2O50h6EcABoWWT7g8iC8AL7ayzGohWDTMLQ6PQ8fhCMSSGTyJTKUp2RzONyeby+dpUAJBHSkcKRGKRQg6DKBbK5CPRMhgdBkEo2L0Vaq1eo7JotXhtDppOzTSzraLAFVUAD6YwmOWiqgKiyK6WNVuttpC9oMTuMrrMymYViAA)

JavaScript

```

export default {

  async fetch(request) {

    const destinationURL = "https://example.com";

    const statusCode = 301;

    return Response.redirect(destinationURL, statusCode);

  },

};


```

[Run Worker in Playground](https://workers.cloudflare.com/playground#LYVwNgLglgDghgJwgegGYHsHALQBM4RwDcABAEbogB2+CAngLzbPYZb6HbW5QDGU2AAwBWAEwA2AMySAjAHYAnMLnCAXCxZtgHOFxp8BIidPlKVAWABQAYXRUIAU3vYAIlADOMdO6jQ7qki08AmISKjhgBwYAIigaBwAPADoAK3do0lQoMCcIqNj45LToq1t7JwhsABU6GAcAuBgYMD4CKDtkFLgANzh3XgRYCABqYHRccAcrK0SvJBJcB1Q4cAgSAG9LEhI+uipeQIcIXgALAAoEBwBHEAd3CABKDa3tkl47e4W76HC-KgBVABKABkSAwSNEThAIDB3KpkMhEhFmg4ku9gBkXtt3lRPvcCCB3LZFmCSJJBDIiFiSJcICAEFQSIC7l5cajLjxLrwIGdFvc4m07EDgQAaEj4ulE8YOB5U7YAXxFlnlRCsGmYWh0eh4-CEYikskUymEpTsjmcbk83l87SoASCOlI4UiMUihB0GUC2VyLuiZDA6DIJRsZoq1Vq9R2TRavEFVE67js00s62iwDgcQA+mMJjloqoCosiul5Wr1ZqQtqDHrjIazMJmFYgA)

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`);

  },

};


```

[Run Worker in Playground](https://workers.cloudflare.com/playground#LYVwNgLglgDghgJwgegGYHsHALQBM4RwDcABAEbogB2+CAngLzbPYZb6HbW5QDGU2AAwAWQQA4ATAGYAjIIBswyQC4WLNsA5wuNPgJHjpcxZICwAKADC6KhACmt7ABEoAZxjpXUaDeUkNeATEJFRwwHYMAERQNHYAHgB0AFaukaSoUGAOYRHRsYkpkRbWtg4Q2AAqdDB2fnAwMGB8BFA2yElwAG5wrrwIsBAA1MDouOB2FhbxHkgkuHaocOAQJADe5iQkPXRUvP52ELwAFgAUCHYAjiB2rhAAlGsbm-7UvD5UJACyB0ejAHLoCAAQTAYHQAHc7LgzpdrrcHutns9zhAQAgPlQ7OCSAAlG4eKiuOwnAAG3wgv1wJAAJKtzlcbhAEuEKaMAL4hQFbUEQqEJEkAGkeSKRtwIIFcflEAFYBU8RSQjnY4PMEJLhQrniCweC-JEAOIAUQqkTlmpIbLNIrZdyI8ot9uQyBIAHkqGA6CQjRUSPS4RBXCRwZgANZB7xHEgUtwkGAIdBxOgJe1QVAkGEM27Mn6jEgAQgYDBIBuNkQeKLRH3JlIBwJ5kOhfsZtvtFfR+0OpxJRwgEBgkqd8TCjTsCV46GAJJbm0t5jZRAsamYGi0Oh4-CEokksgUSgkxRs9kcLncnm8rSofgCWlIoXCURZKqCaX8mWy98iZDBZCKVkPZUqapai2Boml4Fo2hSGxJnMVZImAOAYgAfRGMYskiZQ8nmApUjZRclxXII1z0TdDB3EwJGYCwgA)

[ Learn more about Workers ](https://developers.cloudflare.com/workers/) 

---

![Developer Platform section image](https://developers.cloudflare.com/_astro/developer-platform-light.CZoHB6oh_eLF9R.svg) ![Developer Platform section image](https://developers.cloudflare.com/_astro/developer-platform-dark.ChPufHpV_Z1n8xct.svg) 

## 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.

[ Explore our Developer Platform ](https://developers.cloudflare.com/directory/?product-group=Developer+platform) 

---

Install the WARP Client 

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

  
[ Get started ](https://developers.cloudflare.com/cloudflare-one/team-and-resources/devices/warp/) 

Set up a tunnel 

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

  
[ Set up a tunnel ](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/) 

![Zero Trust section image](https://developers.cloudflare.com/_astro/zero-trust-light.BvZ3bzoV_5tUAY.svg) ![Zero Trust section image](https://developers.cloudflare.com/_astro/zero-trust-dark.Dary5ape_5tUAY.svg) 

## 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.

  
[ Install Origin CA ](https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/) 

Change your nameservers 

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

  
[ Update nameservers ](https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/) 

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.

  
[ Set encryption mode ](https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/) 

Allow traffic from specific countries only 

Block requests based on a list of allowed countries by configuring a custom rule in the Web Application Firewall (WAF).

  
[ Allow traffic from specific countries only ](https://developers.cloudflare.com/waf/custom-rules/use-cases/allow-traffic-from-specific-countries/) 

---

**Community** 

Share ideas, answers, code and compare notes with the Cloudflare community.

* [ Discord ](https://discord.cloudflare.com/)
* [ Twitter ](https://x.com/CloudflareDev)
* [ Community forum ](https://community.cloudflare.com/)

**Open source** 

Cloudflare contributes to the open-source ecosystem in a variety of ways, including:

* [ GitHub projects ](https://github.com/cloudflare)
* [ Sponsorship projects ](https://developers.cloudflare.com/sponsorships/)
* [ Style guide ](https://developers.cloudflare.com/style-guide/)

**Blog** 

Get the latest news on Cloudflare products, technologies, and culture.

* [ Read the blog ](https://blog.cloudflare.com/)