# Referer Restriction Configuration

The `referer-restriction` plugin allows or rejects requests according to the host in the Referer header on selected routes and services.<!-- --> <!-- -->Configuration covers plugin parameters.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* bypass\_missing

  boolean

  default: `false`

  ***

  If true, allow requests whose `Referer` header is missing or malformed. Otherwise, reject those requests.

* whitelist

  array\[string]

  valid value:

  one or more host names, optionally beginning with `*` for suffix matching

  ***

  Referer hosts that are allowed to access the route or service. All other hosts are rejected.

  Configure either `whitelist` or `blacklist`, but not both.

* blacklist

  array\[string]

  valid value:

  one or more host names, optionally beginning with `*` for suffix matching

  ***

  Referer hosts that are rejected. All other hosts are allowed.

  Configure either `whitelist` or `blacklist`, but not both.

* message

  string

  default: `Your referer host is not allowed`

  valid value:

  between 1 and 1024 characters

  ***

  Message returned in the JSON response when a request is rejected.
