PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteThe simplest way to host a static website on Cloudflare is Cloudflare Pages with Git integration: put your HTML, CSS, JavaScript, or static-site-generator project in GitHub or GitLab, import the repository in Workers & Pages, select the production branch, set the correct build command and output directory, and deploy. Cloudflare gives the project a pages.dev address. You can later attach a custom domain.
This guide covers the dashboard workflow, Direct Upload and C3 alternatives, framework settings, domains, redirects, headers, limits, and the errors that most often prevent a successful deployment.
What you need before creating a Pages project
- A site directory containing the files you intend to publish.
- A top-level
index.htmlfor a plain static site. This is the root document Cloudflare checks when someone visits the site root. - A GitHub or GitLab repository if you want automatic deployments and pull-request previews.
- The build command and generated output directory if you use a framework or static-site generator.
For a plain site, the publishable directory might simply contain index.html, styles.css, app.js and an images folder. For a framework, Pages must upload the generated directory, not your source files.
Choose a Cloudflare Pages deployment method
| Method | Best for | How deployments happen | Important limitation |
|---|---|---|---|
| Git integration | Projects stored on GitHub or GitLab | Pushes to the selected branch trigger builds; pull requests can receive previews | A Git-integrated project cannot later be converted to Direct Upload |
| Direct Upload | Prebuilt files or a provider other than GitHub/GitLab | Upload from your computer or from CI | Another Git provider requires CI and Wrangler rather than Pages Git integration |
| C3 (create-cloudflare CLI) | Developers who prefer a command-line setup | Run Cloudflare’s CLI and deploy from the terminal | You still need to identify the correct final output directory |
Cloudflare documents all three routes. Git integration supports GitHub and GitLab, including their hosted services; self-hosted Git instances are not supported by the Pages Git connection. Cloudflare also notes that Workers now supports most Pages use cases and should be considered for new projects, but Pages remains the direct workflow for a static site.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems#1 Best Overall
Deploy a plain HTML site with Git integration
-
Put the site in a repository
Commit the deployable files to GitHub or GitLab. Confirm that
index.htmlis at the top of the directory you will publish, rather than inside an extra folder such aswebsite/index.html. -
Open the Pages creation flow
In the Cloudflare dashboard, open Workers & Pages, choose Create an application, select Pages, and choose the option to import an existing Git repository. Authorize the Git provider and select the repository.
-
Select the production branch
Choose the branch that should publish production changes. Cloudflare’s plain-HTML example uses
main; use your project’s actual production branch if it has another name. -
Configure the build
For a site with no build step, set the output directory to the directory containing the finished HTML, CSS and JavaScript files. Leave the build command blank or use the documented
exit 0command. If the files are in the repository root, the output directory must point to that root as interpreted by the Pages project.Free tools Windows power users keep installed
One-click scans. No signup required.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Save and deploy
Start the deployment. Pages runs the command, checks its exit code, and uploads the output directory when the command exits with code zero. A non-zero exit code marks the build as failed.
-
Verify the generated address
Open the project’s
pages.devhostname. Test the home page, a representative internal page, CSS, JavaScript and images. Open a new pull request to confirm that a preview deployment is created when previews are enabled for the project.
Set build commands and output directories for frameworks
The output directory is the most important setting: it must contain the files that should be served publicly after the build finishes. Cloudflare’s documented examples include:
| Workflow | Build command | Output directory |
|---|---|---|
| Plain HTML | Blank or exit 0 |
Directory containing deploy-ready files |
| Vite | npm run build |
dist |
| Astro | npm run build |
dist |
| Hugo | hugo |
public |
| Next.js static export | npx next build |
out |
| Monorepo | Project-specific | Set the Pages root directory to the application folder, then use that app’s generated directory |
Framework presets and defaults can change as framework versions evolve. Check the active framework’s output configuration when a build succeeds but the site is empty or returns a 404. In a monorepo, set the project root before choosing the command and output directory; otherwise Pages may run from the repository root and upload the wrong folder.
Recommended Free Tools
Use Direct Upload or C3 instead
Direct Upload
Direct Upload is appropriate when you already have a finished output directory or use a Git provider that Pages cannot connect to. You can upload the files manually or run deployment from a CI provider using Wrangler. Decide this route before creating the project: Cloudflare documents that Git integration projects cannot be switched to Direct Upload later.
C3 from the command line
C3 is Cloudflare’s command-line creation path. It is useful when you want the project created and deployed from a terminal rather than configured first in the dashboard. The same rule applies: identify the directory containing the final site assets and deploy that directory, not unbuilt source.
Add a custom domain
- Open the Pages project and choose Custom domains.
- Enter the hostname you want to use and follow the dashboard verification steps.
- For an apex domain such as
example.com, make the domain a zone in the same Cloudflare account and point its nameservers to Cloudflare. A CNAME-only setup is not sufficient for an apex domain.
A subdomain and an apex domain have different DNS prerequisites, so follow the project flow for the exact hostname. Keep the generated pages.dev address available while testing DNS and certificates.
Redirect the pages.dev hostname
If the custom domain should be the only public address, Cloudflare documents using a Bulk Redirect from the project’s pages.dev hostname to the custom domain after the custom domain has been added. Configure this separately from the Pages deployment so the redirect does not hide an unresolved domain or build problem.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Control redirects and response headers with files
Static redirects
Add a plain-text file named _redirects to the asset directory that is copied into the final output. Each line defines a redirect. Cloudflare documents limits of 2,000 static redirects and 100 dynamic redirects, with 2,100 combined. These file-based redirects do not affect requests handled by Pages Functions; move those rules into Function code or exclude the paths from Functions.
Headers
A plain-text _headers file can add, override or remove headers for static asset responses. Cloudflare does not serve the file itself as an asset. It does not apply to Pages Functions responses, so set headers in the Function response when a Function handles the request. Review security-header values for your application instead of copying an example without checking its effect.
Check limits before choosing a plan
Cloudflare’s limits page was last updated September 5, 2026; limits can change, so verify the live documentation before sizing a project. The listed Free-plan limits are:
Rank #4
- 500 builds per month
- One concurrent build
- Up to 20,000 files per site
- 25 MiB maximum per individual asset
- 100 custom domains per project
- A 20-minute build timeout
Cloudflare lists up to 100,000 files per site on paid plans when the documented PAGES_WRANGLER_MAJOR_VERSION=4 project setting is used. These are service limits, not performance guarantees. See the current Pages limits documentation for plan-specific details.
Troubleshoot common deployment failures
The root URL returns a 404
Check that index.html is directly inside the configured output directory. A common mistake is publishing the parent directory while the file is one level deeper. Also confirm that the Pages root directory and output directory match the framework’s actual build location.
The build fails immediately
Read the deployment log for the command’s exit code. A non-zero exit means the build failed. Check the package manager, missing environment variables, dependency installation and the command’s working directory. In a plain HTML project, remove an unnecessary build command or use exit 0.
The deployment succeeds but assets are missing
Inspect the generated output directory locally. Relative paths that work from a development server may fail when the site is hosted at a project subpath, and files excluded by the build configuration will not be uploaded. Confirm that CSS, JavaScript and images are present in the directory Pages publishes.
Git cannot be connected
Pages Git integration supports GitHub and GitLab, not self-hosted Git services. Use Direct Upload and deploy through a CI provider such as GitHub Actions with Wrangler when your repository is elsewhere.
Best Value
The custom apex domain does not activate
Verify that the domain is a Cloudflare zone in the same account and that its nameservers point to Cloudflare. Do not treat an apex record copied from a subdomain setup as sufficient.
Redirects or headers have no effect
Ensure _redirects or _headers is in the final output directory, not only in your source directory. If a Pages Function handles the request, configure the redirect or header in the Function because these files apply to static responses.
Or skip the browser setup
If you need a screenshot of the deployed site for a release check, documentation or a visual test, ScreenshotNeo can capture the URL with one request. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed as clean shots; the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. Its MCP server also lets Claude, Cursor and other MCP clients call screenshot tools directly.
Use the API documentation at screenshotneo.com/docs/ for all options, including full-page capture, device and retina settings, waiting rules, custom CSS or JavaScript, selectors, authentication, PDFs and webhooks.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
FAQ
Can I deploy a site without Git?
Yes. Use Pages Direct Upload or C3 and provide the directory containing the finished assets.
Can Pages host server-side application code?
This workflow is for static assets. Requests handled by Pages Functions follow different rules for redirects and headers; use Workers or Functions when your application needs server-side execution.
Should I keep the pages.dev address after adding a domain?
You can leave it available for testing, or configure a Bulk Redirect to the custom domain when only the custom hostname should be public.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

