← All platform guides

Netlify

Place the file in your publish directory

Host app-ads.txt at your root domain

1

Place app-ads.txt in your site's publish directory. For most frameworks this is public/ (Gatsby, Eleventy) or static/ (Hugo). The exact directory is the same one configured in your netlify.toml or Netlify dashboard as the "Publish directory."

2

Commit and push to trigger a Netlify deploy. The file will be served at https://yourdomain.com/app-ads.txt.

3

Verify at https://yourdomain.com/app-ads.txt.

Allow the Google-adstxt crawler in robots.txt

1

Place robots.txt in the publish directory:

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

User-agent: *
Disallow:
2

Deploy and verify at https://yourdomain.com/robots.txt.

Set up a 301 redirect (if needed)

1

Add a _redirects file to your publish directory:

/app-ads.txt  https://yourdomain.com/app-ads.txt  301
2

Alternatively, configure redirects in netlify.toml:

[[redirects]]
  from = "/app-ads.txt"
  to = "https://yourdomain.com/app-ads.txt"
  status = 301

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

Netlify: app-ads.txt setup guide — AppAds Verify