> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/cn/content-delivery-network/domain-management/access-control/referer-restrictions.md).

# Referer 限制

基于 Referer 的防盗链保护是指基于 Referer 标头的访问控制。

例如，您可以配置一个 Referer 白名单，以允许只有特定的请求能够访问您的资源，或者配置一个黑名单以阻止特定的请求。基于 Referer 的防盗链保护能够识别和过滤用户身份，从而保护您的资源免受未授权访问。

<div align="left"><figure><img src="/files/HkhGaDAdT8jZNbp7tejn" alt="" width="375"><figcaption></figcaption></figure></div>

<table><thead><tr><th width="147">参数</th><th>描述</th></tr></thead><tbody><tr><td>允许无 Referer</td><td>该规则允许客户端在请求标头中不包含 UA 字段。</td></tr><tr><td>允许空 Referer</td><td>该规则允许客户端在标头中使用空值请求 UA。</td></tr><tr><td>允许列表 &#x26; 阻止列表</td><td><ul><li>允许列表<br>指定重定向 URL。如果请求中的 Referer 信息与白名单不匹配，在请求被阻止后不会返回 HTTP 403 状态码，而是返回 HTTP 302 状态码和 Location 标头。此参数是 Location 标头的值，以 <code>http://</code> 或 <code>https://</code> 开头，例如 <code>http://www.example.com</code>。</li><li>阻止列表<br>指定重定向 URL。如果请求中的 Referer 信息与黑名单匹配，在请求被阻止后不会返回 HTTP 403 状态码，而是返回 HTTP 302 状态码和 Location 标头。此参数是 Location 标头的值，以 <code>http://</code> 或 <code>https://</code> 开头，例如 <code>http://www.example.com</code>。</li></ul></td></tr></tbody></table>
