How to fix with a Django based website the AdSense: Earnings at risk - One or more of your sites does not have an ads.txt file ?

June 09, 2019    /    Viewed: 1343    /    Comments: 0    /    Edit


Example of quickly fix with a django based web site the google Adsense warning message: "Earnings at risk - One or more of your sites does not have an ads.txt file". Just add the following url:

url(r'^ads\.txt$', views.authorized_digital_sellers_view, name='authorized_digital_sellers'),

and add the view:

def authorized_digital_sellers_view(request):
    return HttpResponse('google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0')

replace pub-0000000000000000 by your publisher id that can be found on the google adsense account in the menu: Account -> Account Information.

Note: It take about 24 hours to be taken into account.

References

Links Site
Earnings at risk - One or more of your sites does not have an ads.txt file. How To Fix ? support.google.com
How to Solve Earnings at risk – One or more of your ads.txt techtrickszone.com
Why am I getting an "AdSense alert: Earnings at risk" warning about ads.txt? dthrive.zendesk.com


Card image cap
profile-image
Daidalos

Je développe le présent site avec le framework python Django. Je m'intéresse aussi actuellement dans le cadre de mon travail au machine learning pour plusieurs projets (voir par exemple) et toutes suggestions ou commentaires sont les bienvenus !