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

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

Azure Web App Deployment tool

From the Advanced Tools, click on Go.

Azure Advanced Toos

Click on SSH

Azure App Services SSH

From the SSH terminal, navigate to the wwwroot directory.

cd /home/site/wwwroot

Create an ads.txt file using the touch command.

touch ads.txt

Open the newly created file using a VI editor.

vi ads.txt

Type i to enter Insert mode and paste your ads.txt code using, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Save the file by pressing Esc and type



This post shows how to add an ads.txt file to an Azure Web App (Linux) using the built-in SSH tool with every Azure Web App.

1 thought on “How to Create an ads.txt File on Azure Web App (Linux)”

Leave a Comment