Skip to main content

Apache

Add the X-Better-Web-Welcome header to your Apache 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.

Requires: mod_headers enabled (sudo a2enmod headers).

/etc/apache2/sites-available/your-site.com.conf
<VirtualHost *:443>
ServerName your-site.com
DocumentRoot "/var/www/html"

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

# Zero Ad Network partner header
Header set X-Better-Web-Welcome "YOUR_SITE_TOKEN"
</VirtualHost>

Reload Apache to apply:

sudo apachectl configtest && sudo systemctl reload apache2

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

  • Header set at the <VirtualHost> level applies to all responses from that vhost.
  • If you use .htaccess files, you can also add the directive there - but the vhost config is preferred for performance (AllowOverride None disables per-directory overrides).
  • PHP sites using Apache should use the PHP Composer module instead for full subscriber detection.

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.