How to add "ads.txt" to your Self-hosted Ghost blog install?

What is "ads.txt" file and why it is important to add it to your site?

Ads.txt stands for Authorized Digital Sellers, and it is an initiative by the Interactive Advertising Bureau (IAB) to improve transparency in programmatic advertising. It is a simple text file that publishers place on their websites to publicly declare the companies that are authorized to sell their digital ad inventory.

Ads.txt is essential because it helps prevent unauthorized or fraudulent selling of ad inventory. By implementing ads.txt, publishers can verify that the ad space being purchased is legitimate and sold by authorized sellers. This helps protect advertisers from ad fraud and ensures that they are buying ad space from trusted sources.

In summary, ads.txt is significant for maintaining transparency and trust in the programmatic advertising ecosystem, benefiting both publishers and advertisers.

The Ghost blog and "ads.txt" issue.

In the older versions of Ghost blog, you can add your "ads.txt" file directly to the theme root folder, then build and upload the theme to your self-hosted Ghost install.

This does not work anymore, with the new versions. Therefore, you must use Nginx to add and direct your /ads.txt to your file location.

You need to add this location block to your Nginx website configuration, in /etc/nginx/sites-available/ directory (make sure your ads.txt file is ready and set at this location):

location /ads.txt {
    alias /home/www/ads.txt;
}

Soon, as you save the new location block to your configuration file, make sure the configuration is ok by running:

nginx -t

If everything is alright, you can restart your Nginx server:

## 
sudo service nginx restart
## or
sudo service nginx reload








Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+

Read more