網站上線 QA

Staging 防索引檢查清單

貼上 staging、preview、QA 和 dev URL,產生多層防索引保護,避免非正式站出現在搜尋結果裡。

就緒100/100
Staging 目標0
疑似正式0
必做檢查8
設定片段4

Staging 目標

支援完整 URL、裸域名、預覽域名和 localhost。

目標0
嚴重項0
平台Vercel
模式已加鎖

目標複查

貼上 staging 目標或載入範例來產生清單。

防索引清單

嚴重

Password or access control

用密碼、VPN、Basic Auth 或平台存取控制保護 staging。

嚴重

Staging robots.txt

只在 staging 提供 Disallow 全站的 robots.txt。

嚴重

Meta robots noindex

給 staging HTML 頁面加 noindex,nofollow 作為第二層保護。

嚴重

X-Robots-Tag header

對 HTML 和檔案回應送出 X-Robots-Tag: noindex, nofollow。

警告

Sitemap exclusion

不要發布 staging sitemap,也不要提交到 Search Console。

警告

Production canonical

僅在內容完全對應時,把 staging canonical 到正式 URL。

提示

Analytics exclusion

從分析、廣告像素和轉換看板中排除 staging 流量。

警告

Production deploy gate

在發布清單裡明確只有正式部署才移除防索引保護。

產生設定片段

robots

User-agent: *
Disallow: /

# Serve this robots.txt only on staging, preview, QA, and dev hosts.

meta

<meta name="robots" content="noindex,nofollow,noarchive,nosnippet">

header

X-Robots-Tag: noindex, nofollow, noarchive, nosnippet

platform

// vercel.json
{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "X-Robots-Tag", "value": "noindex, nofollow, noarchive, nosnippet" }
      ]
    }
  ]
}

報告預覽

# Staging 防索引檢查清單

- 目標: 0
- 疑似 staging: 0
- 疑似正式域名: 0
- 必做檢查: 8
- 設定片段: 4

## 目標

## 檢查清單
- [ ] Password or access control: 用密碼、VPN、Basic Auth 或平台存取控制保護 staging。
- [ ] Staging robots.txt: 只在 staging 提供 Disallow 全站的 robots.txt。
- [ ] Meta robots noindex: 給 staging HTML 頁面加 noindex,nofollow 作為第二層保護。
- [ ] X-Robots-Tag header: 對 HTML 和檔案回應送出 X-Robots-Tag: noindex, nofollow。
- [ ] Sitemap exclusion: 不要發布 staging sitemap,也不要提交到 Search Console。
- [ ] Production canonical: 僅在內容完全對應時,把 staging canonical 到正式 URL。
- [ ] Analytics exclusion: 從分析、廣告像素和轉換看板中排除 staging 流量。
- [ ] Production deploy gate: 在發布清單裡明確只有正式部署才移除防索引保護。

## 設定片段

### robots
```
User-agent: *
Disallow: /

# Serve this robots.txt only on staging, preview, QA, and dev hosts.
```

### meta
```
<meta name="robots" content="noindex,nofollow,noarchive,nosnippet">
```

### header
```
X-Robots-Tag: noindex, nofollow, noarchive, nosnippet
```

### platform
```
// vercel.json
{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "X-Robots-Tag", "value": "noindex, nofollow, noarchive, nosnippet" }
      ]
    }
  ]
}
```