Ads.txt file Gatsby.js Netlify and Google Adsense

Hi Guys,
I have created a blog site using Gatbys.js. I have been approved for google adsense and told to place a ads.txt file in the root domain. In gatsby that would be the static folder.

When I run gatsby serve to see the build in localhost, It works fine, and the ads.txt file is visible ( However, when I run the build and drag and drop the public folder gatsby generates into Netlify deploy, it gets stuck in the loading phase. I have removed the ads.txt file and it works perfectly.

I have searched online and found this similar issue Upload error after adding the ads.txt file however I do not have php. its a strictly static site. I have used snippets to add the script file for adsense. Is there any way to add a txt file that will allow a successful deploy. It seems like a strange issue.

Hi, @danszp, and welcome to the Netlify community site. :slight_smile:

The root cause in the other case was never determined. The mention of PHP for the other site was me pointing out a detail unrelated to the deployment failure.

It is interesting that this is being reported again and I do want to determine the root cause so we can resolve it.

I need to be able to reproduce the issue to troubleshoot and it seems that file is the key to reproducing the issue. Would you be willing to send me the ads.txt file which you need to upload?

I’ve made sure that private message is enabled if you want to send it to me that way.

Hello Luke,
I was manually deploying the gatsby site by drag and drop. To solve the issue, I connected my site with Github and proceeded to push through github to see if some information would be available to troubleshoot in the conosle. Fortunately, the issue with the ads.txt file is resolved and I can push my site through git.
The ads.txt is just a authorized digital sellers list. It can be viewed here:

I’m really enjoying the ease of Netlify,
Thanks again.

Hi, @danszp, I’m also not having any issue with the file with either drag and drop or Git backed deploys. Both work for me when I test and the file is served correctly.

I’m still unable to reproduce the issue but I’m glad to learn it is working for you now.

You can put it into the static folder