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

| Drupal 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 |

RWA Tokenization in Georgia: Key Takeaways from DGFI & Forbes Conference in Tbilisi

On April 24, 2026, DGFI, in collaboration with Forbes Georgia, hosted a conference on Real-World Asset (RWA) tokenization at the Radisson Blu Iveria Hotel in Tbilisi. The event brought together representatives from financial institutions, regulators, brokerage houses, and emerging fintech players to discuss the evolving landscape of tokenized…

Living in Georgia |