Overview
Google Ad Manager must safelist specific domains to know where it should expect to serve ads for your account. Publishers may have issues getting ads to render when a publisher's development domain doesn't match the safe listed values.
Workarounds
If the difference in the domain is causing ads to fail, there are two simple solutions.
Query Parameter
You can use a query parameter to tell Google that it should treat the site as a different domain. Append ?fstesturl=yourdomain.comto your URL, replacing yourdomain.com with your root domain.
Example
If your development domain's URL is freestardevsite.com and your production domain URL is freestar.com, you would use freestardevsite.com?fstesturl=freestar.com.
Javascript
If you cannot use the query parameter, use the following snippet instead. Replace freestar.com with the production domain's URL.
Javascript
freestar.queue.push(function () {
googletag.pubads().set('page_url', 'https://freestar.com/');
});
Place this snippet in your head code after the freestar.queue initialization. Example below (lines 19-21).
HTML
<!-- Below is a recommended list of pre-connections, which allow the network to establish each connection quicker, speeding up response times and improving ad performance. -->
<link rel="preconnect" href="https://a.pub.network/" crossorigin />
<link rel="preconnect" href="https://b.pub.network/" crossorigin />
<link rel="preconnect" href="https://c.pub.network/" crossorigin />
<link rel="preconnect" href="https://d.pub.network/" crossorigin />
<link rel="preconnect" href="https://c.amazon-adsystem.com" crossorigin />
<link rel="preconnect" href="https://s.amazon-adsystem.com" crossorigin />
<link rel="preconnect" href="https://btloader.com/" crossorigin />
<link rel="preconnect" href="https://api.btloader.com/" crossorigin />
<!-- Below is a link to a CSS file that accounts for Cumulative Layout Shift, a new Core Web Vitals subset that Google uses to help rank your site in search -->
<!-- The file is intended to eliminate the layout shifts that are seen when ads load into the page. If you don't want to use this, simply remove this file -->
<!-- To find out more about CLS, visit https://web.dev/vitals/ -->
<link rel="stylesheet" href="https://a.pub.network/[site-name]/cls.css">
<script data-cfasync="false" type="text/javascript">
var freestar = freestar || {};
freestar.queue = freestar.queue || [];
freestar.queue.push(function () {
googletag.pubads().set('page_url', 'https://freestar.com/');
});
freestar.config = freestar.config || {};
freestar.config.enabled_slots = [];
freestar.initCallback = function () { (freestar.config.enabled_slots.length === 0) ? freestar.initCallbackCalled = false : freestar.newAdSlots(freestar.config.enabled_slots) }
</script>
<script src="https://a.pub.network/[site-name]/pubfig.min.js" data-cfasync="false" async></script>
🚧 If you still have issues, please reach out to your Freestar Point of Contact and provide a link to your test environment. If your test environment requires a login, IP safelisting, or a host file update, please provide those details as well.