PHPackages                             baraja-core/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. [Search &amp; Filtering](/categories/search)
4. /
5. baraja-core/index-now

ActiveLibrary[Search &amp; Filtering](/categories/search)

baraja-core/index-now
=====================

Send ping to search engine by Index now protocol.

v1.0.0(4y ago)446↓100%1PHPPHP ^8.0CI failing

Since Nov 8Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/baraja-core/index-now)[ Packagist](https://packagist.org/packages/baraja-core/index-now)[ Docs](https://github.com/baraja-core/index-now)[ RSS](/packages/baraja-core-index-now/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

IndexNow PHP Protocol
=====================

[](#indexnow-php-protocol)

[![Integrity check](https://github.com/baraja-core/index-now/actions/workflows/main.yml/badge.svg)](https://github.com/baraja-core/index-now/actions)[![License: MIT](https://camo.githubusercontent.com/1a2e0606685ce00663bf829868f794fd3fc9c86f8d80cae324734129e0723a58/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d627269676874677265656e2e737667)](./LICENSE)

Easy-to-use PHP library implementing the IndexNow protocol that allows websites to notify search engines whenever content on any URL is updated or created, enabling instant crawling and discovery.

🎯 Key Features
--------------

[](#-key-features)

- **Instant indexing** - Notify search engines immediately when your content changes
- **Multi-engine support** - Built-in support for Bing and Yandex, with ability to add custom endpoints
- **Simple API** - Single method call to ping search engines about URL changes
- **Lightweight** - Zero external dependencies, uses native PHP cURL
- **PHP 8.0+** - Modern PHP with strict typing and clean architecture

🔍 How It Works
--------------

[](#-how-it-works)

The IndexNow protocol is a simple ping mechanism that informs search engines about recent changes to your website content:

1. **Generate API Key** - Create a unique API key and host it as a text file at your domain root
2. **Initialize Service** - Create an `IndexNow` instance with your API key and target search engine
3. **Send Notifications** - Call `sendChangedUrl()` whenever you update or create content
4. **Search Engine Crawls** - The search engine receives the ping and prioritizes crawling your URL

```
┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Your Website  │     │    IndexNow     │     │  Search Engine  │
│                 │     │     Library     │     │   (Bing/Yandex) │
└────────┬────────┘     └────────┬────────┘     └────────┬────────┘
         │                       │                       │
         │  Content Updated      │                       │
         │──────────────────────>│                       │
         │                       │                       │
         │                       │  HTTP GET with URL    │
         │                       │──────────────────────>│
         │                       │                       │
         │                       │     200 OK            │
         │                       │
