Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk7 min

How to Host a Website on Cloudflare: Pages, Workers, Domains, and Deployment

Use Cloudflare Pages for most static and framework sites; choose Workers Static Assets when you need edge code, bindings, or a Wrangler-first deployment. This guide covers files, builds, custom domains, DNS, errors, and automated verification.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For most websites, use Cloudflare Pages. Connect a Git repository (or upload files directly), set the build command and output directory, and Cloudflare publishes the result at a pages.dev address with preview deployments. Choose Workers with Static Assets instead when you need server-side code, bindings, or a Wrangler-managed project. Workers Sites is deprecated for new projects.

Choose Pages or Workers first

Your hosting choice determines how you deploy, route requests, and add server-side behavior.

Cloudflare Pages

Pages is the straightforward option for static HTML, generated sites, and frameworks that produce static output. It supports Git integration, Direct Upload, and C3. Every project receives a unique *.pages.dev hostname. Git-connected projects rebuild when you push commits and can create preview deployments for pull requests. Pages also supports production rollbacks.

Workers Static Assets

Use Workers when a request must execute JavaScript on Cloudflare’s edge, or when the site needs Worker bindings and a Wrangler-first workflow. Static files are stored in the project’s configured public directory and can be served alongside Worker code. Deploy locally with Wrangler and publish with npx wrangler deploy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
  • DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
  • AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
  • CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
  • EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
  • OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.

Cloudflare describes Workers as its primary application platform and says it supports most Pages use cases with a broader feature set. For a conventional static site, Pages remains the simpler setup; for a full-stack application, Workers Static Assets is the better fit.

Do not start a new Workers Sites project

Cloudflare’s current documentation marks Workers Sites as deprecated and directs new full-stack projects to Workers Static Assets instead.

Prepare your website files

Plain HTML

Put a top-level index.html in the directory you will deploy. A minimal project might look like this:

my-site/
├── index.html
├── styles.css
└── script.js

The top-level location matters. If the deployed output does not contain index.html at its root, the Pages URL commonly returns a 404.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Framework output

Identify two values before creating the project:

  • Build command: the command that turns source files into production files.
  • Output directory: the folder containing the finished HTML, CSS, JavaScript, and assets.

For a static Next.js export, Cloudflare’s example uses npx next build and the out directory. A plain HTML project can use an optional exit 0 build command and set its output directory to the folder containing index.html.

Rank #2
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
  • Dual-band Wi-Fi with 5 GHz speeds up to 867 Mbps and 2.4 GHz speeds up to 300 Mbps, delivering 1200 Mbps of total bandwidth¹. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance to devices, and obstacles such as walls.
  • Covers up to 1,000 sq. ft. with four external antennas for stable wireless connections and optimal coverage.
  • Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
  • Advanced Security with WPA3 - The latest Wi-Fi security protocol, WPA3, brings new capabilities to improve cybersecurity in personal networks

Deploy with Cloudflare Pages

  1. Open the dashboard. Sign in to Cloudflare and open Workers & Pages.
  2. Create an application. Choose Pages.
  3. Select a source. Choose Git integration to connect a repository, or choose Direct Upload for files already built on your computer.
  4. Configure the build. Select the production branch, enter the build command, and enter the output directory. For a plain HTML folder, ensure the output directory itself contains index.html.
  5. Deploy. Cloudflare builds the project and assigns a unique pages.dev hostname.

Git integration is preferable when you want repeatable deployments: each commit can trigger a rebuild, while pull requests receive preview URLs. Direct Upload is useful for a one-off static bundle or when another system already performs the build.

Check the first deployment

  • Open the generated pages.dev URL in a private browser window.
  • Visit a page that is not the home page and verify its assets load.
  • Inspect the deployed output if the home page is a 404; the first check is whether index.html is at the output root.

Deploy a site with Workers Static Assets

Workers is appropriate when static files and request-handling code belong in the same project.

  1. Create or enter a Worker project. Use a Wrangler-based project and configure its public/static-assets directory in the project configuration.
  2. Develop locally. Run:
npx wrangler dev
  1. Publish. Run:
npx wrangler deploy

After deployment, Cloudflare can publish the Worker on a *.workers.dev hostname or on a custom domain. Worker code can use bindings and server-side logic while the configured public directory supplies static assets.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When to use a route or a custom domain

Use a Worker Custom Domain or route for a production endpoint. Cloudflare says the workers.dev subdomain is a Free website intended for personal or hobby projects that are not business-critical, so it is better treated as a development or low-stakes address.

Connect your own domain

If you do not own a domain yet, register one before this step. The registrar is separate from hosting; you will still configure the DNS and domain association in Cloudflare.

Rank #3
NETGEAR Nighthawk WiFi 6 Router R6700AX, Up to 1,500 sq ft, 1.8 Gbps
  • NIGHTHAWK WIFI 6 ROUTER FOR YOUR WHOLE HOME: Delivers fast, reliable WiFi across every room of your apartment or small home for streaming, gaming, video calls, and smart home devices, all running at the same time without slowing each other down.
  • WORKS WITH YOUR EXISTING INTERNET SERVICE: Pairs with your existing modem or gateway via ethernet. Compatible with most cable, fiber, DSL, and satellite providers. Some gateways and modem router combos may require bridge mode. No coax needed.
  • SET UP AND MANAGE YOUR NETWORK WITH THE NIGHTHAWK APP: Download the free Nighthawk app on iOS or Android for guided setup. Manage WiFi, run speed tests, pause devices, and set up guest networks from anywhere. Active internet required.
  • READY FOR THE DEVICES YOU ALREADY OWN: Your phones, laptops, and TVs work right out of the box. WiFi 6 delivers speeds up to 1.8 Gbps across 2.4 GHz and 5 GHz bands. Backward compatible with WiFi 5 and earlier.
  • COVERAGE IN EVERY ROOM: Covers up to 1,500 sq. ft. for up to 20 connected devices. Walls, floors, and interference can reduce range. Larger or multi-story homes may benefit from a NETGEAR Orbi mesh WiFi system.

Pages custom domain

  1. Open the Pages project in the Cloudflare dashboard.
  2. Open Custom domains and add your domain.
  3. Complete the association shown by Cloudflare before relying on a DNS record.

An apex domain such as example.com must be a Cloudflare zone with its nameservers pointed to Cloudflare. For a subdomain such as www.example.com, Cloudflare can use a CNAME pointing to your project’s <YOUR_SITE>.pages.dev hostname. Associate the hostname in the Pages dashboard first; manually adding only the CNAME can result in a 522.

Workers custom domain

  1. Open the Worker and go to Settings > Domains & Routes.
  2. Choose Custom Domain and add the hostname.
  3. Let Cloudflare create the DNS record and certificate.

Worker routes are another production option when traffic should match a path or pattern on a zone rather than use a dedicated hostname.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deployment decisions that prevent surprises

Requirement Recommended choice Why
Static HTML or generated framework site Pages Git builds, Direct Upload, previews, and a pages.dev address.
Worker code, server-side behavior, or bindings Workers Static Assets Static files and edge code deploy together through Wrangler.
Pull-request previews Pages with Git integration Pages creates preview deployments for pull requests.
Production hostname Custom domain or route Use a domain you control rather than treating workers.dev as a business-critical endpoint.
New Workers Sites project Do not select it Cloudflare marks Workers Sites deprecated.

Troubleshoot common failures

Pages returns a 404 at the root

Cause: the deployed output does not contain a top-level index.html. Fix: inspect the build output and change the Pages output directory so it points directly to the folder containing that file.

Framework deployment succeeds but shows a blank page

Cause: the build command or output directory does not match the framework’s static export. Fix: run the build locally, identify the generated folder, and use that exact command and folder in Pages. For the documented static Next.js pattern, use npx next build with out as the output directory.

Custom domain returns 522

Cause: a DNS record was added before the Pages custom-domain association was completed, or the record points to the wrong target. Fix: remove the improvised record if necessary, add the hostname under the project’s Custom domains menu, and follow the resulting DNS instructions.

Rank #4
Sale
TP-Link BE6500 Dual-Band WiFi 7 Router (BE400)
  • 𝐅𝐮𝐭𝐮𝐫𝐞-𝐑𝐞𝐚𝐝𝐲 𝐖𝐢-𝐅𝐢 𝟕 - Designed with the latest Wi-Fi 7 technology, featuring Multi-Link Operation (MLO), Multi-RUs, and 4K-QAM. Achieve optimized performance on latest WiFi 7 laptops and devices, like the iPhone 16 Pro, and Samsung Galaxy S24 Ultra.
  • 𝟔-𝐒𝐭𝐫𝐞𝐚𝐦, 𝐃𝐮𝐚𝐥-𝐁𝐚𝐧𝐝 𝐖𝐢-𝐅𝐢 𝐰𝐢𝐭𝐡 𝟔.𝟓 𝐆𝐛𝐩𝐬 𝐓𝐨𝐭𝐚𝐥 𝐁𝐚𝐧𝐝𝐰𝐢𝐝𝐭𝐡 - Achieve full speeds of up to 5764 Mbps on the 5GHz band and 688 Mbps on the 2.4 GHz band with 6 streams. Enjoy seamless 4K/8K streaming, AR/VR gaming, and incredibly fast downloads/uploads.
  • 𝐖𝐢𝐝𝐞 𝐂𝐨𝐯𝐞𝐫𝐚𝐠𝐞 𝐰𝐢𝐭𝐡 𝐒𝐭𝐫𝐨𝐧𝐠 𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐢𝐨𝐧 - Get up to 2,400 sq. ft. max coverage for up to 90 devices at a time. 6x high performance antennas and Beamforming technology, ensures reliable connections for remote workers, gamers, students, and more.
  • 𝐔𝐥𝐭𝐫𝐚-𝐅𝐚𝐬𝐭 𝟐.𝟓 𝐆𝐛𝐩𝐬 𝐖𝐢𝐫𝐞𝐝 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞 - 1x 2.5 Gbps WAN/LAN port, 1x 2.5 Gbps LAN port and 3x 1 Gbps LAN ports offer high-speed data transmissions.³ Integrate with a multi-gig modem for gigplus internet.
  • 𝐎𝐮𝐫 𝐂𝐲𝐛𝐞𝐫𝐬𝐞𝐜𝐮𝐫𝐢𝐭𝐲 𝐂𝐨𝐦𝐦𝐢𝐭𝐦𝐞𝐧𝐭 - TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.

Certificate issuance is blocked

Cause: an existing CAA record does not permit an accepted certificate authority. Fix: review the zone’s CAA records and allow a certificate authority accepted by Cloudflare, then retry certificate issuance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Worker deploys but assets are missing

Cause: the public/static-assets directory is not configured correctly or does not contain the built files. Fix: verify the directory in the Wrangler configuration, place the generated assets there, test with npx wrangler dev, and deploy again.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify a live deployment automatically

After publishing, check the production URL from an external request and save a visual snapshot for review. This catches broken navigation, missing assets, consent overlays, and unexpected blank responses that a local test can miss. Test both the apex and www hostnames if you configured both, and test a representative deep URL rather than only the home page.

Or skip the browser setup

ScreenshotNeo can capture your deployed Cloudflare URL with one request. It accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the capture; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools to Claude, Cursor, and other MCP clients.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo documentation for all 63 options, including full-page lazy-image loading, CSS-selector captures, device presets, retina scale, PDF ranges, custom CSS and JavaScript, waits, request blocking, headers, cookies, geolocation, transparent backgrounds, resizing, cache TTLs, signed links, asynchronous webhooks, bulk capture, and the usage API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account to check your Cloudflare deployment.

Best Value
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
  • Dual band router upgrades to 1200 Mbps high speed internet (300mbps for 2.4GHz plus 900Mbps for 5GHz), reducing buffering and ideal for 4K stream
  • Full Gigabit Ports - Gigabit Router with 4 Gigabit LAN ports, ideal for any internet plan and allow you to directly connect your wired devices
  • Boosted Coverage - Four external antennas equipped with Beamforming technology extend and concentrate the Wi-Fi signals
  • MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home

FAQ

Can I host a plain HTML file without a framework?

Yes. Put index.html at the root of the deployed directory and use Pages Direct Upload or a Git-connected Pages project.

Can Pages run server-side code?

Pages is aimed at static and framework output. If your application needs Worker execution, bindings, or server-side request handling, use Workers Static Assets.

Which hostname should I use for a business site?

Use a Pages custom domain or a Worker custom domain/route. Treat workers.dev as a personal or hobby address rather than a business-critical endpoint.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do I need to move my domain registrar to Cloudflare?

No. For an apex domain on Pages, the domain must be a Cloudflare zone with nameservers pointed to Cloudflare, but registration and DNS hosting are separate services.

Quick Recap

SaleBestseller No. 1
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
VPN SERVER: Archer AX21 Supports both Open VPN Server and PPTP VPN Server
$69.99
Bestseller No. 2
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
$34.99
Bestseller No. 5
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
$44.99

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.