Deseja criar e gerenciar um arquivo ads.txt no WordPress?
Se o seu site for pego por anúncios fraudulentos, isso pode prejudicar sua reputação e custar-lhe dinheiro. Ao adicionar um simples arquivo ads.txt ao seu site, você pode proteger seu site, seus parceiros e editores contra fraudes de publicidade e possivelmente aumentar sua receita com anúncios.
Neste artigo, mostraremos como criar e gerenciar facilmente um arquivo ads.txt no WordPress.
![How to create and manage ads.txt files in WordPress How to create and manage ads.txt files in WordPress](https://www.wpbeginner.com/wp-content/uploads/2018/01/how-to-create-and-manage-ads-txt-files-in-wordpress-og.png)
Por que criar e gerenciar arquivos Ads.txt no WordPress?
Ads.txt é a abreviação de “Authorized Digital Seller” (vendedor digital autorizado). É um arquivo que mostra quais empresas estão aprovadas para vender anúncios em seu site WordPress e ajuda a impedir a exibição de anúncios falsos.
Se você ganha dinheiro com blogs a partir de anúncios (como com o Google AdSense), é uma boa ideia adicionar um arquivo ads.txt ao seu site.
O motivo é que algumas partes não autorizadas podem fingir ter sua permissão para vender anúncios em seu blog do WordPress. Isso pode levar à exibição de anúncios ruins ou enganosos, o que pode ser perigoso para a sua reputação e para a segurança dos seus usuários.
O arquivo ads.txt é como um guarda. Ele impede que qualquer pessoa que não esteja em sua lista de aprovados venda anúncios em seu blog do WordPress. Dessa forma, você estará protegendo seu site e garantindo que somente os anúncios de parceiros confiáveis sejam realmente exibidos.
Com isso em mente, vamos ver como você pode criar e gerenciar um arquivo ads.txt no WordPress. Vamos orientá-lo por meio de dois métodos diferentes. Você pode usar esses links rápidos para pular para um método específico:
Método 1: criar um arquivo Ads.txt no WordPress usando o WPCode (recomendado)
Criar e gerenciar um arquivo ads.txt requer um pouco de codificação. Se você não se sente à vontade para adicionar códigos personalizados por conta própria, esse processo pode parecer complicado.
É por isso que recomendamos o uso do WPCode, que é o melhor plugin de snippet de código do mercado. Com ele, você não precisará mexer diretamente no código do WordPress e se preocupar em danificar o site.
Esse plug-in funciona como uma interface fácil de usar, na qual você pode inserir códigos personalizados de forma fácil e segura no seu site WordPress. É possível visualizar todos os códigos adicionados em um único local para que você possa acompanhar suas personalizações.
![WPCode - Best WordPress Code Snippets Plugin WPCode - Best WordPress Code Snippets Plugin](https://www.wpbeginner.com/wp-content/uploads/2021/02/wpcode.jpg)
Para este guia, usaremos a versão WPCode Pro. Embora exista um plug-in gratuito do WPCode, o recurso de que precisamos para gerenciar arquivos ads.txt está na versão Pro.
Antes de mais nada, instale o WPCode. Você pode seguir nosso guia passo a passo sobre como instalar um plug-in do WordPress se precisar de orientação.
Em seguida, certifique-se de ativar a chave de licença do WPCode Pro. Basta acessar Code Snippets “ Settings e inserir sua chave de licença onde for apropriado. Em seguida, selecione o botão “Activate Key” (Ativar chave).
Você saberá que a ativação foi bem-sucedida quando o texto do botão mudar para “Deactivate Key” (Desativar chave).
![Enter WPCode license key Enter WPCode license key](https://www.wpbeginner.com/wp-content/uploads/2023/05/enter-wpcode-license-key.png)
Agora, vamos para Code Snippets “ File Editor. Aqui, você verá que o plug-in já tem um recurso de gerenciador de ads.txt incorporado.
O que você precisa fazer agora é escrever as seguintes informações neste formato: domínio, ID publicado, tipo de relacionamento e ID da plataforma de publicidade (opcional).
Por exemplo, aqui estamos adicionando o Google AdSense como uma plataforma de publicidade aprovada:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
O primeiro campo é o domínio da empresa que tem permissão para vender ou revender seu inventário de anúncios. No exemplo acima, é o google.com.
Depois disso, você adicionará o ID do editor, que é exclusivo de sua conta. Aqui, ele é pub-0000000000000000. Se não tiver certeza de onde encontrar esse ID, consulte a documentação on-line da rede ou da plataforma para obter mais informações.
Certifique-se de que o ID esteja correto. Caso contrário, você poderá enfrentar o erro “Earnings at risk”.
A terceira seção declara o tipo de relacionamento, que é DIRETO ou REVENDEDOR. Direto significa que o editor trabalha diretamente com o fornecedor da AdTech.
Enquanto isso, revendedor significa que o editor autorizou um terceiro a revender em seu nome, como uma rede de anúncios ou uma solução de gerenciamento de anúncios.
O último campo é o ID da plataforma de publicidade, que é opcional.
![Creating ads.txt file with WPCode Creating ads.txt file with WPCode](https://www.wpbeginner.com/wp-content/uploads/2023/04/wpcode-ads-txt-min.png)
Agora você pode adicionar quantas plataformas e revendedores quiser. Apenas certifique-se de adicionar cada organização em sua própria linha.
Quando terminar, basta rolar a tela para baixo e clicar em “Save Changes” (Salvar alterações).
![Saving the ads.txt file on WPCode Saving the ads.txt file on WPCode](https://www.wpbeginner.com/wp-content/uploads/2023/04/save-changes-wpcode-file-editor-min.png)
Agora, qualquer pessoa pode ler o arquivo ads.txt de seu site.
Para ver o arquivo em ação, basta adicionar ads.txt ao final do nome de seu domínio, como www.example.com/ads.txt.
![An example of an ads.txt file in WordPress An example of an ads.txt file in WordPress](https://www.wpbeginner.com/wp-content/uploads/2018/01/ads-txt-example.png)
Método 2: Criar um arquivo Ads.txt no WordPress usando o Ads.txt Manager (gratuito)
Outra maneira de criar um arquivo ads.text é usar o Ads.txt Manager. Esse plug-in gratuito adiciona um editor de código simples no qual você pode digitar todas as suas plataformas e redes autorizadas.
A primeira coisa que você precisa fazer é instalar e ativar o plug-in Ads.txt Manager. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.
Após a ativação, vá para a página Configurações ” Ads.txt.
![Creating an ads.txt file for your WordPress website Creating an ads.txt file for your WordPress website](https://www.wpbeginner.com/wp-content/uploads/2018/01/ads-txt-settings.png)
Isso abre um editor de código simples no qual você pode adicionar os detalhes de cada plataforma ou revendedor em sua própria linha, exatamente como antes.
Quando estiver satisfeito com as informações inseridas, clique no botão “Save Changes” (Salvar alterações).
![saving-ads-file Publishing an ads.txt file on your website or blog](https://www.wpbeginner.com/wp-content/uploads/2018/01/saving-ads-file.png)
Como corrigir o erro de ganhos em risco no Google AdSense
Se você usa o Google AdSense, é possível que veja o seguinte erro na sua conta do AdSense:
Ganhos em risco - Um ou mais de seus arquivos ads.txt não contêm seu ID de editor do AdSense. Corrija isso agora para evitar um impacto grave em sua receita.
Isso significa apenas que seu arquivo ads.txt não tem o ID de editor correto.
Para corrigir esse problema, faça login na sua página do AdSense usando seu endereço de e-mail e senha do Google. Você encontrará o ID ao lado do seguinte campo: “Este e-mail está associado à conta do AdSense”.
![The Google AdSense advertising platform The Google AdSense advertising platform](https://www.wpbeginner.com/wp-content/uploads/2018/01/google-adsense-id.png)
Agora, basta acessar o Editor de arquivos do WPCode ou o gerenciador Ads.txt e localizar a linha que adiciona o Google AdSense como um provedor autorizado. Em seguida, altere o texto para que ele use o ID correto.
Depois disso, salve a alteração para armazenar suas configurações. Agora, se você acessar sua conta do Google AdSense novamente, a mensagem de erro deverá ter desaparecido.
Esperamos que este tutorial tenha ajudado você a aprender como criar e gerenciar arquivos ads.txt no WordPress. Talvez você também queira saber como aumentar o tráfego do seu blog ou conferir nossa seleção especializada dos melhores plug-ins de pop-up do WordPress.
Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Amber says
Hi,
I have followed the steps to add the ad.txt to the website. When I go to check it is says page not found. I have deleted cache. I’m not sure what else to do.
WPBeginner Support says
If clearing your site’s cache is not working, reach out to your hosting provider for them to make sure it is not their caching or a security setting that may be preventing it from being crawled.
Administrador
Poornapragna G A says
Hi,
I have been a regular reader of your lovely blog. Thanks.
I entered the details of Ads.txt as given in Google Adsense in the Ads.Txt section “Settings” section in the WordPress dashboard and saved the changes as per your guidance above. Still, my Adsense account says “Ads. Txt not found”. What is the reason for this?
WPBeginner Support says
If you have any caching on your site, ensure that you clear it as that is the most common reason why Google would not be able to find your new ads.txt.
Administrador
Ismail says
Will this ” f08c47fec0942fa0″ be unique to all advertisers in my website?
WPBeginner Support says
Yes the ad code will be specific to the advertisers![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Caydaruus says
Hello i installed Manage Ads.txt and i have google adsense and taboole my question
can i use both in this plugin in one place
WPBeginner Support says
Unless we hear otherwise, you should be able to add both using this plugin.
Administrador
Rakesh says
Very nice article but I want to know how I can add more than one ads.txt file in root folder of my domain , lets say one from google and other from infolink? Please help
WPBeginner Support says
You should be able to add the information from one ads.txt file to the other and merge them for what you’re wanting to do![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Poorna says
You guys makes everything so simple! Thanks a million!! I just uploaded Ads.txt file into my site!!
Arif Wali says
Hello,
I have installed more than 10 plugins I don’t want to install more than that. I there any alternate option?
WPBeginner Support says
You would need to manually edit your ads.txt file using FTP or your host’s file manager but for your worry of how many plugins, we would recommend taking a look at our article below:
https://www.wpbeginner.com/opinion/how-many-wordpress-plugins-should-you-install-on-your-site
Administrador
Jem says
Followed everything but when time to check it appears cannot be found. what should I do?
WPBeginner Support says
If you do not have an ads.txt file then you can create one, not all sites have one created for them by default.
Administrador
Sasindu Jayasri says
I worked with infolink before with this plugin. It worked properly. Now got adsense approval too. So need to add adsense ads.txt code to here. Without losing infolink can I add that file too?
WPBeginner Support says
You would add the new information on a new line of your ads.txt file.
Administrador
Emmanuel Acquah says
I do want to insert ads text on my wordpress website and will this work or is there any other recommendation to carry out this action.
WPBeginner Support says
You would want to check with who you are wanting to include ads from for how to add those to your site. This guide is to help limit what can include ads on your site rather than adding more to your site.
Administrador
mohamed salah says
i have added ads.txt from google adsense, and now i need to add ads.txt from another site and in file manager it refuses to create another ads.txt file, what can i do ?
WPBeginner Support says
Rather than creating another, you would want to modify your ads.txt with the recommendations from the different platforms you want to include.
Administrador
Bhuvana M J says
Thanks, it is very helpful
WPBeginner Support says
You’re welcome![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Paula says
Very helpful, the plug-in was very easy to install and use.
One question: now that my Ads.txt file is installed and running smooth on my site, is it okay to delete the plugin? Or would doing that also delete the Ads.txt file? I ask only because I try to minimize the number of plugins on my site, since each extra plugin makes the site that little bit heavier/slower etc.
Thanks again.
WPBeginner Support says
You would want to check with the plugin’s support for how they handle that currently but for how plugins affect your site speed, we would recommend taking a look at our article below for a better understanding:
https://www.wpbeginner.com/opinion/how-many-wordpress-plugins-should-you-install-on-your-site
Administrador
Carmen Applegate says
Wow! I’ve been trying to figure this out for almost an hour now! This article totally saved me! Thanks!
WPBeginner Support says
Glad our article was helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
WILLIAM says
This page has saved my bacon on more than one occasion, thank you.
WPBeginner Support says
You’re welcome, glad our guide could assist you![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Stephen Reeves says
Hey there,
I am getting an error regarding there already being an ads.txt file on my wordpress, although there shouldn’t be? Strange.
WPBeginner Support says
You may want to check with your hosting provider to ensure there was no hiccup from their end.
Administrador
Rakib says
Thanks For share with us it”s Very helpful for beginner.
Thank You a lot !!!
WPBeginner Support says
Glad you found our content helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Ashish Gupta says
Thank for sharing the article, i,m also facing the same issues.
I just want to know that, i have to update same code or need to do any change.
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
WPBeginner Support says
You need to replace the pub-0000000000000000 with your own publisher ID
Administrador
Vana says
Always helpful, always to the point, thats why any time I need help I use wpbeginner.
Thank you so much!
Vana Verouti
WPBeginner Support says
Thank you, glad our content can be helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Karnav says
If i upload txt file in file manager on my control panel instead adding new plugin compare to add a plugin and put code in it, would it have same speed for loading my website or is it that plugin based set up affect the speed?
WPBeginner Support says
The speed difference shouldn’t be noticeable between the two methods
Administrador
Mae Orcales says
Thanks, you’ve always been a great help!
WPBeginner Support says
Glad our guides have been helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Samson says
My team and I just got our AdSense approved. We installed the Ads.txt plugin but I noticed all our articles had a change in their URLs.
On tracing it, I saw that that ads.txt code of “google.com, pub-account, DIRECT, blah blah blah” is being added to every of our post URL making it look like “www.example.com/google.com, pub-account, DIRECT, blahblabhblah/post-name/
It really looks disturbing.
Please, how can I remove it without disturbing the ads.txt?
WPBeginner Support says
The ads.txt shouldn’t modify your permalinks, you would want to start by checking your permalink settings under Settings>Permalinks to see what is set there as well as resaving your permalinks
Administrador
Swarupa... says
wpbeginner,
You are a savior. You have answers to all my questions.
Thanks a lot
WPBeginner Support says
Glad we can help answer your questions![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
vuctor says
i got approved, and i had the warning, i quickly installed and activated the plugin and the warnings disappeared. But days later, my ads stopped showing on my site (it wasn’t a ban or suspension). it just leaves blank ads spaces. The thing now is that the ads show sometimes, and most times it doesn’t which has made my earnings very poor.
WPBeginner Support says
For what it sounds like, you would want to use Google’s ads not displaying troubleshooter to see if there are any issues, otherwise, it could be there are no recommended ads to match the content on your site.
Administrador
Francisca says
Is there any way this can be done without a plugin?
WPBeginner Support says
Yes, you would manually upload the ads.txt file to your site using either your host’s file manager or FTP and you could create the file using notepad or a similar text editor.
Administrador
Pardeep says
Hey, I have added it like it states in this article, but when I go to google ad sense it says the same earnings at risk message. How do I resolve this?
WPBeginner Support says
You may need to give some time for Google’s cache to clear so it recrawls your site
Administrador
Nikhil Kumar says
Thank you so much. I had no idea why my ads had gone blank. After adding ads.txt everything is working fine.
WPBeginner Support says
Glad our guide could help solve the problem
Administrador
Ajibade Victor says
Nice article, really helpful but will the Ads.txt plugin be automatically added to my site’s root domain? i mean, it seems really simple. Are you saying all i need to do i download the plugin, copy the google code, replace the pub id with mine and save changes. What about adding the txt file to the root domain? Will the plugin do that automatically?
WPBeginner Support says
Yes, the plugin should create that file and place it for you![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Simon Pan says
Thanks for your article
WPBeginner Support says
You’re welcome, glad you like our article![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Dina says
Hello,
We have 2 google adsense accounts how to add both of them. I add two lines :
google.com, pub-first-account, DIRECT, f08c47fec0942fa0
google.com, pub-second-account, DIRECT, f08c47fec0942fa0
or how ?
Thank you
WPBeginner Support says
You’re correct, that would be how to add a second accepted advertiser on your site
Administrador
Nitesh says
I am searching for this tactics long time. Thanks for sharing with us.
WPBeginner Support says
You’re welcome, glad our article could be helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
MicroDok says
Thanks for your article. I was able to add Ads.txt on my website using the plugin recommended. But, Google Adsense is still not showing on my website; its still blank as before. What could be the problem?
WPBeginner Support says
There are a few possible reasons for ads not showing, if Google hasn’t recrawled your site that could be the simplest. Otherwise, you would want to go through their troubleshooter for the cause and fixing the issue.
Administrador
Emmanuel Peter says
Thank you for your explanations. I was able to add Ads.txt on my website using the plugin recommended. But, Google Adsense is still not showing on my website. What could be the problem?
WPBeginner Support says
The most common reason is either your site’s caching or if your robots.txt may be preventing the file from being crawled. Google does take time to recrawl your site as well.
Administrador
pawan says
i hv domain and subdomain too, how can i fix this, as u hv been told it would work on main domain only.
WPBeginner Support says
For the subdomains, you would need to manually create an ads.txt file and in your primary domain, note the subdomain for your site.
Administrador
Pawan says
I hv 2 adsense, one for main domain and another for subdomain. Now I hv addeed txt file for main domain adsense only. Can i add both publishers id in one txt file.
WPBeginner Support says
You could add both publisher ids to the ads.txt file but you would want to make sure the correct id is in the subdomain’s file.
Irfan Ahmed says
Thanks. For a novice like me, you have been a great help in setting up my website.
The most important thing is that your information is always to the point, and trustworthy. Whenever I face any problem, I search on your website. And if I have found what I am searching for, I know that my problem will now be definitely resolved.
WPBeginner Support says
Glad our guides could be helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Belmadeng says
Thanks for sharing this guide. It was really helpful
WPBeginner Support says
Glad our guide could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Favour says
The Plugin says; Untested with your version of WordPress, any other way?
WPBeginner Support says
For that message, you would want to take a look at our article here for understanding it: https://www.wpbeginner.com/opinion/should-you-install-plugins-not-tested-with-your-wordpress-version/
Administrador
Ajay says
Hii, nice information. I had applied this procedure but it was still showing the same message. What was the issue.
WPBeginner Support says
If you just added the ads.txt then you would need to wait for Google to recrawl your site for the error to disappear.
Administrador
Philip says
So done all of that and still showing in my adsense same warning. I am sure it will update soon and thank you for this simple to follow guide.
WPBeginner Support says
Glad our guide could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
Edem Buameh says
Im geting errors with my site
Im told html corrupt after visiting
Please help
Ads are still not showing after 48hours
WPBeginner Support says
you may want to try disabling any caching plugin on your site, if that resolves the issue you would want to exclude your ads.txt from your caching plugin.
Administrador
EDEM BUAMEH says
Thanks for the advice
I’m no longer getting html corrupt after visiting the ads.txt
I went to exclude and entered the link above
I’m so grateful
I only hope my ads will start showing after 24hours
Thanks again
Cheers!
WPBeginner Support says
Glad our recommendation could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Jimy says
Thank you very much. I thought I needed to ad another page to the site.
WPBeginner Support says
Glad our article could help![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
barbara says
This was super helpful! Thanks!
WPBeginner Support says
Glad our article could be helpful![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrador
James Parry says
Thank you, really helpful when I got a little lost in the process.
Amby says
I did as instructed and two days later I’m getting the same warning from Adsense. :/
HENRY says
Nice, i was looking for this plugin, so i do this..is easy. Thanks for the help.
Mani says
I recently used ads.txt plugin to install ads.txt file to my website I made all the changes as instructed but still my ads.txt page is showing blank. Can you please check and revert ASAP or can I use another plugin to make things live?
Rajat Chakraborty says
Is there a ‘No-Plugin’ way of doing this thing.
Everytime there is an update for something, a plug-in pops up out of nowhere as a solution.
George says
Bizarre that one would need a plugin for something so stupidly simple trivial!
Fahad Ur Rehman Khan says
I have a normal Adsense approved website, so should I add Ads.txt file to it ? Is it important?
WPBeginner Support says
Hi Fahad,
It is not required but recommended. It is important as some advertisers may not want their ads to appear on websites with no ads.txt file which could affect your website’s earning potential.
Administrador
Fahad Ur Rehman Khan says
Can you please make a video tutorial on it ?
OJ says
What do you need a video for?
Man, this article is self explanatory.
WPBeginner Support says
Some people absorb lessons better if they can watch it in a video, we understand wanting all of our articles in video form![:)](https://www.wpbeginner.com/pt/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Daniel Taylor says
Great article. I’ve been getting this message on my Google Adsense account.
The strange thing is that when I click on the link Google gives me, it’s not my website, but a big gaming site named . So, I’m not too sure why it’s telling me to fix my ads.txt file when it’s in the correct order, and indicating the incorrect domain.