# Is It Down? (/docs/experiments/is-it-down)



Check whether any website is reachable from Cloudflare's edge, with response time, status code, and edge location information.

## API Reference [#api-reference]

### GET /check [#get-check]

Checks if the specified URL is reachable and returns timing and status information.

<TypeTable
  type="{
  url: {
    description: &#x22;The target URL to check (must be http or https)&#x22;,
    type: &#x22;string&#x22;,
    required: true,
  },
}"
/>

#### Example Request [#example-request]

```bash
curl "https://your-worker.workers.dev/check?url=https://www.cloudflare.com"
```

#### Success Response (Reachable) [#success-response-reachable]

**`status`** `string`

Reachability status: `"reachable"` or `"unreachable"`

**`responseTime`** `number`

Round-trip response time in milliseconds

**`statusCode`** `number`

HTTP status code returned by the target server

**`colo`** `string`

Cloudflare edge data center (IATA code) that served this check (only available when deployed)

```json
{
  "status": "reachable",
  "responseTime": 87,
  "statusCode": 200,
  "colo": "LHR"
}
```

#### Success Response (Unreachable) [#success-response-unreachable]

**`error`** `string`

Error message explaining why the site is unreachable (only present when status is `"unreachable"`)

```json
{
  "status": "unreachable",
  "responseTime": 5000,
  "statusCode": 0,
  "colo": "SFO",
  "error": "The operation was aborted."
}
```

#### Error Response [#error-response]

```json
{
  "error": "Missing or invalid query parameter: url",
  "code": "INVALID_URL"
}
```

#### Error Codes [#error-codes]

* `400` - Missing or invalid `url` parameter (not http/https)

## Use Cases [#use-cases]

* Monitor website availability from the edge
* Measure response times from different geographic locations
* Build uptime monitoring tools
* Check if a site is down globally or just from your location

## Limitations [#limitations]

* Checks from the edge colo serving the request, not from every region globally
* Fetch timeout may mark slow but reachable sites as down
* HTTP reachability only; no SSL certificate or DNS health checks

## Deployment [#deployment]

<Steps>
  <Step>
    ### Click the deploy button [#click-the-deploy-button]

    [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/shrinathsnayak/cloudflare-experiments/tree/main/apps/experiments/is-it-down)
  </Step>

  <Step>
    ### Deploy [#deploy]

    Follow the deployment wizard to deploy the Worker to your Cloudflare account. No additional configuration required.
  </Step>

  <Step>
    ### Test your deployment [#test-your-deployment]

    ```bash
    curl "https://your-worker.workers.dev/check?url=https://example.com"
    ```
  </Step>
</Steps>

## Local Development [#local-development]

```bash
cd apps/experiments/is-it-down
npm install
npm run dev
```

Test locally:

```bash
curl "http://localhost:8787/check?url=https://www.cloudflare.com"
```

<Callout>
  The `colo` field will not be populated during local development. It only appears when deployed to Cloudflare Workers.
</Callout>

## Cloudflare Features Used [#cloudflare-features-used]

* **[Workers](https://developers.cloudflare.com/workers/)** - Edge compute runtime
* **[Fetch API](https://developers.cloudflare.com/workers/runtime-apis/fetch/)** - HTTP requests with timing
* **[Edge network](https://developers.cloudflare.com/workers/reference/how-workers-works/)** - Request metadata including data center location
