Title: Staging Bot Block
Author: Jared Pomranky
Published: <strong>2025 年 12 月 13 日</strong>
Last modified: 2025 年 12 月 13 日

---

搜索插件

![](https://ps.w.org/staging-bot-block/assets/banner-772x250.png?rev=3418634)

![](https://ps.w.org/staging-bot-block/assets/icon-256x256.png?rev=3418623)

# Staging Bot Block

 作者：[Jared Pomranky](https://profiles.wordpress.org/jaredpomranky/)

[下载](https://downloads.wordpress.org/plugin/staging-bot-block.1.0.1.zip)

 * [详情](https://cn.wordpress.org/plugins/staging-bot-block/#description)
 * [评价](https://cn.wordpress.org/plugins/staging-bot-block/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/staging-bot-block/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/staging-bot-block/#developers)

 [支持](https://wordpress.org/support/plugin/staging-bot-block/)

## 描述

Staging sites often get accidentally indexed by Google or Bing, leading to duplicate
content, keyword cannibalization, and production pages being outranked by staging
domains. This plugin prevents that from happening.

Staging Bot Block can:
 * Block search engine bots with a 403 response and proper
X-Robots-Tag headers. * Redirect bots (or bots and users) to your production domain
when needed. * Display a persistent warning banner inside the WordPress admin so
developers never forget that staging protections are active. * Support additional
user agents through an easy settings field.

### Important Notes for Staging Environments

If your hosting platform or CDN uses full-page caching (such as Cloudflare APO, 
WP Rocket’s page cache, or server-level varnish), cached HTML may be served directly
without loading WordPress. When this happens, Staging Bot Block cannot inspect user
agents, block bots, or send redirect headers.

To ensure correct behavior:
 * Disable Cloudflare APO or create a Cache Rule to 
bypass cache for the staging subdomain or for Googlebot/Bingbot. * Clear or disable
caching plugins on staging. * Avoid server-level caching for staging domains.

Once caching is disabled or bypassed, all HTML pages will properly return a 403 
for blocked bots or a redirect when configured.

## 屏幕截图

 * [[
 * Plugin settings screen.

## 安装

 1. Upload the plugin folder to `/wp-content/plugins/` or install directly through 
    the WordPress Plugins screen.
 2. Activate the plugin.
 3. Go to “Settings  Staging Bot Block.”
 4. Enable the plugin and select your preferred handling mode.
 5. (Optional) Add extra user agents to block.

## 常见问题

### Will this block all bots?

No. It only blocks common search engine crawlers (Googlebot, Bingbot, Yandex, etc.)
plus any additional user agents you add.

### Why do I still see 200 responses in my crawler?

Static assets (images, JS, CSS) bypass WordPress and cannot be intercepted. Only
HTML pages are blocked or redirected.

### Why does my home page still return 200 as Googlebot?

This usually means your CDN or cache plugin is serving cached HTML. See the “Important
Notes for Staging Environments” section.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Staging Bot Block」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Jared Pomranky ](https://profiles.wordpress.org/jaredpomranky/)

[帮助将「Staging Bot Block」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/staging-bot-block)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/staging-bot-block/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/staging-bot-block/)，或通过[RSS](https://plugins.trac.wordpress.org/log/staging-bot-block/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/staging-bot-block/)。

## 更新日志

#### 1.0.0

 * Initial public release
 * Bot blocking and redirect modes
 * X-Robots-Tag support
 * Admin warning banner
 * Optional extra user agents field
 * Activation notice

#### 1.0.1

 * Tested up to 6.9

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**6 月前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 4.6 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 7.2 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/staging-bot-block/)
 * 标签
 * [bot block](https://cn.wordpress.org/plugins/tags/bot-block/)[redirects](https://cn.wordpress.org/plugins/tags/redirects/)
   [robots](https://cn.wordpress.org/plugins/tags/robots/)[seo](https://cn.wordpress.org/plugins/tags/seo/)
   [staging](https://cn.wordpress.org/plugins/tags/staging/)
 *  [高级视图](https://cn.wordpress.org/plugins/staging-bot-block/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/staging-bot-block/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/staging-bot-block/reviews/)

## 贡献者

 *   [ Jared Pomranky ](https://profiles.wordpress.org/jaredpomranky/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/staging-bot-block/)