Header lập chỉ mục tài sản

Trình lập kế hoạch X-Robots-Tag Header

Chọn quy tắc tài sản và tạo cấu hình X-Robots-Tag cho Nginx, Apache, Netlify và Vercel trước khi ra mắt.

Sẵn sàng100/100
Nghiêm trọng0
Cảnh báo0
Sẵn sàng2
Quy tắc2

Cấu hình đã tạo

location ~* \.(pdf)$ {
  add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
}

location ~* \.(jpg|png|webp)$ {
  add_header X-Robots-Tag "noindex, noimageindex" always;
}

Xem trước báo cáo

# Kế hoạch X-Robots-Tag Header

- Dự án: Website launch assets
- Bot mục tiêu: all
- Quy tắc: 2
- Nghiêm trọng: 0
- Cảnh báo: 0
- Sẵn sàng: 2


## Nginx
```nginx
location ~* \.(pdf)$ {
  add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
}

location ~* \.(jpg|png|webp)$ {
  add_header X-Robots-Tag "noindex, noimageindex" always;
}
```

## Apache
```apache
# Requires mod_headers

<FilesMatch "\.(pdf)$">
  Header set X-Robots-Tag "noindex, nofollow, noarchive"
</FilesMatch>

<FilesMatch "\.(jpg|png|webp)$">
  Header set X-Robots-Tag "noindex, noimageindex"
</FilesMatch>
```

## Netlify
```text
/downloads/*.pdf
  X-Robots-Tag: noindex, nofollow, noarchive

/assets/originals/*
  X-Robots-Tag: noindex, noimageindex
```

## Vercel
```json
{
  "headers": [
    {
      "source": "/downloads/(.*).pdf",
      "headers": [
        {
          "key": "X-Robots-Tag",
          "value": "noindex, nofollow, noarchive"
        }
      ]
    },
    {
      "source": "/assets/originals/(.*)",
      "headers": [
        {
          "key": "X-Robots-Tag",
          "value": "noindex, noimageindex"
        }
      ]
    }
  ]
}
```