How To Do Ads.txt For Google

How To Articles

As a blogger and website owner, I recognize the significance of generating income from advertisements. Nevertheless, it is crucial to verify the legitimacy and trustworthiness of the ads displayed on my website. This is the reason why I opted to utilize ads.txt for Google – an uncomplicated and efficient measure to combat ad fraud and safeguard the interests of advertisers and publishers alike.

First things first, let’s understand what ads.txt is and how it works. The term ‘ads.txt’ stands for Authorized Digital Sellers, and it is an IAB (Interactive Advertising Bureau) initiative introduced in 2017. Ads.txt is essentially a text file that resides on a website’s domain and is publicly available. This file contains a list of authorized sellers (ad networks and other platforms) for the website’s inventory.

Generating and Implementing ads.txt

Implementing ads.txt for Google involves a straightforward process. Here’s a step-by-step guide to help you get started:

  1. Identify your authorized digital sellers: Start by identifying the ad networks and other platforms that you work with and trust. These are the sellers who are authorized to sell your ad inventory.
  2. Create a text file: Open a simple text editor and create a new file. Save this file with the name ‘ads.txt’.
  3. Add authorized seller information: In the ‘ads.txt’ file, you need to list the authorized sellers along with their Publisher ID provided by each platform. Each line in the file represents a different authorized seller. For example:, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0

  • This is the domain of the ad network or platform.
  • pub-xxxxxxxxxxxxxxxx: This is the Publisher ID, which you obtain from each platform or ad network.
  • DIRECT: This indicates that you have a direct relationship with the seller.
  • f08c47fec0942fa0: This is an optional field, known as ‘Certification Authority ID’ and it provides extra security. Although optional, it is recommended to include it.

Note: Each authorized seller should have its own line of code within the ‘ads.txt’ file.

  • Save and upload the file: Once you have added the necessary lines for all your authorized sellers, save the ‘ads.txt’ file. Next, upload this file to the root directory of your website. This can be done through your website’s hosting control panel or via FTP.
  • Checking the correct implementation

    After uploading the ‘ads.txt’ file, it’s important to ensure that it has been implemented correctly. You can do this by visiting and entering your website’s domain to check the file’s status. Google will verify if the file is properly implemented and display any errors or warnings if found.

    Benefits of Implementing ads.txt

    Implementing ads.txt for Google offers numerous benefits:

    • Prevents ad fraud: Ads.txt helps prevent unauthorized sellers from selling your inventory, reducing the risk of ad fraud and malware.
    • Increases transparency: By listing the authorized sellers, you provide transparency and clarity to advertisers, helping them make informed decisions.
    • Protects your revenue: Ads.txt ensures that only authorized sellers can sell your inventory, protecting your revenue stream by eliminating counterfeit inventory.


    Implementing ads.txt for Google is a simple yet powerful step towards combating ad fraud and safeguarding your website’s reputation. By following the steps mentioned above, you can ensure that only authorized sellers sell your ad inventory, protecting both your revenue and the interests of your advertisers. So, take action today and make your website a safer and more trusted platform for advertisements.