Help Center Manage Your Account Ad Targeting using Restrictions
Target ads by placement URL or referring URL
You can show an ad to visitors viewing a certain web page (placement URL) or coming from a certain web page (referring URL). You can block an ad from showing on a specific page or section. URL matching is done with a regular expression. Wildcard is supported for partial matching. For advanced matching, basic knowledge of regular expressions is required.Example
This website has 2 main sections: Travel and Music. Here is the URL structure:- http://example.com/Travel/
- http://example.com/Travel/Florida.html
- http://example.com/Travel/California.html
- http://example.com/Music/
- http://example.com/Music/Electronica.html
- http://example.com/Music/Pop.html
Objective: you do not want Travel ads to display in the Music section and vice versa.
Solution: Add a placement URL restriction on the Travel ads to prevent them from showing when the placement URL is one of the Music pages
- Sign into your account, follow the menu Ads / All
- Click on an ad name
- Click on the Restrictions tab, click on Add
- Choose the restriction type Placement URL
- Choose Don't Show mode
- Type in a path or folder/directory that is unique for the target page(s). You can include the full domain or just the matching pattern string
- In our example, it would be
http://example.com/Music/*
. Wildcard can be used to match all pages within a section - Save the new restriction and this ad will not be shown to visitors when they are in the Music section
Domain Matching
In order to restrict an ad to only display on certain domains and hostnames, you can use this special format:DOMAIN(example.com|www.example.com)
In this example, the ad will not show if it is being served on a different site other than the two registered hostnames. Sub-domains are considered as unique hostnames.
Combining Multiple URLs
Instead of creating multiple URL restrictions, which can be time consuming, you can combine multiple URLs that share a similar pattern together. For example:- Don't show to visitors viewing page
http://example.com/signup/publisher
- Don't show to visitors viewing page
http://example.com/signup/advertiser
- Don't show to visitors viewing page
http://example.com/signup/ad-agency
- Don't show to visitors viewing page
http://example.com/signup/ad-exchange
- Don't show to visitors viewing page
http://example.com/signup/(publisher|advertiser|ad-agency|ad-exchange)
Advanced Matching
Follow these instructions if you want to show this ad only on specific sections. For example: ad AdServer should only display when a visitor is browsing these 3 content sections: Marketing, B2B, or Advertising. A placement URL restriction can be created as follows:- Match by name: Show to visitors viewing this page
*&SectionName=(Marketing|B2B|Advertising)
- Match by ID: Show to visitors viewing this page
*&SectionID=(222|333|444)
- Match anywhere: Show to visitors viewing this page
(Marketing|B2B|Advertising)
If you would like to show only for any section with a valid numeric ID: *&SectionID=[0-9]+
The pipe sign |
means any value between the parentheses. For example: (A|B|C)
means A or B or C. For more technical usage, our ad serving engine uses regular expression to match the URL with your restriction.
To restrict the end of a string, add $
to the pattern. Example: http://example.com/travel$
. This will only match the exact/full URL and will not match http://example.com/traveling
or http://example.com/travel/
. URLs with or without a trailing slash should be redirected to a consistent URL scheme.
Evaluation Priority
Learn more about the difference between Proactive Targeting vs. Passive Restriction setting.Considerations
- The availability of referring information depends on the browser. Some browser add-on/setting can block or modify referral information from passing onto the request and restrictions based on referring URL will not work properly.
- Referrer-Policy header will determine if and how referring data is sent via the ad request for targeting. If it is empty, limited or truncated and you depend on it for targeting, you can overwrite with your own value to the ad request. Contact us for technical integration.
- Reporting are available per zone and per ad. Reports are not available per URL or per restriction.
- When generating the serving code, it is recommended to choose the Comprehensive serving code format to ensure the referring and placement URLs are captured properly. If you need an ad serving feature that is only available with a JavaScript ad tag, you might need to add additional JavaScript tracking code to properly capture the referring URL. Please contact us for technical assistance in adding this tracking code.
Example Setup
Other Articles in Ad Targeting using Restrictions
- Ad Budget and Ad Rates
- Audience Session Targeting
- Companion & Competitive Positioning
- Dayparting
- Frequency Capping
- Geolocation API
- Maximum/Target Quotas
- Proactive Targeting and Passive Restriction
- Restriction Status Notification
- Restrictions for an ad, zone, campaign or group
- Schedule Settings for Restriction
- Share of Voice - Share of Impression
- Start/End Date
- Target ads by visitor city, group of cities or within a radius
- Target ads by visitor country
- Target ads by visitor language
- Target Keywords
- Time Capping
- Visitor IP Address
- Wizard for setting up restrictions
Cannot find an answer for your question? Ask our Customer Care team
Related
- Target Keywords
"By setting up keyword targeting for an ad, you can choose to show or hide this particular ad when the ..."
- Proactive Targeting and Passive Restriction
"Evaluation Priority is a setting to control when the restriction/targeting criteria is considered. Usage in Keyword Targeting For ad keyword ..."
- Ad Targeting
"When you create a new ad, it has no restriction and therefore can be shown to anyone, anywhere, anytime. However, ..."
- Restrictions for an ad, zone, campaign or group
"Restrictions can be applied to any ad, zone, campaign or group to enforce a specific condition or target a specific ..."
- Should I use protocol-relative URLs in ad tags?
"Ad tags can be placed in many areas of a website: some secure areas and some non-secure areas. However, non-secure ..."