Linux 软件免费装
Banner图

Posterna

开发者 posterna
更新时间 2026年11月5日 00:39
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

ai robots.txt bots crawlers web bot auth

下载

1.0.0

详情介绍:

Many requests to a WordPress site now come from AI agents and crawlers: training crawlers, search crawlers, assistants fetching a page for a user, and agents acting on someone's behalf. Some say who they are. Some of those are telling the truth. Posterna labels every visitor request with one verdict: It then counts requests by hour, verdict, operator, agent, purpose and path, and shows them in wp-admin. Nothing is blocked, slowed or challenged. Version 1.0 only monitors. What you get, with no account: How it works: Posterna is open source. The verifier follows the same specification and passes the same conformance tests as the Posterna packages for Node.js: https://github.com/posternahq/posterna

安装:

  1. Install and activate Posterna from Plugins > Add New, or upload the posterna folder to wp-content/plugins/.
  2. Open Posterna in the admin menu. Counting starts right away.
  3. Open Check my setup. If your site is behind a proxy, a load balancer or Cloudflare, choose how Posterna should find each visitor's real address in Settings, then check again.
  4. Optionally turn on directory updates or the connection to posterna.com in Settings. Both are off until you turn them on.

升级注意事项:

1.0.0 First release.

常见问题:

Does Posterna block anything?

No. Version 1.0 only labels and counts. It never blocks, throttles or challenges a request, a crawler or a sign-up. Enforcement may come in a later version, as a setting you turn on yourself.

Why are some pages not counted?

Pages served from a full-page cache (a caching plugin, your host's cache or a CDN) never run PHP, so no WordPress plugin sees those requests. Posterna counts only the requests that reach WordPress. "Check my setup" lists the caches it detects. Logged-in users, wp-admin, WP-Cron and WP-CLI are not counted either.

Every visitor shows the same address. What is wrong?

Your site is behind a proxy or load balancer, and WordPress sees the proxy's address instead of the visitor's. Real crawlers then fail their checks. In Settings, choose the header your host or proxy sets to the visitor's address (for example cf-connecting-ip behind Cloudflare, together with Cloudflare's published address ranges), or the number of proxies in front of the site. "Check my setup" shows the result.

Which client address setting does my host need?

Posterna recommends a header only where the host's own documentation confirms its proxy sets it:

For other hosts, ask which header carries the visitor's address and whether their proxy always overwrites it, then confirm with "Check my setup". Many hosts already put the visitor's address in REMOTE_ADDR, which is the default.

What does "claimed, failed the check" mean?

The request names an agent in the directory, for example Googlebot, but its address is not one the operator publishes and its reverse DNS does not match. That is how scrapers that pretend to be well-known crawlers usually look. Make sure the client address setting is right before you trust these numbers.

Do I need a posterna.com account?

No. Everything in the plugin works without an account and without contacting any server. The connection to posterna.com is optional and only adds this site to a dashboard there.

What do posterna_get_verdict() and posterna_verdict do?

posterna_get_verdict() returns the verdict for the current request as an array with verdict and, when set, operator, agent, purpose, method, reason, note and error. It returns null in WP-CLI and WP-Cron. The posterna_verdict action fires once per labeled request, on init, with the same array: add_action( 'posterna_verdict', function ( $verdict ) { if ( 'claimed_failed' === $verdict['verdict'] ) { // For example, skip expensive work for a fake crawler. } } ); The verdict is also available to other code as the request headers X-Agent-Verdict, X-Agent-Operator, X-Agent-Purpose and X-Agent-Method (in $_SERVER as HTTP_X_AGENT_VERDICT and so on). Posterna removes any such headers a client sends before setting them.

Does it slow my site down?

In our tests the check took between 0.3 and 0.7 milliseconds per request (median), and it runs before the theme loads. Counting adds one small database write per counted request. Reverse DNS lookups and directory updates run in WP-Cron, never during a page load. "Check my setup" shows how long the check took on your own request.

Where do the agent lists come from?

From the Posterna operator directory, built from each operator's own documentation and published IP lists and keys, plus community records from the ai.robots.txt project. See "Data and credits" below.

更新日志:

1.0.0