Host app-ads.txt at your root domain
Place app-ads.txt in your project's static assets directory. For most frameworks this is the public/ directory (React, Vue, Svelte, Astro) or the static/ directory (SvelteKit, Hugo). The exact directory depends on your framework and build configuration; it is the same directory where you would place favicon.ico.
Commit and push to trigger a Cloudflare Pages deployment. Cloudflare serves all files in the build output at the root domain path.
Verify at https://yourdomain.com/app-ads.txt.
Note: The file must be in the directory configured as the Cloudflare Pages build output, not in a /public subdirectory if that is not your output directory. Check your project's Build settings > Build output directory in the Cloudflare Pages dashboard if you are unsure.
Allow the Google-adstxt crawler in robots.txt
Place robots.txt in the same static assets directory as app-ads.txt:
User-agent: Google-adstxt Allow: /app-ads.txt User-agent: * Disallow:
Commit, push, and verify at https://yourdomain.com/robots.txt.
Set up a 301 redirect (if needed)
Add a _redirects file in your static assets directory. Cloudflare Pages reads this file automatically:
/app-ads.txt https://yourdomain.com/app-ads.txt 301
Alternatively, configure a redirect in the Cloudflare dashboard under Bulk Redirects or using a Page Rule.
Done setting up?
Run a free scan to confirm your app-ads.txt is reachable and correctly configured.
Using a different platform? Browse all platform guides