Search
Clear search
Close search
Google apps
Main menu

Fix Ad Exchange rejected ad request errors

When you see rejected ad request errors, it means your ad unit is crawling and targeting the wrong URL. This occurs when our URL detection has determined that your ad unit is within an iframe, and has no content. This results in lower relevancy for your ads and lower revenue as we do not know the actual content of your page. When we are not able to determine the correct site information for an ad request, we serve “blank ads” that blend into the background of your pages. 

If you notice an alert in your account letting you know that you're site is experiencing rejected ad requests that may affect your revenue, click the link in the alert to see how many ad requests were rejected. If the total number is low then your revenue is likely unaffected. However, if you're seeing rejected ad requests in the tens of thousands or if you can't see ads on your site because of rejected ad requests, then we'd recommend implementing one of the solutions below.

Reasons why you see rejected ad request errors

Here are some possible reasons you're seeing these errors:
  • Your ad code is nested within multiple iframes: If your ad code is nested within multiple iframes, we are not able to determine the correct site information for an ad request.
  • You’re using a Supply-Side Platform (SSP): If you make use of a Supply-Side Platform (ad servers, yield managers, etc.) for ad optimization and you're receiving rejected ad request errors with their URLs, please contact the Supply-Side Platform to determine the best way to ensure that the correct site information is passed in your ad requests.

Fixing rejected ad request errors

The method to fix targeting depends on the domain that triggers the ad request error and the type of ad code you're using.

For DoubleClick for Publishers (DFP)

Rejected ad requests from all domains

If you’ve noticed a lot of rejected ad requests coming from googleads.g.doubleclick.net, our tech team has identified a possible solution. Read more about the Rich Media iframe solution and how to implement it.

If you've noticed a lot of rejected ad requests coming from any domain other than googleads.g.doubleclick.net, then review the solutions below. First you'll need to determine the type of DFP tags you're using. See below for solutions based on the type of tag:

  • If using Google Publisher Tags, you can pass the correct URL by adding the following syntax to your DFP ad call:
  • googletag.pubads().set("page_url", "URL");
    Don't forget to replace "URL" with your own URL.
  • If you have a mobile app, and are running Ad Exchange web tags, you’ll need to switch those tags for the AdMob SDK.
 

For Ad Exchange requests not coming from DFP publishers

This procedure only applies to traffic sent directly from the page of a third-party ad server. DFP no longer relies on Ad Exchange inventory tags for targeting. Learn best practices for trafficking Ad Exchange in DFP
Rejected ad requests from googleads.g.doubleclick.net
  1. Create a folder in your website's root directory named /doubleclick
  2. Click //storage.googleapis.com/support-kms-prod/SNP_2621920_en_v3 to download a file called DARTIframe.html
  3. Save DARTIframe.html to the new /doubleclick folder in your website's root directory

If successful, your rejected ad request alerts should disappear within 3-5 days. If your rejected ad requests persist after 5 days, then unfortunately there is no further action you can take. Our engineers are aware of the issue, and are working on a solution.

Rejected ad requests from all other domains
If you see rejected ad requests from anywhere else besides googleads.g.doubleclick.net, you will need to use google_page_url to target the correct URL as described in the "For DoubleClick for Publishers" section of this article.

If you're using the existing synchronous ad code, see below for how to add the google_page_url to your ad code:

Typical ad code (synchronous):

<script type="text/javascript">
google_ad_client = "ca-pub-XXXXXXXXXXXX";
/* 728x90, creado 14/04/08 */
google_ad_slot = "XXXXXXXXXXXX";
google_ad_width = 728;
google_ad_height = 90;
</script>
<script type="text/javascript"
 src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Ad code with google_page_url added:

<script type="text/javascript">
google_ad_client = "ca-pub-XXXXXXXXXXXX";
/* 728x90, creado 14/04/08 */
google_ad_slot = "XXXXXXXXXXXX";
google_ad_width = 728;
google_ad_height = 90;
google_page_url = "http://myurl.com/fullpath";
</script>
<script type="text/javascript"
 src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Don't forget to replace http://myurl.com/fullpath with your own URL.
Make sure you update the code for all of your ad units that have made ad requests with incorrect site information.
Rejected ad requests from all other domains (using asynchronous ad code)
If you use asynchronous ad code on your site and you see rejected ad requests in your reporting from anywhere else other than googleads.g.doubleclick.net, you'll need to use data-page-URL to target the correct URL.

If you're using asynchronous ad code, see below for how to add the data-page-url to your ad code:

Normal asynchronous ad code:

<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> </script>
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="6440411535">
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Ad code with data-page-url added:

<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> </script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxx"
data-override-format="true"
data-page-url = "http://www.example.com"> </ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Don't forget to replace http://www.example.com with your own URL.
Make sure you update the code for all of your ad units that have made ad requests with incorrect site information.
Was this article helpful?
How can we improve it?