Platform guides

How to Add and Sell Banner Ads on a Wix Website

Where to paste banner ad code in the Wix Editor, Wix Studio and Wix Harmony, why the link must open in a new tab, how to handle mobile, and how to sell the slot.

By the Spreadiom team 9 min read
How to Add and Sell Banner Ads on a Wix Website
On this page

To add a banner ad to a Wix website, use the Embed HTML element: in the Wix Editor, click Add Elements, then Embed Code, then Embed HTML, paste a link-and-image snippet, and resize the element to the banner's dimensions. Wix displays embedded code inside an iframe, so the banner's link needs target="_blank" to open the advertiser's site in a new tab instead of inside the small frame. To sell the slot rather than hard-code one ad, paste a hosted embed whose image changes automatically when an advertiser books and pays.

Key takeaways

  • Visible banners go in the Embed HTML element (called Embed code in Wix Studio and Wix Harmony). Wix's Custom Code settings are for invisible scripts and need a connected domain.
  • Wix shows embedded code inside a sandboxed iframe that allows pop-ups, so target="_blank" is how a banner opens the advertiser's page.
  • Wix only displays code that uses HTTPS URLs.
  • Attach the slot to the header or footer to show it on every page, or add an HTML element inside individual blog posts.
  • Check every embed on mobile. Embedded code doesn't resize itself, so you resize or hide it per device.

Which Wix option to use

Wix has several places for code, and only some of them display anything. As of October 2026:

Option Where you find it Good for Requirements
Embed HTML element (Embed code in Studio and Harmony) The editor's Add panel A visible banner anywhere on a page Wix's help article lists no plan requirement; code must use HTTPS
HTML code in a blog post Wix Blog post composer in your dashboard A banner inside one post Wix Blog; code must use HTTPS
Image element with a link The editor's Add panel One fixed sponsor, no iframe None beyond the editor
Custom Code Settings → Custom Code Invisible scripts in the head or body A published site with a connected domain
Custom element The editor's Add panel Custom HTML tags you build A Premium plan, a connected domain and no Wix ads

Custom Code is invisible to visitors; Wix's custom code guide points to the HTML iframe for anything visual. Connecting a domain requires a paid plan, which also removes the Wix branding ads that free sites show.

For one sponsor that never changes, a regular Image element also works: link it to a web address that opens in a new window, and choose sponsored under Advanced SEO Settings. It can't rotate ads, end campaigns or count clicks, though.

Add the banner with Embed HTML

Wix Editor

  1. Click Add Elements on the left side of the editor.
  2. Click Embed Code, then click Embed HTML under Popular Embeds.
  3. Click the new element, click Enter Code, paste your snippet under "Add your code here," and click Apply.
  4. Drag the element's handles until it matches the banner, for example 300×250 pixels.
  5. Preview, then publish; nothing changes on the live site until you do.

Use the code option, not Embed a site, which loads a whole web page in a window. Wix's embedding guide also notes that only HTTPS code and URLs are displayed.

Here's a basic snippet with placeholder URLs:

<a href="https://advertiser.example.com/" target="_blank" rel="sponsored noopener">
  <img src="https://cdn.example.com/acme-300x250.webp"
       width="300" height="250"
       alt="Acme Analytics: see every campaign in one dashboard">
</a>

For a breakdown of each attribute, see our guide to adding a banner ad with plain HTML.

Wix Studio

Click Add Elements, then Embed & Social, and add the Embed Code element. Click Enter Code, paste the snippet and click Apply. Studio's code runs in the same kind of sandboxed iframe.

Wix Harmony

Wix Harmony is the AI-assisted editor Wix released in January 2026; sites built in the Wix Editor can't be migrated into it. To add a banner, click + Add at the top left, select Elements, hover over the More Options icon, then scroll down and click Embed. Drag the Embed code element onto the page, click the Settings icon and paste your code.

Wix runs embedded code in a separate, sandboxed document. According to the Studio Editor's iframe guide, Wix re-enables only a few abilities for that code: same-origin access, forms, pop-ups, scripts and pointer lock. Navigating your page isn't one of them, which has two effects:

  • A link without a target opens inside the frame. The advertiser's site would load in a 300×250 box, and many sites refuse to be framed at all, so the visitor sees an error.
  • target="_blank" works because pop-ups are allowed. The click opens a new tab, and your page stays open behind it. target="_top" isn't a reliable alternative, because the frame isn't allowed to navigate your page.

Fixing scroll bars and offsets

The element is a fixed-size frame, and content larger than the frame gets cut off with scroll bars. Make the element at least as large as the banner. If the banner still looks offset, the frame's default page margin is the usual cause; this line above your snippet removes it:

<style>body{margin:0}</style>

Inside a blog post

  1. Go to Blog in your site's dashboard and open a post, or click Create New Post.
  2. Click Add on the left side, then click HTML code.
  3. Choose HTML Code, paste the snippet and click Save.
  4. Set the element's width and height to match the banner, and choose an alignment.

This places the ad in that one post. A popular evergreen post can be worth its own slot.

In the Wix Editor, drag the embed over the header until Attach to Header appears. For the footer, drag it as low as it goes and click Move To Footer. The element must be smaller than the header or footer, and anything inside them shows on every page that has them. You can also right-click an element on the page and turn on Show on All Pages.

In Wix Studio, the header and footer are global sections by default, so an embed you add to them appears across the site. Individual elements can't be made global, but any section can be: select it, click More Actions and choose Set as Global.

A 728×90 leaderboard in the header and a 300×250 in posts or the footer make good starting slots. Our banner ad sizes guide explains which sizes pair well on desktop and mobile.

How embeds behave on mobile

Because embeds live in an iframe, Wix says the code inside them won't be responsive, even if it was built that way. You size the element per device instead.

In the Wix Editor, desktop elements also appear in the mobile editor, where you can resize or hide them, but you can't edit a desktop HTML element's code there. Wix recommends hiding desktop code that doesn't fit (it moves to the Hidden on Mobile panel) and adding a mobile-friendly alternative with Add → Embed Code → Embed HTML in the mobile editor. Anything you add there is mobile-only.

In Wix Studio, check the Tablet and Mobile breakpoints. Resize the embed there, or right-click it and choose Hide on the breakpoints where it doesn't fit.

In Wix Harmony, your desktop design adjusts to smaller screens automatically, and you can resize or hide elements on mobile without changing desktop.

A 300×250 fits most phones as-is. A 728×90 doesn't, so hide it on mobile and offer a 320×50 or 300×250 slot there.

Selling the slot with Spreadiom

Hard-coding works until the second advertiser: every swap means editing and republishing, plus collecting payment and counting clicks yourself.

With Spreadiom, you create a slot with a size and a daily price, then paste its one-line embed into the Embed HTML element. It's plain HTML with no JavaScript and no cookies, uses HTTPS and already includes target="_blank":

<a href="https://www.spreadiom.com/ABC-12/link" target="_blank" rel="sponsored noopener"><img src="https://www.spreadiom.com/ABC-12/img" width="300" height="250" alt="Advertisement" style="max-width:100%;height:auto" loading="lazy"></a>

You paste it once and publish once. While the slot is unbooked, it shows an "Advertise here" image that links to its booking page and availability calendar. Advertisers book as guests, pick dates, upload a banner that's cropped to the slot size and screened automatically for prohibited content, and pay by card through your own Stripe account or with PayPal straight into your PayPal account. Spreadiom never holds the money. The booked ad goes live on its start date with no edits to your Wix site.

If you turn on approval, a card is only charged when you approve the booking, and requests you don't review are canceled automatically. You can run test bookings with Stripe test keys before taking real money. Impressions, clicks and CTR are tracked per slot, with crawlers and other bots filtered out.

Spreadiom is free to start. It charges a 5% fee on completed bookings, invoiced once a month rather than deducted from the advertiser's payment, and Stripe or PayPal processing fees are separate; see pricing. For setting the daily rate, read how much to charge for banner ads, and add an Advertise With Us page to your menu so advertisers can find the booking page.

FAQ

Can I add HTML ad code to a free Wix site?

As of October 2026, Wix's help article for the Embed HTML element doesn't list any plan requirement. Custom Code and custom elements are different: both need a connected domain, which requires a paid plan. Free sites also show Wix's own branding ads.

Why does my Wix embed show scroll bars?

The Embed HTML element is a fixed-size iframe, and Wix shows scroll bars when the content is bigger than the frame. Drag the element's handles until it's at least as large as the banner. If it's still offset, add <style>body{margin:0}</style> above your snippet.

Wix runs embedded code in a sandboxed iframe, so a link without a target loads inside that frame. Add target="_blank" to the link. Wix allows pop-ups from embeds, so the advertiser's page opens in a new tab.

Can I use Wix Custom Code to show a banner ad?

No. Custom Code adds scripts to your site's head or body, and Wix says it's invisible to visitors. It also requires a published site with a connected domain. Use the Embed HTML element for anything visitors should see.

How do I show the same ad on every Wix page?

In the Wix Editor, attach the embed to the header or move it to the footer, or turn on Show on All Pages in its right-click menu. In Wix Studio, add it to the global header or footer, or to a section you've set as global.

Wix Banner ads Direct ad sales Ad operations
All guides
Spreadiom

Sell ad space on your site — start free

Give every ad slot its own booking page. Advertisers pick dates, upload a banner and pay by card or PayPal — straight into your own account. No subscription; 5% only on completed bookings.