PHPackages                             spatie/http-status-check - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. spatie/http-status-check

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

spatie/http-status-check
========================

CLI tool to crawl a website and check HTTP status code

4.0.0(2y ago)60148.0k87MITPHPPHP ^8.1CI passing

Since Nov 2Pushed 7mo ago19 watchersCompare

[ Source](https://github.com/spatie/http-status-check)[ Packagist](https://packagist.org/packages/spatie/http-status-check)[ Docs](https://github.com/spatie/http-status-checker)[ RSS](/packages/spatie-http-status-check/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (23)Used By (0)

Check the HTTP status code of all links on a website
====================================================

[](#check-the-http-status-code-of-all-links-on-a-website)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a112a511939f28bf86c4c1bc493d27b98d10a4019e443cfdc612d83de545c6f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f687474702d7374617475732d636865636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/http-status-check)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Tests](https://github.com/spatie/http-status-check/workflows/Tests/badge.svg)](https://github.com/spatie/http-status-check/workflows/Tests/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/53d48eb7e785318a056e1e8bd7384f47cd992d24b4a6245b2bbb7ce725e0a159/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f687474702d7374617475732d636865636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/http-status-check)

This repository provides a tool to check the HTTP status code of every link on a given website.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/71f8b1780f6bbd3d12b0c213f2ddfb99a207d4d2e3c82115fe7e1676cc6f16f1/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f687474702d7374617475732d636865636b2e6a70673f743d31)](https://spatie.be/github-ad-click/http-status-check)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Installation
------------

[](#installation)

This package can be installed via Composer:

```
composer global require spatie/http-status-check
```

Usage
-----

[](#usage)

This tool will scan all links on a given website:

```
http-status-check scan https://example.com
```

It outputs a line per link found. Here's an example on Laracast website scan:

[![screenshot](https://camo.githubusercontent.com/ec4b59acc5906add7433c347a66ba92a0f0a0939d70523e05159fdd272abcdef/68747470733a2f2f667265656b2e6465762f75706c6f6164732f323031352f31312f73637265656e73686f742e706e67)](https://camo.githubusercontent.com/ec4b59acc5906add7433c347a66ba92a0f0a0939d70523e05159fdd272abcdef/68747470733a2f2f667265656b2e6465762f75706c6f6164732f323031352f31312f73637265656e73686f742e706e67)

When the crawling process is finished a summary will be shown.

By default the crawler uses 10 concurrent connections to speed up the crawling process. You can change that number by passing a different value to the `--concurrency` option:

```
http-status-check scan https://example.com --concurrency=20
```

You can also write all urls that gave a non-2xx or non-3xx response to a file:

```
http-status-check scan https://example.com --output=log.txt
```

When the crawler finds a link to an external website it will by default crawl that link as well. If you don't want the crawler to crawl such external urls use the `--dont-crawl-external-links` option:

```
http-status-check scan https://example.com --dont-crawl-external-links
```

By default, requests timeout after 10 seconds. You can change this by passing the number of seconds to the `--timeout` option:

```
http-status-check scan https://example.com --timeout=30
```

By default, the crawler will respect robots data. You can ignore them though with the `--ignore-robots` option:

```
http-status-check scan https://example.com --ignore-robots
```

If your site requires a basic authentification, you can use the `--auth` option:

```
http-status-check scan https://example.com --auth=username:password
```

Testing
-------

[](#testing)

To run the tests, first make sure you have [Node.js](https://nodejs.org/) installed. Then start the included node based server in a separate terminal window:

```
cd tests/server
npm install
node server.js
```

With the server running, you can start testing:

```
vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [Sebastian De Deyne](https://github.com/sebastiandedeyne)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance43

Moderate activity, may be stable

Popularity49

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 61.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~132 days

Recently: every ~303 days

Total

22

Last Release

1061d ago

Major Versions

0.0.1 → 1.0.02015-11-03

1.0.2 → 2.0.02016-12-05

2.5.0 → 3.0.02017-12-24

3.4.0 → 4.0.02023-06-14

PHP version history (6 changes)0.0.1PHP &gt;=5.6.0

1.0.1PHP &gt;=5.5.0

2.0.0PHP ^7.0

3.0.0PHP ^7.1

3.3.0PHP ^7.3|^8.0

4.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (81 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (7 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (7 commits)")[![brendt](https://avatars.githubusercontent.com/u/6905297?v=4)](https://github.com/brendt "brendt (5 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (3 commits)")[![bobemoe](https://avatars.githubusercontent.com/u/2304970?v=4)](https://github.com/bobemoe "bobemoe (3 commits)")[![chapeupreto](https://avatars.githubusercontent.com/u/834048?v=4)](https://github.com/chapeupreto "chapeupreto (3 commits)")[![nlemoine](https://avatars.githubusercontent.com/u/2526939?v=4)](https://github.com/nlemoine "nlemoine (2 commits)")[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (2 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (2 commits)")[![akoepcke](https://avatars.githubusercontent.com/u/5311185?v=4)](https://github.com/akoepcke "akoepcke (2 commits)")[![ramirovarandas](https://avatars.githubusercontent.com/u/15105992?v=4)](https://github.com/ramirovarandas "ramirovarandas (1 commits)")[![Rhincodon](https://avatars.githubusercontent.com/u/6630959?v=4)](https://github.com/Rhincodon "Rhincodon (1 commits)")[![sailingdeveloper](https://avatars.githubusercontent.com/u/3988671?v=4)](https://github.com/sailingdeveloper "sailingdeveloper (1 commits)")[![thecaliskan](https://avatars.githubusercontent.com/u/13554944?v=4)](https://github.com/thecaliskan "thecaliskan (1 commits)")[![Timi7007](https://avatars.githubusercontent.com/u/5683832?v=4)](https://github.com/Timi7007 "Timi7007 (1 commits)")[![vmitchell85](https://avatars.githubusercontent.com/u/1248035?v=4)](https://github.com/vmitchell85 "vmitchell85 (1 commits)")[![oversoul](https://avatars.githubusercontent.com/u/2866351?v=4)](https://github.com/oversoul "oversoul (1 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")[![Dylan-DPC](https://avatars.githubusercontent.com/u/99973273?v=4)](https://github.com/Dylan-DPC "Dylan-DPC (1 commits)")

---

Tags

curlhealthhttpseostatuscodehttpspatiecheckcrawlerstatus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/spatie-http-status-check/health.svg)

```
[![Health](https://phpackages.com/badges/spatie-http-status-check/health.svg)](https://phpackages.com/packages/spatie-http-status-check)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[laravel-lang/http-statuses

Translation of HTTP statuses

283.2M7](/packages/laravel-lang-http-statuses)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
