---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/support/partner/en/web/auto-placement.md
  - https://yandex.com/support/partner/ru/web/auto-placement.md
  - href: en/web/auto-placement.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/partner/en/llms.txt

# Auto ads (β)

{% note info %}

This feature is currently in beta. If you experience problems with auto ads, contact [support](https://yandex.com/support/partner/en/support.md).

{% endnote %}

Auto ads provide a way to quickly monetize your site and start earning revenue. You won't need to select and configure ad unit types. Our algorithms choose the optimal placement and ad units based on the page structure and content. 

All ad units are served by a single ad tag. Once it's installed, ads will appear automatically across all site pages.

To use auto ads:

1. [Enable](#on) auto ads on the site. The ad units will be created automatically.
1. Install the ad tag on your site.
1. If needed, [configure](https://yandex.com/support/partner/en/web/units/index.md) the ad units by changing their format, design, and other parameters, or [disable](#off) the ones you don't need.
1. Update the site, clear your cache, and wait for the feature to activate. The algorithm will collect information about the pages and start displaying the ad units within 20 minutes. If something is working incorrectly, contact [support](https://yandex.com/support/partner/en/support.md).

## Unit types {#block-types}

Different types of ad units are created automatically for each page of your site, with separate versions for desktop and mobile. The [type of ad unit](https://yandex.com/support/partner/en/web/units/types/index.md) determines where exactly on the page the ad appears: within the content, in the sidebar, over the content, or elsewhere.

Auto ads are served in the following types of ad units:

- **Banners**

  ![](../_images/auto-placement-banners.svg)

  Not all banner types may appear on the page simultaneously if the site's layout doesn't support this. 

- **Other ad units**

  ![](../_images/auto-placement-other.svg)

  You can choose the ad units you want to use on your site and disable the ones you don't need.

When auto ads are enabled, not all types of ad units are placed at once. Our algorithms choose the optimal types based on your site content.

## How to enable auto ads {#on}


{% note warning %}

When the auto ads code is embedded on your site, impressions on active YAN and Adfox ad units will be paused unless you save them separately when setting up auto ads. You'll see the ![](../_images/warning.svg) icon next to these ad units in the YAN interface.

{% endnote %}

You can enable auto ads on a previously created site or when adding a new one. 

{% list tabs %}

- Existing site

  1. Go to the **Website Ads** tab.
  1. Select an existing site and click **Enable auto ads** in the upper-right corner of the page.
  1. Confirm the action.
  1. Copy the auto ads code and paste it on the site.

  Once auto ads are enabled, the auto ads units will appear on the site details page. You'll see the ![](../_images/auto-placement.svg) icon next to the site and ad unit names in the YAN interface.

- New site

  1. Go to the **Website Ads** → **Sites** tab and press **Add site**. [Learn more about creating a site](https://yandex.com/support/partner/en/web/adplatform.md#adplatform-new)
  1. Enable the option **Auto ads** in the form below the site details and click **New site**.
  1. Copy the auto ads code and paste it on the site.
  
  Once auto ads are enabled, the auto ads units will appear on the site details page. You'll see the ![](../_images/auto-placement.svg) icon next to the site and ad unit names in the YAN interface.

{% endlist %}

{% note info %}

- When auto ads are enabled, all ad units are created with default settings, but you can change them anytime. You can add more formats, set impression limits, customize ad units, and more. To modify an ad unit, go to the site in the interface and click **Edit** below the ad unit's name. [Learn more about ad unit settings](https://yandex.com/support/partner/en/web/units/index.md)
- To view statistics on ad units, go to the site in the interface and click **Statistics** below the ad unit's name. [Learn more about statistics](https://yandex.com/support/partner/en/statistics/index.md)

{% endnote %}

If you had active ad units before you enabled automatic ad placement, you should verify that everything is displayed correctly:

1. Clear the site and browser cache after embedding the auto ads code — press **Ctrl + F5** (on Windows) or **Command + R** (on Mac).
1. Wait 20 minutes and check the ad units, as changes might not apply immediately. If you still see the old ad units, contact [support](https://yandex.com/support/partner/en/support.md).


## How to set up existing ad units when you enable auto ads {#existing}

By default, after you enable auto ads, previously created ad units are no longer displayed. Instead, the feature automatically creates and places ad units on your site.

If needed, you can choose units that will continue to be used alongside auto ads:

* Adfox units.
* The Yandex Advertising Network (YAN) units used in Adfox to fill unsold traffic.
* Manually created YAN units.

We recommend that you only keep the ad units that are necessary for special placement scenarios or require separate settings. In all other cases, auto ads automatically select the optimal number and position of ad units.

After enabling auto ads, be sure to check the main pages of your site. If you've kept previously created ad units to be used in parallel, make sure they interact correctly with auto ads units.

If ads overlap, duplicate formats appear, or other display issues occur, disable the ad units that cause issues, or contact support.


### Adfox units {#adfox}

If your site uses direct placements or other scenarios that involve Adfox, enable the **Keep Adfox units on the site** option.

After that, Adfox units will continue to display alongside automatically created ad units.

If Adfox ad units use YAN units to fill unsold traffic, additionally select these units in the **Manually created units** section.

{% note info %}

If overlay ads and auto ads are running on the same page, auto ads units always take priority.

{% endnote %}


### Manually created ad units {#manually}

In the **Manually created units** section, select the ad units that should continue to display after enabling auto ads.

We recommend that you only retain those units for which fixed placement or special configuration is important. It's better to trust auto ads with the rest of the optimization. Auto ads automatically identify the most effective placements or ad display, which helps you increase revenue from your site.

{% note warning %}

Check if your site has areas specifically reserved for ad placement. If such areas have fixed or minimum sizes, keep the corresponding ad units to be used alongside auto ads, or remove these areas from the page code.

Otherwise, empty areas may appear on the page or other content display issues may occur after enabling auto ads.

{% endnote %}


## How to disable auto ads and ad units {#off}

#### Disable ad units {#off-units}

You can disable any ad unit, including banners and other formats. However, for auto ads to work, you need to keep at least one ad unit enabled. To disable an ad unit:

1. Go to the **Website Ads** tab.
1. Select a site and click **Auto ads**.
1. In the banner type section, click **Edit** and disable the options you don’t need.

In addition, you can disable ad units directly in the list of the site's ad units by clicking **Archive** in the **Status** column next to the unit.

{% note tip %}

The ad unit list includes a filter for auto ads — select this filter to quickly find all ad units with auto ads.

{% endnote %}

#### Disable auto ads {#off-autoplacement}

To disable auto ads on a specific page:

1. Go to the **Website Ads** tab.
1. Select a site and click **Auto ads**.
1. Under **Exclude pages from serving auto ads**, specify the URL of the site's page or section where you don't want to use auto ads. You can specify multiple URLs using the **Add exclusion** button.
1. If needed, select the **Entire section** option to disable auto ads for all pages that start with the specified URL.

To completely disable auto ads:

1. Go to the **Website Ads** tab.
1. Select the site and click **Actions** → **Disable auto ads** on the site page.
1. Confirm the action.
1. If the auto ads units don’t go away immediately, wait 20 minutes and then close the tab with the site — they'll disappear after you clear the cache.

Once disabled, all auto ads units will be archived. Manually created ad units will start running again if their code is still on the site.

You can enable auto ads again anytime:

1. Go to the **Website Ads** tab.
1. Select the site and click **Actions** → **Enable auto ads** on the site page. If you removed the auto ads code from your site, copy and paste it again, and auto ads will resume.

## Limits {#limits}

Auto ads may not appear correctly on some pages and sites:

- Pages with a fixed ad unit height. The ad may push other site elements or overflow the ad unit boundaries. For auto ads to appear correctly, use an adaptive layout.

- SPA (single-page application). Auto ads units may duplicate on these pages. Once enabled, check that the page layout looks as intended.

- Sites where the feed is placed manually at the top of the page. The auto ads script might run before all site content loads, misplacing the ad unit. Because of that, some site elements might appear higher on the page than expected. Keep this in mind when enabling auto ads.

- Site with layout and other technical errors. If auto ads units are displayed incorrectly, contact [support](https://yandex.com/support/partner/en/support.md).

## Frequently asked questions {#faq}

{% cut "I've created a complete set of ad units, but I don't want Fullscreen ads (or another type of ads)." %}

You can customize the set of ad unit types to select only the ones you want when enabling auto ads. In addition, you can [disable](#off) any created ad units you don't need, with the exception of banners.

{% endcut %}


{% cut "Can I disable one or multiple banners, such as those appearing before content or inside an article?" %}

Currently, there is no way to disable banners. If you see a banner you're not happy with, [contact us](https://yandex.com/support/partner/en/support.md), and we'll take your feedback into account in the future.

{% endcut %}


{% cut "Can I exclude a specific page or section from ad impressions?" %}

{#disable-ads}

Yes, you can disable auto ads for a specific page or for all pages of a site section. To learn more, see [Disable auto ads](#off-autoplacement).

{% endcut %}

{% cut "Can I exclude a specific area of a page from ad impressions?" %}

Yes, there are two ways to do this:

- Using an element attribute: add the `data-ap-blacklist` attribute to the relevant DOM element. For example:

  ```html
  <div data-ap-blacklist>
    ...
  </div>
  ```

  Auto ads won't appear within this element.

- Using a list of CSS selectors: pass the element selectors to the global array. For example:

  ```html
  
  ```
   
  Common CSS selectors are supported.
   
  Auto ads won't appear in the specified parts of the page. Other ad units, such as regular Yandex Advertising Network units placed manually or Adfox units, will still operate as normal.

  {% cut "**I want to keep my manually placed ad units**" %}

  In rare cases when the page already contains important ad units placed manually and you want to continue using them, specify their unit IDs in `window.APExceptionBlocks`:

  ```html
  
  ```
  
  `Window.APExceptionBlocks` must be defined on the page only once. This property should contain all exceptions: both manually placed Yandex Advertising Network units and Adfox units.

  {% note info %}

  Only use this approach when absolutely necessary. Auto ads are usually more effective than manual placement.  

  {% endnote %}

  {% endcut %}

{% endcut %}

{% cut "Can I limit the height of an ad unit?" %}

You can limit the height of an ad unit in the settings, but this won't affect the size of the placeholder. [Let us know](https://yandex.com/support/partner/en/support.md) if you're not satisfied with the size of a banner.


{% endcut %}


{% cut "Can I change the number of ads in a banner?" %}

The number of ads in an ad unit can be adjusted in the banner settings. By default, it's set to the value that brings you maximum revenue.

{% endcut %}


{% cut "I installed the ad tag on the site, but the new ad units don't appear, or the old ones are still active. Why?" %}

The system may not have had enough time to update. Clear your cache and wait 20 minutes. If the issue persists, [contact us](https://yandex.com/support/partner/en/support.md).

{% endcut %}


{% cut "I have an Adfox banner installed. Will enabling auto ads disable it?" %}

Yes, the Adfox banner will be disabled by default.

If you don't want the banner to be disabled, add the necessary units to exceptions and pass them using `window.APExceptionBlocks`. You can pass either `containerId` or an object with `ownerId` and `params`:

```js
window.APExceptionBlocks = [
  'containerId',
  {
    ownerId: 354188,
    params: {
      p1: 'dftfb',
      p2: 'gwfm',
      pfc: 'hdfgd',
      pfb: 'beatub',
      puid1: ''
    }
  }
];
```

`Window.APExceptionBlocks` must be defined on the page only once. This property should contain all exceptions: both Adfox units and manually placed Yandex Advertising Network units.

{% endcut %}


{% cut "What happens if I have banners from other ad networks installed?" %}

We don't block ads from other networks. The banners will remain in place. If your banners overlap, disable one of them.

{% endcut %}

<!-- source: en/_includes/feedback-forms/interface-buttons.md -->
## Contact support




<details>
    <summary class="button">Write to WhatsApp</summary>
    <img src="https://yastatic.net/s3/doc-binary/src/support/partner/qr-codes/gr-code-en-new.svg" style="width: 100%; display: block;"/>
    <a href="https://wa.me/74952583554?utm_source=yan&utm_medium=help&utm_campaign=en" style="display: block; text-align: left; margin-left: 18px; color: #5889FF;">Go to WhatsApp</a>
</details>

<details>
    <summary class="button">Write to Telegram</summary>
    <img src="https://yastatic.net/s3/doc-binary/src/support/partner/en/qr-codes/qr-code-en-telegram.svg" style="width: 100%; position: relative; left: -18px; display: block;"/>
    <a href="http://t.me/YanSupport_Bot" style="display: block; text-align: left; margin-left: 18px; color: #5889FF;">Go to Telegram</a>
</details> 

<a href="https://yandex.ru/chat?context=%7B%22entrypoint%22%3A%22%7B%5C%22entrypoint%5C%22%3A%5C%22help%5C%22%2C%5C%22a_pagename%5C%22%3A%5C%22partner-en%5C%22%7D%22%7D#/user/00155607-f40f-9af8-7910-84a29fd95914"> <!--ссылка, куда ведет кнопка. Если внутренняя ссылка, пишем без .md и .html -->
  <span class="button">Write to chat</span> <!--текст на кнопке-->
</a>


<a href="https://forms.yandex.com/surveys/10014686/?lang=en"> <!--ссылка, куда ведет кнопка. Если внутренняя ссылка, пишем без .md и .html -->
  <span class="button">Send an email</span> <!--текст на кнопке-->
</a>



<!-- source: en/_includes/feedback-forms/button-style.md -->

<!-- endsource: en/_includes/feedback-forms/button-style.md -->

<div width="100%" align="center"> 
<br><br>
You can also go to
<br><br>

[![](https://yastatic.net/s3/doc-binary/src/support/mobile-ads/en/logo/rsya.svg)](https://partner.yandex.com)

</div>

<div><br><br></div>
<div class="container" style="padding: 0;">
  <div class="column">
      <p style="font-size: large;">Useful links</p>
      <ul>
         <li><a href="https://t.me/YANpartner/" target="_blank">Yandex Advertising Network Telegram channel</a></li>
         <li><a href="https://yandex.ru/legal/partner/" target="_blank">Rules of participation</a></li>
         <li><a href="https://yandex.com/legal/yan_service_offer/" target="_blank">Yandex Advertising Network Terms of Offer</a></li>
      </ul>
  </div>   
</div>
<div><br><br></div>


<!-- endsource: en/_includes/feedback-forms/interface-buttons.md -->

<!-- source: en/_includes/video-style.md -->

<!-- endsource: en/_includes/video-style.md -->
