Setting up header bidding for Accelerated Mobile Pages (AMP) requires a specific architecture centered on the amp-ad component and the Real-Time Config (RTC) feature. Unlike standard web environments, AMP restricts arbitrary JavaScript execution, meaning you must use the supported vendor framework to communicate with demand partners. By configuring your Google Ad Manager (GAM) tags to include RTC, you allow the browser to fetch bids from multiple ad exchanges simultaneously before the ad request is finalized.
This implementation strategy ensures that your site maintains high performance while still participating in competitive bidding. Because AMP pages are often served from the Google AMP Cache, the ad request flow must be highly optimized to avoid latency. Publishers who get this right see improved fill rates, as the ad server receives more context about the available inventory before selecting the final creative.

How does header bidding work on AMP?
On a traditional site, header bidding is often managed via a wrapper script like Prebid.js. On AMP, the environment is controlled to ensure performance. The process relies on RTC, which enables the AMP runtime to send requests to a set of endpoints defined in your ad configuration. Once the responses arrive, the data is passed to the ad server, which then decides the winning creative based on the highest bid.
The AMP runtime acts as the orchestrator. When the page loads, the runtime identifies the RTC configuration within the ad tag. It then fires off parallel requests to the specified demand partners. These partners return a JSON response containing targeting keys that are injected into the final ad request to GAM. This entire process happens in the background, keeping the user experience clean and fast.
In a typical deployment, you might have three or four bidders competing. The AMP runtime manages these requests with strict timeout limits. If a bidder does not respond within the defined window, the runtime proceeds without their bid to ensure the ad slot is not left empty. This prioritization of user experience over individual bid completion is what makes the AMP ad framework unique.

What are the core requirements for the setup?
- A functioning Google Ad Manager account with appropriate ad units defined.
- A list of supported header bidding vendors that provide an RTC-compatible endpoint.
- Access to your AMP page HTML to modify the amp-ad tag configurations.
- Valid JSON configuration files for the RTC endpoints.
- Secure HTTPS hosting for all bidder endpoints to prevent mixed-content errors.
Before beginning, ensure that your ad units are correctly mapped in Google Ad Manager. If the ad unit IDs do not match what is defined in your RTC configuration, the bid signals will not reach the correct inventory. You should also verify that your chosen bidders support the AMP protocol, as not every demand partner has an RTC-compliant integration.
Documentation is key here. Keep a record of which bidder corresponds to which endpoint URL. If you are managing multiple sites, maintain a master file of your configurations. This avoids the common trap of using outdated endpoints that might result in failed requests or degraded performance during peak traffic hours.
How to implement the RTC configuration?
To begin, you must add the rtc-config attribute to your amp-ad tags. This attribute contains a JSON object that lists the vendors you wish to query. Each vendor provides a specific request URL structure. Ensure that your server hosting these configurations follows the strict security policies required by AMP, specifically regarding CORS headers and response formats.
The JSON structure for the rtc-config attribute typically follows a specific schema. You define the vendors and their respective request URLs inside the configuration object. It is important to keep the object lightweight. Adding too many bidders can increase the size of the request and potentially slow down the ad call, which may negatively impact your overall page load performance.
Once the configuration is added to the HTML, the AMP runtime handles the rest. You do not need to write custom JavaScript to trigger these calls. Simply ensure that your page satisfies the AMP validation requirements after the tags are added. A small mistake in the JSON syntax will cause the ad component to fail silently, so always validate your code using the official AMP validation tool.
The Google AMP Cache is a proxy-based content delivery network that serves valid AMP pages to improve load speed.
Google Search Central
How Alien Road applies this technology
At Alien Road, we follow a strict deployment lifecycle for our clients. We start by auditing the current ad stack to identify which demand partners offer the best yield for their specific traffic profile. We then create a test environment to validate the RTC response times, as slow bidder responses can negatively impact your page load metrics. Once verified, we push the configuration to the production AMP pages and monitor the fill rates within the Google Ad Manager dashboard.
In a typical engagement, we often find that clients have too many bidders configured. We work to streamline this by selecting only the partners that provide consistent results. We then set up monitoring alerts in Google Ad Manager to detect if any specific bidder starts returning errors or high latency. By keeping the configuration lean, we ensure that ad revenue remains high without sacrificing the speed that makes AMP valuable.
What are the common pitfalls to avoid?
One frequent error is failing to manage the timeout settings for bidders. If a bidder takes too long to respond, it delays the entire ad delivery, which hurts your user experience and potentially your page speed scores. Another issue is improper CORS configuration on the vendor side, which causes the browser to block the request. Always verify that your endpoints are reachable and return valid JSON.
Another common pitfall is ignoring the impact of ad-blockers on your configuration. While RTC happens on the server-to-server or runtime-to-bidder level, some users may still block the ad requests themselves. Always test your implementation in a clean browser environment without extensions to ensure that the base ad unit loads even if the header bidding signals fail for some reason.
How to verify your performance data?
After implementation, your primary focus should be the bid participation report in Google Ad Manager. This report will show you how often your bidders are returning a valid price signal. If you notice a high discrepancy between the number of requests and the number of bids returned, you may need to adjust your timeout settings or review your bidder list.
- Use the AMP Validator tool to ensure your new amp-ad attributes do not break page validity.
- Check the browser console for network requests to your defined RTC endpoints.
- Review the bid participation reports inside Google Ad Manager.
- Run an A/B test comparing the new setup against previous ad performance data.
- Monitor Core Web Vitals to ensure the ad configuration does not cause layout shifts.
Where to start this week
Start by identifying one high-traffic landing page to test your new RTC configuration. Do not push changes to the entire site at once. Verify that the ad units are rendering correctly in the Google Ad Manager preview tool, then monitor your revenue metrics for 48 hours to confirm that the header bidding setup is yielding the expected results before scaling to your full site inventory.