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:

google.com, 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 yourdomainname.com/ads.txt  (instead of yourdomainname.com, 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 yourdomainname.com/ads.txt, 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 example.com. 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

How to Add the Schema Markup to a WordPress Site

The Schema Markup represents an essential function you can implement within your site to give a significant SEO boost, directly providing additional data to...

6 Ways To Make Money From Your Website Visitors

It's no secret that you can make money with your own website. How exactly this works, however, and how much work is actually behind...

How to Choose the Right Web Host and WordPress Web Hosting?

If you are planning to create a website or a blog under WordPress, you will need to know the basics to choose your hosting and the related...