← All platform guides

GitHub Pages

Place the file in your repository root and push

Host app-ads.txt at your root domain

1

In your GitHub Pages repository, create a file named app-ads.txt in the repository root (the same directory as your index.html or _config.yml).

2

Add your app-ads.txt content to the file and commit it to the branch GitHub Pages is configured to deploy from (typically main or gh-pages).

3

Push the commit. GitHub Pages will serve the file at https://yourdomain.com/app-ads.txt within a few minutes.

4

Verify by opening https://yourdomain.com/app-ads.txt in a browser. The raw file contents should appear.

Note: If you use Jekyll, files starting with an underscore are excluded from the build. app-ads.txt does not start with an underscore, so it will be included automatically. If you have a custom build process, confirm that app-ads.txt is copied to the build output directory.

Allow the Google-adstxt crawler in robots.txt

1

In the repository root, create or edit robots.txt and add the following:

User-agent: Google-adstxt
Allow: /app-ads.txt

User-agent: *
Disallow:
2

Commit and push. Verify at https://yourdomain.com/robots.txt.

Set up a 301 redirect (if needed)

1

GitHub Pages does not support server-side redirects for static files. If your custom domain uses www but the file is at the bare domain (or vice versa), configure the canonical domain in the repository Settings > Pages > Custom domain and ensure both variants resolve correctly.

2

For more complex redirect needs, consider using Cloudflare in front of GitHub Pages to handle redirect rules via Cloudflare Page Rules or Transform Rules.

Done setting up?

Run a free scan to confirm your app-ads.txt is reachable and correctly configured.

Run a free scan

Using a different platform? Browse all platform guides

GitHub Pages: app-ads.txt setup guide — AppAds Verify