How To Enable Google Adsense ads.txt file for Drupal on Nginx

| Drupal Website Development | 64 seen

Around early September 2019, in my Google AdSense dashboard, I noticed a warning informing me to create a separate ads.txt file. 

I followed the on-screen instruction and did what was asked.

After two months (at the start of November) I noticed my earnings from Google AdSense have dipped more than half and the warning was still there. 

Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue.

Authorized Digital Sellers, or ads.txt is an IAB initiative that helps ensure that your digital ad inventory is only sold through sellers (such as AdSense) who you've identified as authorized. Creating your own ads.txt file gives you more control over who's allowed to sell ads on your site and helps prevent counterfeit inventory from being presented to advertisers.

We strongly recommend that you use an ads.txt file. It can help buyers identify counterfeit inventory and help you receive more advertiser spend that might have otherwise gone toward that counterfeit inventory.

I decided to check and huge was my surprise when trying to visit ads.txt file I got the following warning:

403 forbidden ads.txt file

403 forbidden ads.txt file

To solve it I changed the server file and added the following lines

location = /ads.txt {
allow all;
log_not_found off;
access_log off;
}

Problem solved

 

Receive weekly trade ideas and portfolio adjustments directly to your inbox.

I share ongoing portfolio progress with a focus on generating income through covered calls on quality stocks. Each update includes positioning changes, trade rationale, and forward-looking adjustments based on current market conditions.

Latest articles

Embedded thumbnail for Mumbai & Goa / India Trip

Mumbai & Goa / India Trip

It has already become something of a tradition for us - escaping the cold during our daughter’s winter school break and trading grey skies for warmth, color, and a slower rhythm of life. Each year, we carve out about three weeks to leave Tbilisi behind and head somewhere sunnier. And more often than not, that “somewhere” turns out to be India.Our…

India |

Backtesting Ethereum: How Often Does ETH Drop 5% in a Day?

While working with the TerraM trading bot, I conducted a backtest to quantify the frequency of significant daily drawdowns over the past 365 days (May 4, 2025 – May 3, 2026). Specifically, I analyzed how often the daily price change exceeded -5% or more. The results are notable.The dataset is based on historical price data sourced from…

Terramatris |