[Yandex Cloud documentation](../../index.md) > [Yandex Smart Web Security](../index.md) > [Step-by-step guides](index.md) > Domains > Setting up the infrastructure

# Setting up the infrastructure

To route the network traffic between users and resources connected to your domain via a Yandex Smart Web Security [proxy server](../concepts/domain-protect.md#proxy), create a type A [resource record](../../dns/concepts/resource-record.md#a) in your domain’s public [DNS zone](../../dns/concepts/dns-zone.md#public-zones). The A record specifies that requests to your domain must be forwarded to the proxy server's public IPv4 address. To prohibit requests to resources other than through the proxy server, configure traffic restrictions on your server.

To set up your infrastructure to use a proxy server:

{% list tabs group=instructions %}

- Management console {#console}

  1. Find out the proxy server's public IPv4 address:

      1. In the [management console](https://console.yandex.cloud), select the [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) containing your proxy server.
      1. Navigate to **Smart Web Security**.
      1. In the left-hand panel, select ![domain-protection-icon](../../_assets/smartwebsecurity/domain-protection-icon.svg) **Domain security** and select the proxy server of interest.

          Save the proxy server’s IPv4 address under **Overview** in the **Public IP** field: you will need it to create a resource DNS record.
  1. Add a resource [A record](../../dns/concepts/resource-record.md#a) to your domain's public DNS zone, with values specified as follows:
     
     * `Record name`: Your domain's address, ending with a dot. Example: `example.com.` or `my.first.example.com.`.
     * `Value`: Proxy server's IPv4 address you obtained in the previous step.
     
     This record redirects requests coming to your domain to the proxy server IP address.
     
     {% note info %}
     
     If your domain is delegated to Yandex Cloud DNS, create a resource record according to [this guide](../../dns/operations/resource-record-create.md). Otherwise, use your domain name registrar's personal account. If you have any questions, refer to the relevant documentation or contact the registrar's support service.
     
     {% endnote %}
  1. In your server settings, block all connections except those for [Yandex Cloud IP addresses](../../overview/concepts/public-ips.md).

{% endlist %}

### Useful links {#see-also}

* [Checking resource availability](validate-availability.md)
* [Creating a proxy server](proxy-create.md)
* [Adding a domain](domain-create.md)
* [Connecting a security profile to a resource](host-connect.md)