PHPackages                             laravel-freelancer-nl/laravel-index-now - 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. [API Development](/categories/api)
4. /
5. laravel-freelancer-nl/laravel-index-now

ActiveLibrary[API Development](/categories/api)

laravel-freelancer-nl/laravel-index-now
=======================================

Alert search engines of content changes.

v2.1.0(1mo ago)5212.1k—0%5[1 PRs](https://github.com/LaravelFreelancerNL/laravel-index-now/pulls)MITPHPPHP ^8.1CI passing

Since Jun 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/LaravelFreelancerNL/laravel-index-now)[ Packagist](https://packagist.org/packages/laravel-freelancer-nl/laravel-index-now)[ Docs](https://github.com/LaravelFreelancerNL/laravel-index-now)[ GitHub Sponsors](https://github.com/LaravelFreelancerNL)[ RSS](/packages/laravel-freelancer-nl-laravel-index-now/feed)WikiDiscussions next Synced 1mo ago

READMEChangelog (8)Dependencies (31)Versions (13)Used By (0)

Laravel IndexNow - Submit webpage updates to search engines
===========================================================

[](#laravel-indexnow---submit-webpage-updates-to-search-engines)

[![Latest Version on Packagist](https://camo.githubusercontent.com/eda18f294417852e5fe94f9d9bbebcb980a8b2622ac4719ca07b9e573b831bc9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d667265656c616e6365722d6e6c2f6c61726176656c2d696e6465782d6e6f772e7376673f7374796c653d666c6174)](https://packagist.org/packages/laravel-freelancer-nl/laravel-index-now)[![Code Quality](https://camo.githubusercontent.com/a870bc43ae073efeb9ce23c1ae4fd24b69be521f057930572da0b2c53a01bff8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4c61726176656c467265656c616e6365724e4c2f6c61726176656c2d696e6465782d6e6f772f7175616c6974792d6173737572616e63652e796d6c3f6272616e63683d6e657874266c6162656c3d7175616c6974792532306173737572616e6365)](https://github.com/LaravelFreelancerNL/laravel-index-now/actions/workflows/quality-assurance.yml?query=branch%3Anext)[![Tests](https://camo.githubusercontent.com/bcb183ad22c88c54a001f65883a614c9131ba1b6423becc661f65aa8833edcab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4c61726176656c467265656c616e6365724e4c2f6c61726176656c2d696e6465782d6e6f772f72756e2d74657374732e796d6c3f6272616e63683d6e657874266c6162656c3d7465737473)](https://github.com/LaravelFreelancerNL/laravel-index-now/actions/workflows/run-tests.yml?query=branch%3Anext)[![Code Coverage](https://camo.githubusercontent.com/f19919770445b4f1221604cbac6ab724b86d4e79c21a42590362f151723f5494/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4c61726176656c467265656c616e6365724e4c2f6c61726176656c2d696e6465782d6e6f772f636f7665726167652e796d6c3f6272616e63683d6e657874266c6162656c3d636f766572616765)](https://github.com/LaravelFreelancerNL/laravel-index-now/actions/workflows/coverage.yml?query=branch%3Anext)[![License](https://camo.githubusercontent.com/9e9bb45392fc85dec51f5b256dace7dd4d6042da9d763a606e362072b1e679d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c61726176656c467265656c616e6365724e4c2f6c61726176656c2d696e6465782d6e6f77)](https://github.com/LaravelFreelancerNL/laravel-index-now/blob/next/LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/c3e7a8aff262d06b344cba3cd0406d1490c4a1e413644ef235de868a54f4db45/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d667265656c616e6365722d6e6c2f6c61726176656c2d696e6465782d6e6f772e7376673f7374796c653d666c6174)](https://packagist.org/packages/laravel-freelancer-nl/laravel-index-now)

This packages provides a wrapper to use the IndexNow api in Laravel. This makes indexing new webpages in (some) search engines easy and fast. It makes for a nice little addition to sitemaps.

[IndexNow](https://www.indexnow.org) is an API created by Microsoft Bing &amp; Yandex to allow you to submit page changes to their search engines quickly. A submission to one search engine will automatically pass the submission on to the others.

At the time of this writing Google is considering supporting the API and [has announced it will be testing it](https://www.searchenginejournal.com/google-will-be-testing-indexnow/426602/).

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

[](#installation)

You can install the package via composer:

```
composer require laravel-freelancer-nl/laravel-index-now
```

You can publish the config file with:

```
php artisan vendor:publish --tag="index-now-config"
```

This is the contents of the published config file:

```
return [
    'host' => parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST) ?? 'localhost',
    'key' => env('INDEXNOW_KEY', ''),
    'key-location' => env('INDEXNOW_KEY_LOCATION', ''),
    'log-failed-submits' => env('INDEXNOW_LOG_FAILED_SUBMITS', true),
    'production-env' => env('INDEXNOW_PRODUCTION_ENV', 'production'),
    'search-engine' => env('INDEXNOW_SEARCH_ENGINE', 'api.indexnow.org'),
    'delay' => env('INDEXNOW_SUBMIT_DELAY', 600),
];
```

- *host*: the hostname for which you will submit pages to the search engine, without scheme or path
- *key*: the unique key for this domain (you will generate one in the next step)
- *key-location*: the directory and/or prefix to the key file within your public site; the package derives the public `keyLocation` URL from `APP_URL`, or falls back to `https://` when `APP_URL` is empty
- *log-failed-submits*: whether to log skipped submit attempts when the current environment does not match `_production-env_`
- *production-env*: the name of the production environment;
- *search-engine*: the domain of the specific search engine you wish to submit too.
- *delay*: the delay in seconds for delayed page submissions.

### Generate a new key

[](#generate-a-new-key)

The IndexNow API matches the request key to a key file within the host domain. To generate the keyfile you use the following artisan command:

```
php artisan index-now:generate-key
```

This will create a keyfile in the public\_dir() of your project and output the key. Copy the displayed key and place it in your .env file.

If you've set a key location in the config it will be prefixed to the file, and the package will derive the public `keyLocation` URL from your `APP_URL`, or fall back to `https://` when `APP_URL` is empty.

Running this command multiple times will generate a new key and key file.

### Only submit pages for your production environment

[](#only-submit-pages-for-your-production-environment)

You probably don't want to submit pages in any environment other than production.

By default, this package assumes that your production environment is called 'production' and will only submit when it matches the configured name in the package.

In the case of an environment mismatch it will log a submission 'attempt' instead of actually submitting the page to the search engines.

If you use an alternative name for your production environment you can set INDEXNOW\_PRODUCTION\_ENV in your .env to match.

You can disable this by setting INDEXNOW\_PRODUCTION\_ENV to false.

If you want to keep the environment check but suppress those log entries, set INDEXNOW\_LOG\_FAILED\_SUBMITS to false.

Usage
-----

[](#usage)

You can submit one or more pages per request by calling the facade and passing the url(s) to the submit method.

Note that the urls must be fully qualified without query parameters and without a fragment.

### Submit a single page

[](#submit-a-single-page)

```
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;

IndexNow::submit('https://dejacht.nl/jagen');
```

### Submit a multiple pages

[](#submit-a-multiple-pages)

To submit multiple pages at once just add an array of urls.

```
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;

IndexNow::submit([
    'https://dejacht.nl',
    'https://dejacht.nl/fotoquiz/',
    'https://dejacht.nl/jagen/',
    'https://dejacht.nl/jachtvideos/',
]);
```

### Prevent spam: delay page submissions

[](#prevent-spam-delay-page-submissions)

You can delay page submissions by using the delaySubmission method. This dispatches the IndexNowSubmitJob with a delay in seconds as configured. The job is unique by payload, so multiple submissions of the same urls won't push a job to the queue before the current one is handled.

```
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;

IndexNow::delaySubmission('https://devechtschool.nl');
```

You can override the configured default delay by adding your own.

```
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;

IndexNow::delaySubmission('https://devechtschool.nl', 100);
```

#### When to delay submits

[](#when-to-delay-submits)

It isn't uncommon for people to make additional edits after creating or updating a page. On these actions it is a good idea to delay the submission.

When deleting pages you can just submit the urls immediately.

Testing
-------

[](#testing)

```
composer test
```

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 Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Bas](https://github.com/LaravelFreelancerNL)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance89

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 64.1% 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 ~196 days

Recently: every ~183 days

Total

8

Last Release

58d ago

Major Versions

v1.3.1 → v2.0.02025-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/43ec692d94f43c644568ad6ea2245e907f5deb7cc713322711069976f707c632?d=identicon)[LaravelFreelancerNL](/maintainers/LaravelFreelancerNL)

---

Top Contributors

[![LaravelFreelancerNL](https://avatars.githubusercontent.com/u/36150929?v=4)](https://github.com/LaravelFreelancerNL "LaravelFreelancerNL (66 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (22 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")[![it-can](https://avatars.githubusercontent.com/u/644288?v=4)](https://github.com/it-can "it-can (2 commits)")

---

Tags

laravelseoindexnowsearch engines

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/laravel-freelancer-nl-laravel-index-now/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-freelancer-nl-laravel-index-now/health.svg)](https://phpackages.com/packages/laravel-freelancer-nl-laravel-index-now)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[codebar-ag/laravel-zammad

Zammad integration with Laravel

106.1k](/packages/codebar-ag-laravel-zammad)

PHPackages © 2026

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