This guide explains how to use Ads.txt Generator, step by step, with screenshots of the real tool. It is written for site owners, developers and SEOs who look after crawling, indexing and site health. Create a valid ads.txt file for Google AdSense and other ad networks. Add your publisher IDs and download the file in the right format.
Quick answer: To use the Ads.txt Generator, open the free tool, enter the google AdSense publisher ID and paste the other lines, then copy the text it creates. Everything runs in your browser, so there is no sign up and nothing you type is stored on a server.
On this page

What is the Ads.txt Generator?
txt generator. Create ads.txt lines for Google AdSense, Ad Manager and other networks with DIRECT or RESELLER and certification IDs.
ads.txt lists the companies allowed to sell ads on your site. Without it, AdSense may limit your ads and earnings. Upload it to your root folder at yoursite.com/ads.txt.
How to use Ads.txt Generator step by step
-
Step 1: Open the Ads.txt Generator
Go to the Ads.txt Generator on hasnainsanmal.com. It loads with example values already filled in, so you can see how it works straight away. It works the same way on a phone, tablet or computer.
-
Step 2: Enter Google AdSense publisher ID
In the Google AdSense publisher ID (optional) box, type your own value. The example uses pub-1234567890123456, which you can replace.
-
Step 3: Paste Other lines
Paste or type your text into Other lines (domain, account ID, DIRECT/RESELLER, cert ID).
-
Step 4: Read the results
The output appears inside the tool card. Change any input to compare different scenarios.

Screenshot of the Ads.txt Generator results. -
Step 5: Copy or download the output
Use Copy and Download ads.txt to take the result into your document, CMS, spreadsheet or report.
What does each field in the Ads.txt Generator mean?
| Field | What to enter | Example |
|---|---|---|
| Google AdSense publisher ID (optional) | Your text | pub-1234567890123456 |
| Other lines | Text, one item per line where asked | Your own value |
What does a worked example look like?
With the example inputs (Google AdSense publisher ID (optional): pub-1234567890123456), the Ads.txt Generator returns: # Add your publisher IDs
Replace the example with your own input to get your own result, then review it before you use it.
How do you get the best results from the Ads.txt Generator?
- Re-check after every theme, plugin or server change.
- Confirm fixes in Google Search Console with URL Inspection.
For background, read the Google crawling and indexing documentation. If you are working on a related task, our guide on how to use the Error establishing a database connection walks through it the same way. You can also browse all free Technical SEO Tools.
What mistakes should you avoid with the Ads.txt Generator?
- Testing on a staging copy and forgetting that the live site has different rules.
- Fixing one URL and not checking the template that created the problem.
- Changing URLs without adding 301 redirects.
Key terms
- Search engine optimisation
- The practice of improving a website so it ranks higher in unpaid search results. It covers technical health, on-page content, links and user experience, and it follows Google Search Essentials rather than shortcuts.
- Browser based tool
- A tool that runs entirely in your web browser with JavaScript, so the data you enter is processed on your own device. It works instantly without sign up, but it cannot fetch other websites because of browser security rules.
Related free tools
Frequently asked questions
Is the Ads.txt Generator free to use?
Yes. The Ads.txt Generator is completely free, with no sign up, no daily limit and no watermark. It is one of more than 500 free SEO and marketing tools on hasnainsanmal.com.
Is my data stored when I use the Ads.txt Generator?
No. The Ads.txt Generator runs in your browser with JavaScript, so the values and text you enter are processed on your own device and are not sent to or saved on our server.
How accurate is the Ads.txt Generator?
It creates a solid first draft from your inputs. Always review and edit the output so it is accurate, specific and sounds like you before you publish or send it.
Does the Ads.txt Generator work on a phone?
Yes. The tool is built for screens from 360 pixels wide, so you can use the Ads.txt Generator on a phone, tablet or computer in any modern browser.
Can I use the Ads.txt Generator for client work?
Yes. You can use the results for your own sites and for client projects. Check the output first, and keep a note of the inputs you used so you can repeat the check later.
What should I do after using the Ads.txt Generator?
Apply the result on your page, campaign or document, then measure the effect. If you would like expert help, see the SEO services or message Hasnain on WhatsApp for a free recommendation.
How we checked this guide: every step and screenshot was taken from the live Ads.txt Generator on 2 November 2026. Further reading: Google SEO Starter Guide.




