Select Page

This Microsoft Azure Web App post will show you how to create an ads.txt file on Azure Web App (Linux).

Ads.txt is a text file containing information about an advertising network (Adsense, for example) and allows the network to verify the publisher’s identity. If you are a Google Adsense publisher, once your website is approved, you must add an ads.txt file to the root of your website.

Azure Web Apps allows us to run web applications like WordPress, .NET , Python, etc. Azure Web Apps run inside an App Service Plan.

An App Service Plan is like a hosting plan that allocates resources to a Web App and can also include supporting services like MySQL, which is essential to running WordPress.

How to Create an ads.txt File on Azure Web App (Linux)

Creating an ads.txt file on Azure Web App (Linux) can be done in several ways. This post will use the built-in SSH terminal available from the Web App Advanced Tools.

To open the SSH terminal. Log in to the Microsoft Azure portal.

Open your Web App and scroll down to the Development Tools section.

Click on Advanced Tools

From the Advanced Tools, click on Go.

Click on SSH

From the SSH terminal, navigate to the wwwroot directory.

cd /home/site/wwwroot

Create an ads.txt file using the touch command.

Open the newly created file using a VI editor.

Type i to enter Insert mode and paste your ads.txt code using

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Save the file by pressing Esc and type

:wq