Skip to main content

Nginx

Add the X-Better-Web-Welcome header to your Nginx virtual host config. Every page served through this vhost will automatically include the header - no HTML editing required.

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

/etc/nginx/sites-available/your-site.com.conf
server {
listen 443 ssl;
server_name your-site.com;

root /var/www/html;
index index.html;

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

Reload Nginx to apply:

sudo nginx -t && sudo systemctl reload nginx

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

  • Place add_header inside the server block (not a location block) so it applies to all responses.
  • If you already use add_header directives inside location blocks, Nginx's inheritance rules mean you'll need to repeat the Zero Ad Network header there too, or use the always parameter at the server level.

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.