Clarification on IP Exclusion Scope for Specific CIDR Block

16 views
Skip to first unread message

Hashir Khan

unread,
Jul 9, 2025, 8:39:31 AM7/9/25
to Google Ads API and AdWords API Forum

Hello Google Ads API Team,

I would like to confirm how IP exclusions work when specifying a CIDR block.

In my case, I plan to exclude the following block: 15.177.104.0/24.

My understanding is:

  • Only the 256 IP addresses within this exact /24 block (15.177.104.0 to 15.177.104.255) will be excluded.

  • Other IP addresses in the larger parent block (for example, 15.177.0.0/16, which includes 65,536 IPs) will not be affected.

  • No other ISPs or unrelated IP ranges will be blocked — only this specific AWS-owned range.

Could you please confirm if this understanding is correct?
Additionally, are there any potential unintended effects on normal user traffic that I should be aware of when excluding this /24 block?

Thank you very much for your assistance!

Best regards,
Hashir

Google Ads API Forum Advisor

unread,
Jul 9, 2025, 12:00:05 PM7/9/25
to hashi...@8thloop.com, adwor...@googlegroups.com
Hi Hashir,

Thank you for reaching out to the Google Ads API support team.

In Google Ads API it's not possible to exclude CIDR ranges like /24. An IpBlockInfo used for IP exclusions, which allow: - IPv4 and IPv6 addresses - individual addresses (192.168.0.1) - masks for individual addresses (192.168.0.1/32) - masks for Class C networks (192.168.0.1/24).

By default, a new campaign won't contain IP blocking criteria, which means everything is included. The CampaignCriterionService allows you to target or exclude various types of criteria. You can exclude or block ipaddress by utilizing the ipBlock field within the ipblockinfo structure in the CampaignCriterion.mutate method through the Rest interface.

Additionally, you may check this sample code on how to add campaign targeting criteria. The limit number of excluded IP blocks per campaign is 500. It is not possible to increase the limits in Google Ads API. 

I hope this helps! Let us know if you have any further questions. 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-07-09 15:59:18Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rhZMk:ref" (ADR-00318089)



Reply all
Reply to author
Forward
0 new messages