How to Create and Insert the ads.txt File on a Site

To start monetizing your website or blog, you can activate a Google AdSense account which, once implemented on your site, will start showing paid ads from companies that purchase advertising space to promote their business, products, or services offered.

To complete the configuration required by Google AdSense to start publishing ads on your site, you have to upload a small file, called ads.txt, into the directory of the server where your site resides. Here’s how to do it by following a few simple steps.

How to Obtain the ads.txt file

First, get the ads.txt file by downloading it from the dashboard of your AdSense account. The file is available directly in the Google AdSense dashboard. In case of problems, you can still create it from scratch using a very simple text editor. To create the ads.txt file,  paste the following text string:, pub-0000000000000000, DIRECT, f08c47fec0942fa0

where instead of the series of zeros, you will enter the publisher ID associated with your AdSense account.

To retrieve it, open your Adsense dashboard and go to the Account section and select the Account Information item. You will see your publisher ID appear as the first information. After inserting the ID inside the file, save it in .txt format and rename it with the name ads.

Installing the ads.txt file

After creating your ads.txt file, you can proceed with posting on your site, so as to avoid a highly negative impact on AdSense ad revenue.

The file must be uploaded to the main directory of the domain of your site. You can access the server on which your site is based in various ways. A perfect example is through a software that allows you to connect via FTP to hosting such as FileZilla. The other option is directly from a browser, thanks to the file manager present on all hosting services.

To verify the correct entry:

  • Go to your browser’s search box,
  • Type your domain name, add the forward slash symbol (/) and ads.txt in the end before searching

For example  (instead of, enter the address of your website)

Place the File on a WordPress site

For those who use WordPress, the file must be uploaded to the base directory which usually takes the name of the site’s domain.

If you are unable to access your site’s folders, you can upload the ads.txt file through a plugin called Ads.txt Manager. After installing and activating it, enter the plugin settings and paste the record of the ads.txt file associated with your AdSense account. Save the changes and verify the correct installation by searching, appropriately replacing it with the address of your site.

NOTE: Since the ads.txt file must be in the root directory of a domain name, this plug-in currently only works for top-level domains such as It does not work with WordPress installed as a subdomain, subdirectory, or on a single site within a multi-site network, for which you will have to opt for classic entry via File Manager or FTP connection.

More Like This

Blogger Vs WordPress: What is the Best Platform to Open/Manage a Blog?

Blogger vs WordPress: a clash of the titans when it comes to creating and managing blogs! When you decide to open your own webspace,...

How to Add or Insert a YouTube Video to a WordPress Widget

Nowadays, there may be multiple reasons why you want to add a manageable WordPress video player for your users. Whether for a tutorial, a...

The Best WordPress Themes for Your Website

If you use WordPress, the respective theme decides how your website will look in the end. Therefore, WordPress themes are extremely important if you...