Test Your Local Development with Cloudflare Tunnel

Scan your localhost website for accessibility issues before deploying to production using Cloudflare Tunnel—no deployment required.

Why test locally with Cloudflare Tunnel?

  • Catch issues early: Find accessibility problems before they reach production.
  • No deployment needed: Test your local development server directly without pushing code.
  • Secure connection: Cloudflare Tunnel creates a secure link to your localhost without exposing ports.
  • Save time: Skip the deploy-test-fix cycle and iterate faster.
  • Free to use: Cloudflare Tunnel is completely free for development testing.

Prerequisites

Step-by-step: Set up Cloudflare Tunnel

Step 1: Install cloudflared

Download and install the Cloudflare Tunnel client for your operating system:

macOS (using Homebrew):

brew install cloudflared

Windows (using Chocolatey):

choco install cloudflared

Linux (copy-paste friendly):

curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb -o cloudflared.deb && sudo dpkg -i cloudflared.deb

Or visit the official downloads page above for distribution-specific instructions and repositories.

Official install docs: Cloudflare installation guide

Step 2: Start your local development server

Make sure your website is running locally. For example:

npm run dev
# or
yarn dev
# or
python -m http.server 3000

Note the port number (e.g., 3000, 8080, etc.). Use the URL your dev server actually listens on (usually http://localhost:PORT).

Step 3: Create a tunnel to your localhost

Open a new terminal window and run this command (replace 3000 with your port):

cloudflared tunnel --url http://localhost:3000

For HTTPS local servers, point to the exact URL your server listens on (for example: https://localhost:3000).

Step 4: Copy the public URL

After running the command, look for a line in the terminal that contains a https://...trycloudflare.com URL (Cloudflare typically prints something like “Your quick tunnel is running at: https://...trycloudflare.com”).

# Example: you will see a line containing a https://...trycloudflare.com URL

Copy the public link — this is your temporary URL for testing.

Step 5: Scan with GetWCAG

  1. Go to your GetWCAG dashboard
  2. Create a new project or open an existing one in Workspace
  3. Paste the Cloudflare Tunnel URL (e.g., https://random-words-1234.trycloudflare.com)
  4. Click Start Scan
  5. Review your accessibility report and fix issues in your local code

Step 6: Stop the tunnel when done

When you're finished testing, stop the tunnel by pressing Ctrl + C in the terminal where cloudflared is running.

The public URL will stop working immediately. Your localhost stays private.

⚠️ Important Security Notes

  • The tunnel URL is publicly accessible while running—anyone with the link can access your local site
  • Don't share the tunnel URL publicly or leave it running unattended
  • The URL is temporary and changes each time you start a new tunnel
  • Never expose sensitive data, API keys, or production credentials through a tunnel

💡 Pro Tips

  • Test multiple times: Run scans after each fix to verify improvements
  • Use with CI/CD: Integrate Cloudflare Tunnel into your automated testing pipeline
  • Scan different pages: Update your sitemap or use custom URLs to test specific routes
  • Persistent (named) tunnels: For a persistent URL you need to authenticate and create a named tunnel — this typically requires running cloudflared tunnel login, creating the tunnel, configuring routes/DNS, and then running the named tunnel. See the Cloudflare guide linked above for full steps.
  • Better security: To protect access to your temporary URL, consider using Cloudflare Access / Zero Trust to restrict who can reach the tunnel.

Troubleshooting

Connection "refused" error:

Make sure your local server is running before starting the tunnel

"Command not found: cloudflared":

Reinstall cloudflared or check that it's in your system PATH

Scan shows "Page not found":

Verify the tunnel URL is accessible in your browser first

Tunnel URL keeps changing:

Quick tunnels generate random URLs. Use named tunnels for persistent URLs

Quick tunnel doesn't work:

Do you have a Cloudflare configuration file in ~/.cloudflared/config.yml or ~/.cloudflared/config.yaml? If so, quick tunnels may be disabled. Temporarily rename that file (for example to config.yml.bak) and try again.

Ready to scan your production site?

Next: Learn about sitemaps for better coverage →