PHPackages                             tfd/laravel-well-known-traffic-advice - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tfd/laravel-well-known-traffic-advice

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tfd/laravel-well-known-traffic-advice
=====================================

A Laravel package that provides a standardized .well-known/traffic-advice endpoint for communicating server load, maintenance windows, and access recommendations to automated clients, crawlers, and partner services.

1.0.5(1y ago)0893[5 PRs](https://github.com/21stdigital/laravel-well-known-traffic-advice/pulls)MITPHPPHP ^8.3CI passing

Since Jul 2Pushed 6mo agoCompare

[ Source](https://github.com/21stdigital/laravel-well-known-traffic-advice)[ Packagist](https://packagist.org/packages/tfd/laravel-well-known-traffic-advice)[ Docs](https://github.com/21stdigital/laravel-well-known-traffic-advice)[ GitHub Sponsors]()[ RSS](/packages/tfd-laravel-well-known-traffic-advice/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (6)Dependencies (13)Versions (12)Used By (0)

Laravel Traffic Advice — Standardized Server Load &amp; Access Recommendations via `.well-known/traffic-advice`
===============================================================================================================

[](#laravel-traffic-advice--standardized-server-load--access-recommendations-via-well-knowntraffic-advice)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1c3924b07b0508d51cd2bb921588e5807e28e33fddbbef535df3a768a1e8d355/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7466642f6c61726176656c2d77656c6c2d6b6e6f776e2d747261666669632d6164766963652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/21stdigital/laravel-well-known-traffic-advice)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d6cf66513a5580e1772372e121214d070660d133f4aa0c1105a8c5ac8e8c487e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f323173746469676974616c2f6c61726176656c2d77656c6c2d6b6e6f776e2d747261666669632d6164766963652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/21stdigital/laravel-well-known-traffic-advice/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7780a49b1ebeacb2edca1a6e856cfc235c8f1808788fb79e7a3334f28385db67/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f323173746469676974616c2f6c61726176656c2d77656c6c2d6b6e6f776e2d747261666669632d6164766963652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/21stdigital/laravel-well-known-traffic-advice/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/38932c7d97d53c7a17422ac197ca9394e8d140de9686d658b56dec9ae195747c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7466642f6c61726176656c2d77656c6c2d6b6e6f776e2d747261666669632d6164766963652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/21stdigital/laravel-well-known-traffic-advice)

This package provides a standardized endpoint for exposing server traffic and load advice, following the emerging `.well-known` convention. It enables your Laravel application to communicate current server load, maintenance windows, or other traffic-related recommendations to automated clients, crawlers, or partner services. This helps external systems make informed decisions about when to access your application, improving reliability and reducing unnecessary load during peak times or scheduled downtimes.

Key features include:

- Customizable checks for server load, CPU usage, and disallowed access times.
- Easy integration with your existing Laravel application.
- Extensible architecture for adding your own traffic advice logic.
- Simple configuration and usage, following Laravel best practices.

Background: What is traffic advice?
-----------------------------------

[](#background-what-is-traffic-advice)

The upcoming Traffic Advice is a standardized way for servers to communicate their current load and access recommendations to automated clients via the `/.well-known/traffic-advice endpoint`. This helps systems like Chrome's Private Prefetch Proxy decide when and how much to prefetch from your site.

By providing information such as server load, allowed prefetch fractions, or disallowing access during maintenance, Traffic Advice helps optimize resource usage and improve reliability. It enables sites to control automated traffic dynamically, reducing unnecessary load during peak times while enhancing user experience when capacity allows.

Implementing this endpoint allows your application to participate in smarter, automated traffic management, benefiting both your server and clients.

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

[](#installation)

You can install the package via composer:

```
composer require tfd/laravel-well-known-traffic-advice
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-well-known-traffic-advice-config"
```

This is the contents of the published config file:

```
