Skip to main content

Caddy

Add the X-Better-Web-Welcome header to your Caddyfile. Every page served through this site block will automatically include the header - no HTML editing required.

Get your token value from zeroad.network/publisher/sites after registering your site.

/etc/caddy/Caddyfile
your-site.com {
root * /var/www/html
file_server

# Zero Ad Network partner header
header X-Better-Web-Welcome "YOUR_SITE_TOKEN"
}

Reload Caddy to apply:

caddy reload

Verify

After reloading, confirm the header appears in responses:

curl -I https://your-site.com | grep X-Better-Web-Welcome

You should see:

x-better-web-welcome: YOUR_SITE_TOKEN

Notes

  • The header directive placed at the site block level applies to all responses. If you need to restrict it to specific paths, use a handle or route block with a matcher.
  • Caddy sets headers before file serving, so the header appears on static files, reverse-proxied responses, and error pages alike.

Next steps

Once your site responds with the header, register it for review if you haven't already. Earnings begin once your site is approved and set to Active.