Attention Required - Earnings at risk - You need to fix some ads.txt file issues [WordPress Edition]
Tadashi Shigeoka · Sat, June 1, 2019
I’ll introduce how to resolve the message Attention Required - Earnings at risk - You need to fix some ads.txt file issues displayed in the Google AdSense admin panel. (WordPress + Nginx edition)
Setting up ads.txt
Referring to ads.txt で認定販売者を宣言する - AdSense ヘルプ, place the following file on the server:
/var/www/vhosts/your.example.com/ads.txt
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
Nginx Configuration to Display ads.txt
your_nginx.conf
location /ads.txt {
alias /var/www/vhosts/your.example.com/ads.txt;
}
alias - Module ngx_http_core_module | Nginx
The display example of https://codenote.net/ads.txt is as follows:
That’s all from the Gemba, where we want to display ads.txt in a WordPress + Nginx environment.