> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1046.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure WAAP for a new domain

Web Application and API Protection (WAAP) is a single SaaS tool that combines all aspects of website security and traffic management, including Layer 7 DDoS protection, and web application security.

Securing an application with WAAP involves three main steps:

1. Create a Gcore CDN resource for the domain.
2. Enable WAAP protection in the resource settings.
3. Verify traffic behavior to help ensure legitimate requests are not blocked.

The following guide walks through this process and explains how to configure WAAP according to specific requirements.

<Tip>
  **Tip**

  After you enable WAAP, all traffic will be diverted to our network, and it may cause a temporary disruption for your users. We recommend setting up Gcore WAAP during a low-traffic period to minimize the impact.
</Tip>

## Step 1. Create a CDN resource

To secure your web application and APIs with Gcore WAAP, it's necessary to create a CDN resource associated with your website's origin. If you also need to add an SSL certificate, check out the [Add an SSL certificate to deliver content over HTTPS](/cdn/ssl-certificates/add-an-ssl-certificate-to-deliver-content-over-https) guide.

<Info>
  **Info**

  When configuring a resource, you need to update your domain's DNS records so they point to our network. This is necessary to allow all traffic to pass through WAAP.
</Info>

<Tabs>
  <Tab title="Create a resource with Gcore Managed DNS">
    If you don't have Gcore CDN configured, follow the instructions from this guide: [Create a CDN resource for the entire site](/cdn/getting-started/create-a-cdn-resource/create-a-cdn-resource-for-the-entire-site).
  </Tab>

  <Tab title="Create a resource with your DNS provider">
    If you want to use a custom DNS provider, configure the resource according to the following steps.

    1. Go to the [CDN page](https://portal.gcore.com/cdn/resources/list) and click **Create CDN resource**.
    2. In the **Add domain** field, enter your domain name. For example, `waap.mydomain.com`.
    3. Select the **Do not delegate** option to use CDN without changing your DNS provider.
    4. Enable the **Enable WAAP** toggle to activate Web Application and API Protection for your domain.
    5. In the **Origin** section, configure your content origin:
       * Select **Specify content origin** to enter your origin server details.
       * Keep the **Use default Origin group name** toggle enabled, or disable it to specify a custom name.
       * From the **Type of origin authentication** dropdown, select the authentication method if required, or keep it set to **None**.
       * In the **Origin source** field, enter your origin server IP address or domain name.
       * Keep the **Use default port** checkbox selected to use port 80, or deselect it to specify a custom port.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/getting-started/create-resource.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=4a1bb6cedc31d6c8200afba4b71eb910" alt="Create CDN resource form" width="1018" height="1665" data-path="images/docs/waap/getting-started/create-resource.png" />
    </Frame>

    6. Click **Create and enable protection** to create the CDN resource.
    7. After the resource is created, copy the generated CNAME and add it to your DNS configuration at your DNS provider.

    #### Finalize the settings

    Once your CDN resource is created, configure the Host header setting:

    1. Open your CDN resource settings and navigate to the **HTTP headers** section.
    2. Click **Host header** and enable the **Change Host header** toggle.
    3. Select the **Forward Host header** option to forward the original Host header from client requests to your origin server.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/getting-started/host-header-forward.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=59db4da0525138cdb4e7e49a1b3bfe6c" alt="Host header configuration" width="986" height="394" data-path="images/docs/waap/getting-started/host-header-forward.png" />
    </Frame>

    <Info>
      **Info**

      The **Always online** option is automatically disabled when WAAP is enabled and cannot be changed.

      <Frame>
        <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/getting-started/always-online-disabled.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=d433451727a48f94feaa770fe092b993" alt="Always online disabled" width="981" height="242" data-path="images/docs/waap/getting-started/always-online-disabled.png" />
      </Frame>
    </Info>
  </Tab>
</Tabs>

## Step 2. Enable WAAP in CDN resource settings

Once your CDN resource is set up, you can activate WAAP protection for it. Refer to the [Protect CDN resources with Gcore WAAP](/cdn/cdn-resource-options/cdn-security/protect-cdn-resources-with-basic-waf) guide for detailed instructions.

## Step 3. Use WAAP in Monitoring mode

After you enable WAAP, it will be automatically set to the **Monitoring** mode. In this mode, all incoming requests are inspected, but no action is taken. It's best to use Monitoring mode for several days before enabling the **Protection** mode to make sure that all security settings work correctly.

Completing this step is important because it allows you to analyze requests and test the WAAP behavior before you fully activate it.

<Warning>
  **Warning**

  In Monitoring mode, all traffic is allowed to your domain, regardless of configured security rules and policy groups. This mode is only recommended for testing WAAP settings.
</Warning>

## Step 4. View your domain traffic

While keeping WAAP in Monitoring mode, you can view all logged requests and check the corresponding actions that WAAP will take once you put it in Protection mode.

Use the [Events](/waap/analytics/events) page to detect common traffic patterns and understand if the current configuration requires any adjustments.

1. In the [Gcore Customer Portal](https://portal.gcore.com/accounts/reports/dashboard), navigate to **WAAP** > **Events**.
2. Use the **Domain** filter to select your domain.
3. Review the requests and the actions WAAP has taken.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/analytics/waap-events.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=eb5c17eca3057c3412e0133caa21af8b" alt="Events page in the Customer Portal" width="1619" height="971" data-path="images/docs/waap/analytics/waap-events.png" />
</Frame>

You can also use additional filters to get more granular information about your traffic. For more details about the available filters check the section [Why filtering matters](/waap/analytics/events#why-filtering-matters).

To view more information about an event, click on its row.

## Step 5. Test your WAAP configuration

To achieve the desired WAAP behavior, we recommend that you navigate through your website as both a user and administrator.

Navigating the website will generate entries in the [Requests](/waap/analytics#requests-table) table. You can use this information to determine if you need to create [Firewall rules](/waap/firewall/access-control#allowed-ips-and-blocked-ips) or [custom WAAP rules](/waap/waap-rules/custom-rules) for some requests and let them access your website's content.

Specifically, review requests that relate to:

* **Your origin IP**: IP address assigned to your device.
* **Your office IP**: IP address assigned to your device within your office's network.
* **Your workstation IP**: IP address assigned to a workstation or specific computer in a network.

If you notice that WAAP will block such requests in Protection mode, you need to update your settings to prevent such a situation. You can find detailed instructions on how to update your settings in the following step.

Check out the [allow and block IP addresses](/waap/firewall/access-control#allowed-ips-and-blocked-ips) guide for more information.

## Step 6. Allow admins, bots, and CMS

Before WAAP is in Protection mode, you need to ensure that critical IP addresses, content management systems (CMS), and known bots are allowed to make successful requests.

Check the [WAAP policy groups](/waap/waap-policies) for a full list of security policies and their detailed overview.

### Allow admin IP addresses

If your domain doesn't use a CMS, we highly recommend allowlisting the site administrator's IP address:

1. In the [Gcore Customer Portal](https://portal.gcore.com/accounts/reports/dashboard), navigate to **WAAP** > **Firewall**.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/getting-started/waap-firewall.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=b95fbe81f20abbc0e5fd80c8ff0878c7" alt="Firewall page in the Customer Portal" width="2172" height="724" data-path="images/docs/waap/getting-started/waap-firewall.png" />
</Frame>

2. Select the needed domain from the domain dropdown.
3. In the **Allowed IPs** tab, click **Add IP/IP range**.
4. Enter any admin user's public IP address.
5. Click **Save**.

Repeat these steps if needed.

### Allow CMS

If you use content management systems, such as WordPress, allow traffic for CMS admins:

1. In the [Gcore Customer Portal](https://portal.gcore.com/accounts/reports/dashboard), navigate to **WAAP** > **Default Rules**.
2. Select the needed domain from the domain dropdown.
3. Click the **CMS Protection** tab.
4. Find the desired content management system and change its mode to **Allow** by clicking on the mode dropdown next to it.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/getting-started/default-rules-cms-protection.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=6cbfa8f732d8df9083d34cf5c7531dfb" alt="Default Rules page with CMS Protection tab" width="1790" height="879" data-path="images/docs/waap/getting-started/default-rules-cms-protection.png" />
</Frame>

<Tip>
  **Tip**

  The **WordPress WAF ruleset** policy is enabled by default.
</Tip>

### Allow Known Bots

Follow these steps to allow crawlers, scanners, monitoring bots, and similar tools to access your website:

1. In the [Gcore Customer Portal](https://portal.gcore.com/accounts/reports/dashboard), navigate to **WAAP** > **Bot Management**.
2. Select the needed domain from the domain dropdown.
3. Click the **Known Bots** tab and enable the desired bot by changing its mode to **Allow**.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/getting-started/bot-management-known-bots.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=4bb1bccb5f63461a1fa2f70829c79855" alt="Bot Management page with Known Bots tab" width="1672" height="941" data-path="images/docs/waap/getting-started/bot-management-known-bots.png" />
</Frame>

The [Known Bots](/waap/waap-policies/known-bots) list allows several trusted bots by default, which is why we recommend reviewing this list before enabling Protection mode.

## Step 7. Configure your APIs

If you plan to serve JSON requests through an API on your domain, you can disable the JavaScript injection and CAPTCHA functionalities for specified API endpoints.

You can [manually add endpoints to API base path](/waap/api-discovery-and-protection/configure-api-base-path) or [configure the API Discovery feature](/waap/api-discovery-and-protection/api-discovery) to automatically detect and protect your APIs.

## Step 8. Enable Protection mode

1. In the [Gcore Customer Portal](https://portal.gcore.com/accounts/reports/dashboard), navigate to **WAAP** > **Domains**.
2. Find the needed domain in the list.
3. In the **WAAP domain mode** column, click the mode dropdown and select **Protection**. WAAP will begin to inspect and act upon incoming requests.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/-0KJBUmqhheI600S/images/docs/waap/getting-started/domains-waap-protection.png?fit=max&auto=format&n=-0KJBUmqhheI600S&q=85&s=f39b09328f07e42764445bc76e33b462" alt="WAAP modes dropdown on Domains page" width="2170" height="725" data-path="images/docs/waap/getting-started/domains-waap-protection.png" />
</Frame>

## Step 9. Block non-Gcore traffic

After successful DNS propagation and verifying that domain-based traffic is being handled by WAAP, ensure that all requests to your domain are routed through Gcore servers. This is necessary to prevent unauthorized traffic from bypassing WAAP and directly reaching your domain.

* [Add our CDN servers to the allowlist](/cdn/getting-started/configure-an-origin/add-cdn-servers-to-the-origin-acl-whitelist).
* Block other incoming requests that don't match our allowlist.
