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

Create Your Own Website: 5 Tips to Get You Started

Anyone who wants to start their own business or start their own business needs a good website so that customers can find them. In addition...

How to Create an Effective Showcase Website?

Any professional wishing to develop his activity must be present on the web thanks to a showcase website. It allows you to present your products...

Create Your Own Homepage with WordPress – A Quick Guide

WordPress is the most popular content management system for creating websites. The open-source program has been continuously developed since 2003 - by the community....