Services · by Cloudflare
Cloudflare Workers
Run small programs on Cloudflare’s network to handle website requests, such as looking up where a short link should send a visitor.
Consider a printed poster with a short link to this week’s event. A Worker can receive a visit to that link and send the visitor to the current event page. The poster can stay in place even when next week’s destination changes.
Try a Worker with one short path and one destination. Open the link in a browser, then change the destination and try again. You’ve given the site behavior without managing a server yourself.
- When to use it
- When your site might get lots of visitors on a small budget, or you also buy your domain from Cloudflare.
- When to skip it
- If this is your first site, because Cloudflare’s setup uses more technical words than Vercel’s or Netlify’s.
- What it costs
- Free plan with 100,000 program requests a day. Requests for plain files, like pages and images, are free and unlimited. Workers Paid is $5 a month minimum, checked on 2026-11-09.
Put your site online with Cloudflare
Put your website online with Cloudflare Workers, straight from GitHub or GitLab. Each change you push then goes online by itself.
You’ll need
- A website that works on your computer.
- Your code saved on GitHub or GitLab.
- PLAN.md from the “Plan your idea” guide.
- Your .env file, if your product uses keys.
- A phone to check the live site.
- A domain you bought, only if you want your own address. Domains, under Concepts, explains whether you need one.
- GitHub or GitLab account. The free plan is enough.
- Cloudflare account. Free to create.
Your part
- Create the Cloudflare account and connect GitHub or GitLab.
- Type your secret keys into Cloudflare’s settings.
- Change your domain’s nameservers where you bought it, if that wasn’t Cloudflare.
Copy the prompt for these steps
I’m following “Put your site online with Cloudflare” on BuildLadder. What the guide says I’ll end up with: Your site is online at a workers.dev address. It updates each time you push to GitHub or GitLab, and can use your own domain. This comes from https://buildladder.com/tools/cloudflare-workers#hosting. If you can open web pages, read https://buildladder.com/tools/cloudflare-workers.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address. How to work with me: - Go through the steps below in order, one at a time. - Do what you can yourself in this folder: write code, run commands, check settings. If a service has an official command-line tool, like the Vercel CLI, you can offer to use it. Ask me before you install anything, sign in to anything or spend money. - When a step needs me, like making an account or clicking in a dashboard, tell me exactly what to do in small steps. Then wait until I say it’s done. - The actions, checks and fixes in each step were written for me, the reader. Where one says “your AI tool”, that means you, and “Say:” means something I would say to you. - Never ask me to paste passwords or secret keys into this chat. I type those into the service’s own settings. - After each step, tell me how to check it worked. Once Git is set up, save a version each time a step works. Then ask if I’m ready for the next one. - Use plain words. I may never have coded before. ## Step 1 of 6: Check your product before you put it online Read PLAN.md in this folder. I want to put this product online with Cloudflare Workers. My code is already saved on GitHub or GitLab, and Cloudflare Workers will put it online from there. If this folder isn’t connected to a GitHub or GitLab repository yet, stop and tell me. I’ll save it there first. Check my product: - Make sure .env and any other files with keys or passwords are listed in .gitignore, so Git never uploads them. - Look through my saved Git history for keys or passwords saved earlier. If you find any, stop and explain. Those keys must be replaced with new ones first. - Check that the product still builds and runs on my computer. - Check Cloudflare Workers’s current official docs for anything my framework needs to work there. Tell me before you change anything, and keep everything that already works. If you change anything, ask me before you save a commit and push it. Finally, list every environment variable my product needs. Show only the names, never the values. For each one, say whether it’s public (safe to show in the browser) or secret, and what it’s for. Also say whether each one is needed while the site builds, or only while it runs. It worked when: You have a list of the setting names your product needs, and your saved code holds no keys. Before we move on, check with me: - Open your repository on GitHub or GitLab. Is .env missing from the file list? Keep for later: You need the list of setting names in “Add your secret settings”. If something goes wrong: - Your AI tool says the folder isn’t on GitHub or GitLab yet. Save your code to GitHub or GitLab first. Their tool pages have the steps. Then do this step again. - Your AI tool found a key in your saved history. Make a new key in that service’s dashboard and delete the old one. Then ask your AI tool to help remove the old key from the history. ## Step 2 of 6: Get it ready for Cloudflare I want to host this product on Cloudflare Workers. Cloudflare will build it from my GitHub or GitLab repository each time I push. Check Cloudflare’s current official docs for my framework, then get my product ready: - Add the Wrangler configuration file Cloudflare needs, if there isn’t one yet. Wrangler is Cloudflare’s publishing tool. - If my framework needs a Cloudflare adapter, tell me what it is and ask before installing it. - Set keep_vars to true in that file, so settings I add in Cloudflare’s dashboard aren’t removed on the next deploy. - Never put secret keys in that file. I’ll add them in Cloudflare’s dashboard myself. - Make sure the product still runs on my computer the way it did before. Don’t run a deploy command, and don’t sign me in to anything. Ask me before you save a commit and push it. It worked when: Your repository has a Wrangler settings file, and your site still works on your computer. Before we move on, check with me: - Open your repository on GitHub or GitLab. Is there a file whose name starts with wrangler? If something goes wrong: - It says your framework isn’t supported. Ask: “Which Cloudflare framework guide fits my product? Explain the choices in plain words.” If none fit, Vercel or Netlify may be simpler. ## Step 3 of 6: Create your account and connect your repository This step is mine to do. Walk me through it, one action at a time: - Go to dash.cloudflare.com and create an account. - In the dashboard, go to Workers & Pages and select Create application. - Choose GitHub or GitLab, whichever holds your code. If asked, sign in there and let Cloudflare see your repository. On GitLab, Cloudflare’s access shows up under the name Cloudflare Pages. - Pick your repository from the list. - Check the build command. Ask your AI tool which one your product uses, often npm run build. Leave the deploy command as it is. - Select Save and Deploy. It worked when: Cloudflare starts building your site, and you see a page for your new Worker. If something goes wrong: - The first build failed. That’s fine if your product needs secret settings. “Add your secret settings” adds them and starts a new build. - Cloudflare opened a pull request on GitHub. That means it couldn’t find your Wrangler file. Ask your AI tool to explain the pull request before you accept it. - Your repository isn’t in the list. Cloudflare may only see some of your repositories. On GitHub, open Settings, then Applications. Select Configure beside Cloudflare Workers and Pages, and add this repository under Repository access. ## Step 4 of 6: Add your secret settings This step is mine to do. Walk me through it, one action at a time: - If your list of setting names was empty, skip this step. - Open your Worker, then Settings. Under Variables and Secrets, select Add. - For each setting used while the site runs, type the name exactly and copy the value from your .env file. - Pick Secret as the Type for secret keys. Then select Deploy. - For settings used while building, open your Worker’s build settings. Add them under Build variables and secrets. - Start a new build so it uses them. You can retry the last build, or push your next change. It worked when: Every name from your list is added in the right place, and a new build is running. Before we move on, check with me: - Count the names in both places. Does the total match your list? - Is every secret key set to the Secret type? If something goes wrong: - You don’t have a value for one of the names. Ask your AI tool where that value comes from. It’s usually in another service’s dashboard, like your payments or database account. - A setting you added has disappeared. Ask your AI tool to check that keep_vars is true in your Wrangler file. Then add the setting again. ## Step 5 of 6: Open your live site on your phone This step is mine to do. Walk me through it, one action at a time: - Wait for the build to finish. - Find your site’s address on your Worker’s page. It ends in workers.dev. - Open that address on your phone. - Try the main thing your site does, from start to finish. - Write the address into PLAN.md so you can find it later. It worked when: Your site opens on your phone at an address ending in workers.dev. Before we move on, check with me: - Does the main feature work on your phone too? If something goes wrong: - The build failed. On your Worker’s Deployments tab, open View build history. Copy the build log into your AI tool and ask: “What does this mean, and how do I fix it?” - You see Error 1102. Your site needed more computer time per visit than the free plan allows. Ask your AI tool if pages can be made ahead of time. - You see Error 1027. Today’s free requests are used up. The count resets at midnight UTC. The Workers Paid plan removes the daily limit. ## Step 6 of 6: Connect your own domain This step is optional. Ask me whether I want it, and skip it if I don’t. This step is mine to do. Walk me through it, one action at a time: - Bought elsewhere: in the Cloudflare dashboard, go to Domains and select Onboard a domain. Type your domain and pick the Free plan. - Bought elsewhere: Cloudflare scans your DNS records. Compare its list with the records at your domain seller and add any that are missing. Include the MX records your email needs. - Bought elsewhere: at your domain seller, look for DNSSEC. If it is on, turn it off before you change nameservers. - Bought elsewhere: Cloudflare gives you two nameservers. Replace the old ones at your domain seller with these two, then wait until Cloudflare shows Active. - Open your Worker, then Settings, then Domains & Routes. Select Add, then Custom Domain. - Type your domain and select Add Custom Domain. Do it again for the www version. - Update the address in PLAN.md to your new domain. It worked when: Your site opens at your own domain, with a lock icon in the address bar. Before we move on, check with me: - Try it with and without www. Do both work? If something goes wrong: - DNSSEC was on at your domain seller. Turn it off there, or remove its old DS record, and wait for that record’s TTL to expire before you change nameservers. To turn DNSSEC on again later, open your domain in Cloudflare, then DNS, then Settings, and click Enable DNSSEC. Add the new DS values it shows at your domain seller. Never restore the old values. - Email stopped arriving at your domain. An email record didn’t come across. Ask your email service which records you need. Add them under your domain’s DNS records in Cloudflare. - Cloudflare still says the domain is pending. Check that the nameservers at your domain seller match Cloudflare’s two exactly. Remove any old ones. - Only one of yourname.com and www.yourname.com works. Add the missing one as a second Custom Domain on your Worker.
The steps
- Steps marked AI tool are done by your AI tool when you paste the prompt. The rest are yours.
- Save a version after every step that works.
- If a screen looks different from a step, ask your AI tool where the setting moved.
- Never paste a password or secret key into the chat.
Your code ready for Cloudflare
Check your product before you put it online
Your host puts your product online from GitHub or GitLab, where your code is saved. This step checks that no keys went up with the code, and lists the settings your host will need.
It worked when: You have a list of the setting names your product needs, and your saved code holds no keys.
Keep: You need the list of setting names in “Add your secret settings”.
Check this step
- Open your repository on GitHub or GitLab. Is .env missing from the file list?
Your AI tool says the folder isn’t on GitHub or GitLab yet.
Save your code to GitHub or GitLab first. Their tool pages have the steps. Then do this step again.
Your AI tool found a key in your saved history.
Make a new key in that service’s dashboard and delete the old one. Then ask your AI tool to help remove the old key from the history.
Get it ready for Cloudflare
Cloudflare Workers needs a small settings file in your product before it can put it online. Adding it now keeps the dashboard steps simple.
It worked when: Your repository has a Wrangler settings file, and your site still works on your computer.
Check this step
- Open your repository on GitHub or GitLab. Is there a file whose name starts with wrangler?
It says your framework isn’t supported.
Ask: “Which Cloudflare framework guide fits my product? Explain the choices in plain words.” If none fit, Vercel or Netlify may be simpler.
Your site online
Create your account and connect your repository
You make a Cloudflare account and point it at your GitHub or GitLab repository. Cloudflare then builds your site from it.
- Go to dash.cloudflare.com and create an account.
- In the dashboard, go to Workers & Pages and select Create application.
- Choose GitHub or GitLab, whichever holds your code. If asked, sign in there and let Cloudflare see your repository. On GitLab, Cloudflare’s access shows up under the name Cloudflare Pages.
- Pick your repository from the list.
- Check the build command. Ask your AI tool which one your product uses, often npm run build. Leave the deploy command as it is.
- Select Save and Deploy.
It worked when: Cloudflare starts building your site, and you see a page for your new Worker.
The first build failed.
That’s fine if your product needs secret settings. “Add your secret settings” adds them and starts a new build.
Cloudflare opened a pull request on GitHub.
That means it couldn’t find your Wrangler file. Ask your AI tool to explain the pull request before you accept it.
Your repository isn’t in the list.
Cloudflare may only see some of your repositories. On GitHub, open Settings, then Applications. Select Configure beside Cloudflare Workers and Pages, and add this repository under Repository access.
Add your secret settings
Cloudflare keeps settings in two places. Some are used while the site builds, others while it runs. Your list of setting names says which is which.
- If your list of setting names was empty, skip this step.
- Open your Worker, then Settings. Under Variables and Secrets, select Add.
- For each setting used while the site runs, type the name exactly and copy the value from your .env file.
- Pick Secret as the Type for secret keys. Then select Deploy.
- For settings used while building, open your Worker’s build settings. Add them under Build variables and secrets.
- Start a new build so it uses them. You can retry the last build, or push your next change.
It worked when: Every name from your list is added in the right place, and a new build is running.
Check this step
- Count the names in both places. Does the total match your list?
- Is every secret key set to the Secret type?
You don’t have a value for one of the names.
Ask your AI tool where that value comes from. It’s usually in another service’s dashboard, like your payments or database account.
A setting you added has disappeared.
Ask your AI tool to check that keep_vars is true in your Wrangler file. Then add the setting again.
Open your live site on your phone
When the build finishes, Cloudflare gives your site a public address. Opening it on your phone shows that other people can reach it too.
- Wait for the build to finish.
- Find your site’s address on your Worker’s page. It ends in workers.dev.
- Open that address on your phone.
- Try the main thing your site does, from start to finish.
- Write the address into PLAN.md so you can find it later.
It worked when: Your site opens on your phone at an address ending in workers.dev.
Check this step
- Does the main feature work on your phone too?
The build failed.
On your Worker’s Deployments tab, open View build history. Copy the build log into your AI tool and ask: “What does this mean, and how do I fix it?”
You see Error 1102.
Your site needed more computer time per visit than the free plan allows. Ask your AI tool if pages can be made ahead of time.
You see Error 1027.
Today’s free requests are used up. The count resets at midnight UTC. The Workers Paid plan removes the daily limit.
Connect your own domain
Skip this step if you have no domain of your own. Cloudflare can only connect a domain it manages. One bought from Cloudflare is ready, so skip the actions marked “Bought elsewhere”.
- Bought elsewhere: in the Cloudflare dashboard, go to Domains and select Onboard a domain. Type your domain and pick the Free plan.
- Bought elsewhere: Cloudflare scans your DNS records. Compare its list with the records at your domain seller and add any that are missing. Include the MX records your email needs.
- Bought elsewhere: at your domain seller, look for DNSSEC. If it is on, turn it off before you change nameservers.
- Bought elsewhere: Cloudflare gives you two nameservers. Replace the old ones at your domain seller with these two, then wait until Cloudflare shows Active.
- Open your Worker, then Settings, then Domains & Routes. Select Add, then Custom Domain.
- Type your domain and select Add Custom Domain. Do it again for the www version.
- Update the address in PLAN.md to your new domain.
It worked when: Your site opens at your own domain, with a lock icon in the address bar.
Check this step
- Try it with and without www. Do both work?
DNSSEC was on at your domain seller.
Turn it off there, or remove its old DS record, and wait for that record’s TTL to expire before you change nameservers. To turn DNSSEC on again later, open your domain in Cloudflare, then DNS, then Settings, and click Enable DNSSEC. Add the new DS values it shows at your domain seller. Never restore the old values.
Email stopped arriving at your domain.
An email record didn’t come across. Ask your email service which records you need. Add them under your domain’s DNS records in Cloudflare.
Cloudflare still says the domain is pending.
Check that the nameservers at your domain seller match Cloudflare’s two exactly. Remove any old ones.
Only one of yourname.com and www.yourname.com works.
Add the missing one as a second Custom Domain on your Worker.
Stuck? Try these, in order
- Stop asking it to “fix it”. Say exactly what’s wrong.
Paste this into the same chat. It asks your AI tool to find the problem with you.
Troubleshooting promptI’m following “Cloudflare Workers” on BuildLadder and something isn’t working. This comes from https://buildladder.com/tools/cloudflare-workers. If you can open web pages, read https://buildladder.com/tools/cloudflare-workers.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address. Ask me which step I’m on, what I tried and what happened, one question at a time. Look at the files in this folder if you can. Then explain the problem in plain words and suggest the smallest fix. Don’t change anything that already works.
- Check the service isn’t down.
If you use one of these, open its status page before changing any code: Supabase, Vercel, Netlify, Cloudflare, Stripe, Clerk, Firebase, Resend, GitHub, Expo, Claude, OpenAI.
- Go back to your last saved version.Troubleshooting prompt
Take my product back to the last saved version that worked. First show me which version that is and what will change. Don’t delete anything else.
- Make the change smaller.Troubleshooting prompt
Let’s make a smaller change. Undo what you just tried. Then do only the first part of it, and tell me how to check that part works before we go on.
- Ask a person.
Copy this, fill in each line, and post it in a community like r/vibecoding. Take out any keys or passwords first.
Problem reportWhat I'm building: (one sentence) What I asked my AI tool to do: (the last request) What I expected: (what should happen) What happened instead: (what you see) The exact error, if any: (copy it here) What I've tried: (each attempt, in order) My tools: (AI tool, website or app, hosting)
Look things up
Questions people ask
- Is a free address like .vercel.app enough, or do I need my own domain?
- Should I change my nameservers or only add DNS records?
- Can I use a free hosting plan for a business?
- Where should I buy a domain?
- Why isn’t my domain working yet?
- All answers
Words used on this page
- Repository
- A repository, or repo, is a folder for your product that Git tracks, including the full history of every saved change. You can keep it on your computer and copy it to GitHub.
- Environment variable
- An environment variable is a named setting stored outside your code, such as an API key or a database address. Your app reads it when it runs, so secrets stay out of your shared files.
- Framework
- A framework is a ready-made starting structure for building an app, with common parts already solved. You follow its patterns and spend your time on what makes your product different.
- Build
- A build turns your product's code into the finished files that a web browser or phone can run. For a mobile app, the build is the file you install or send to an app store.
- Commit
- A commit is a saved version of your product at one moment, with a short note about what changed. Git keeps every commit, so you can look back or undo a change later.
- Hosting
- Hosting is a service that keeps your website on computers that stay online, so anyone can visit anytime. Many hosts have a free plan for small sites.
- Continuous deployment
- Continuous deployment means your host puts a new version online each time you push changes to GitHub. You don’t have to do anything else.
- API key
- An API key is a long code that tells a service your app is allowed to use it. Many keys are secret, so treat them like passwords and keep them out of shared code.
- Deploy
- To deploy means to put your website or app online so other people can use it. You send your product to a hosting service, which gives it a public web address. This site says “put it online”.
- Production
- Production is the live version of your website or app that real people use. Changes there affect everyone, so you test them in a preview first.
- Domain
- A domain is the name people type to reach your website, like buildladder.com. You rent it from a domain seller, usually for a yearly fee, and point it at your hosting.
- Nameserver
- A nameserver is the service that holds your domain’s DNS records. Changing nameservers hands control of all those records to a new company.
- MX record
- An MX record is a DNS record that says which service receives email for your domain. Only one service can receive it, so a new MX record changes where your domain’s email goes.
- DNSSEC
- DNSSEC, short for DNS Security Extensions, signs your domain’s DNS records so computers can tell they are real and not faked. You turn it on or off at your domain seller.
- DS record
- A DS record, short for delegation signer, is a line at your domain seller that holds the key for checking your domain’s DNSSEC signatures. Old values in it can stop the domain working after a move.
- TTL
- TTL, short for time to live, is how long computers may keep a saved copy of a DNS record before they look it up again. A change may not reach them until that time runs out.
Official pages
- Connect a GitLab repository to Workers
- Learn how Workers builds your site
- Set build variables and secrets
- Turn DNSSEC on with new DS values
- Move a domain’s nameservers to Cloudflare
- Check free and paid prices
- Check daily request limits
- GitHub
- GitLab
- Cloudflare Workers
- Cloudflare Registrar
Updated · Cloudflare