How to create a GitHub Page to host the AdMob file app-ads.txt

Andres Sandoval
2 min readNov 6, 2023

AdMob requires to crawl your website to get the app-ads.txt content. When you add ads to your Android app, one Admob step is to add the file app-ads.txt to your website. For example abc.com/app-ads.txt. To achieve this we need to host our app-ads.txt on a public URL, luckily Github lets developers create free pages. Follow below steps to verified your app-ads.txt

After app-ads.txt is verified
Before app-ads.txt is verified

Part 1. How to get app-ads.txt Admob content

  1. Login to AdMob account
  2. Go to page https://apps.admob.com/v2/apps/appadstxt
  3. Copy content and add to the file app-ads.txt

Part 2. How to create a GitHub Page to host the AdMob file app-ads.txt

  1. Create a GitHub page -> andresand.github.io

2. Create a new GitHub repo [https://github.com/AndreSand/AndreSand.github.io/]. Note: repo name *needs* to be your username. Github Page: username.github.io

3. Add the file README.md. It’s the home page of your GitHub page

andresand.github.io/readme.md

4. Now lets make the GitHub repo a Page. Go to your repo “Settings”

5. On the left menu go to “Pages”.

6. Make some configuration changes. A) Change source to “Deploy from a branch” and change Branch to “None”. Click save.

7. Now your GitHub page is live.

username.github.io

andresand.github.io

Thanks for spending your time reading it and let me know if I’m wrong somewhere or if there’s something that could do differently or better. I’m open to your feedback 🙌🏻

-Andres

Github now lest you open your code on the cloud github.dev

References:

https://support.google.com/admob/answer/9363762?hl=en

https://pages.github.com

--

--