Adult ad network · Publisher guide
How to Add Ads to an Adult Website: Verification, Embed Code & Testing
Step-by-step guide to add banner and popunder ads to an adult website — domain verification, script placement, data-type attributes, and troubleshooting empty slots.
If you need to add ads to an adult website without breaking layout or tripping browser blockers, the process is straightforward on modern exchanges: verify ownership, paste one async script per format, and confirm credited impressions in your dashboard. This guide covers verification, banner vs popunder embeds, WordPress and custom CMS notes, and common fixes when slots stay empty.
We use AdSwapX as the reference implementation; the same principles apply to most adult ad networks that serve JavaScript tags.
Before you install anything
- Confirm your site is legal 18+ and you control the domain.
- Decide placements: sidebar banner, below player, footer popunder, etc.
- Use HTTPS — mixed-content warnings block scripts on many browsers.
- Read your host's terms; some shared hosts restrict adult content.
Step 1: Register and add your domain
Create an account, open Sites, and enter the apex or www hostname you will monetize. The exchange generates a unique
site_key used in your embed URL. You cannot credit impressions until the domain is verified.
Step 2: Domain verification
Download adswapx-verification.txt from the dashboard and upload it to your website's public root — the
same folder as index.html or your CMS front controller. The file must be reachable at
https://yourdomain.com/adswapx-verification.txt. Click verify in the dashboard. If verification fails, check
redirects (www vs non-www), CDN caching, and that the file is not blocked by robots.txt.
Step 3: Copy the embed code
From your site detail page, copy the snippet for each format:
Banner (300×250)
<script async src="https://adswapx.com/embed/YOUR_SITE_KEY.js" data-type="banner"></script>
Place the script where the ad should appear (or immediately after the container). The script injects a responsive 300×250 unit. Creative specs: 300×250 banner guide.
Popunder
<script async src="https://adswapx.com/embed/YOUR_SITE_KEY.js" data-type="popunder"></script>
Popunder scripts are often placed once in the global footer. They listen for the visitor's first click, tap, or key press, then open the offer behind the current tab. Do not stack multiple popunder networks on the same page.
Step 4: Test in a clean browser session
- Open your site in a private window (fresh IP behavior).
- For banners: scroll the unit into view for at least one second.
- For popunders: click anywhere on the page once; confirm a new tab opens.
- Check the publisher dashboard for credited views or opens within a few minutes.
Repeated testing from the same IP can hit hourly caps or popunder cooldowns — use a different network or wait if numbers look stuck.
CMS-specific tips
WordPress
Add banner scripts via a custom HTML block in widgets or use a child theme footer hook for popunders. Avoid caching plugins
that strip <script> tags from posts. Exclude admin pages from ad injection.
Tubes & custom PHP
Include the tag in your template partials (footer.blade.php, layout.tpl, etc.). Ensure the referer
sent by the browser matches the verified domain (avoid serving ads on staging subdomains unless added separately).
Troubleshooting empty ads
- Domain not verified — Serve endpoint returns no fill.
- Wrong data-type — Use
bannerorpopunder(both map correctly on AdSwapX). - Ad blockers — Test with extensions disabled; some users always block.
- No approved inventory — New exchanges may show house ads until member campaigns fill.
- Referer mismatch — Ads only serve on the hostname you verified.
Policy reminders
Disclose third-party advertising in your terms or FAQ. Never disguise ads as browser security warnings. Popunders should respect cooldowns documented in our popunder guide.
Adding ads to an adult website should take under an hour when verification is clean. For monetization strategy after install, read how to monetize an adult website or join AdSwapX to go live.
Related guides
300×250 Banner Ads for Adult Sites: Formats, Placement & Traffic Quality
A practical guide to 300×250 IAB banner advertising on adult websites — creative specs, viewability, placement tips, and how exchanges deliver reciprocal traffic.
Read guide →Popunder Ads on Adult Websites: Monetization, Frequency Caps & Best Practices
How popunder ads fit into adult site monetization — user experience, 12-hour frequency caps, mobile behavior, and balancing revenue with retention.
Read guide →How to Monetize an Adult Website in 2026: Step-by-Step for Publishers
A practical roadmap to monetize adult website traffic with banners, popunders, and credit-based ad exchanges — formats, placement, RPM expectations, and compliance.
Read guide →