Home / Tools / ads.txt Generator
ads.txt Generator
Create a correct ads.txt or app-ads.txt file with your AdSense line in seconds.
How to use the generator
Choose whether you need an ads.txt file for a website or an app-ads.txt file for a mobile app. Enter your domain and your Google AdSense or AdMob publisher ID, and paste any lines your other ad networks gave you. The file builds itself as you type. Copy it or download it, then upload it to the root folder of your website.
Your Google line
When you enter a publisher ID, the generator adds Google’s standard line, including Google’s certification authority ID:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
You can paste your ID with or without “ca-” in front; the generator removes it. If the ID is not in the correct format, you will see a message below the file.
Other networks and variables
Paste lines from other networks exactly as they were supplied, one per line. The optional variables section adds CONTACT, OWNERDOMAIN and MANAGERDOMAIN lines. Only add MANAGERDOMAIN if a partner actually manages your ad inventory. Read more in our guide to ads.txt variables.
Where to upload the file
The file must open at https://yourdomain.com/ads.txt, or /app-ads.txt on the developer website listed in your app store page. Step-by-step instructions: WordPress, Blogger, cPanel, hPanel and aaPanel, and app-ads.txt for apps.
After uploading
Run the ads.txt checker to confirm the file is live and valid. Keep a copy of the file; when you add or remove ad partners later, edit it and upload it again.
Frequently asked questions
Where do I find my AdSense publisher ID?
In AdSense, open Account, then Settings, then Account information. It starts with pub- followed by 16 digits.
Should my AdSense line be DIRECT or RESELLER?
DIRECT, because you own and manage the AdSense account.
Can I use the same file for my app?
The format is the same, but app-ads.txt must be named app-ads.txt and hosted on the developer website listed in the app store.