This knowledge base article explains how ads.txt works with subdomains in Google AdSense, specifically when the subdomain is hosted on the same server and mapped to a folder (custom PHP or similar stack).
The document covers:
ads.txt discovery behavior
Subdomain authorization rules
Correct configuration patterns
Verification and troubleshooting
Security and compliance considerations
This applies to production websites already serving ads and administrators validating revenue eligibility.
Product: Google AdSense
Standard: ads.txt (Authorized Digital Sellers β IAB)
Environment:
Apache / Nginx
Custom PHP applications
Same hosting, folder-mapped subdomains
Google AdSense uses the following logic:
| Requesting Domain | ads.txt Lookup Location |
|---|---|
example.com | https://example.com/ads.txt |
sub.example.com | https://example.com/ads.txt |
blog.sub.example.com | https://example.com/ads.txt |
Key Rule
If no ads.txt exists on the subdomain, AdSense falls back to the root domainβs ads.txt.
Ad request originates from subdomain.example.com
Google crawler checks:
https://subdomain.example.com/ads.txt
If not found β crawler checks:
If publisher ID is authorized β ads are served and monetized
β Revenue is valid and credited to the same AdSense account
Accessible at:
β Covers main domain + all subdomains
β No additional syntax required
β No duplication needed
Reason:
ads.txt does not support subdomain scoping
This line is ignored by crawlers
Custom PHP websites
WordPress multisite (same domain)
Folder-based subdomains
Same AdSense publisher ID
Only required if:
Subdomain is on different hosting
Subdomain uses different AdSense account
Subdomain is owned by a different publisher
Expected:
Ensure ads.txt contains:
Matches AdSense account β Settings β Account information
Ads visible
No βunfilledβ placeholders
No AdSense warnings
AdSense β Reports β Manage URL Channels:
Wait 24β48 hours for segmented reporting.
| Issue | Root Cause | Fix |
|---|---|---|
| Ads showing but βEarnings at riskβ | ads.txt unreachable | Fix HTTP 403/404 |
| ads.txt loads HTML | CMS routing issue | Serve static text file |
| ads not monetizing | Wrong publisher ID | Correct pub ID |
| Duplicate ads.txt | Conflicting authorization | Keep single root ads.txt |
| Delay in earnings | Normal crawl lag | Wait 24β48 hours |
ads.txt prevents unauthorized resale of your ad inventory
Incorrect entries may:
Block demand
Reduce fill rate
Trigger AdSense warnings
Never add third-party sellers unless verified
Maintain one authoritative ads.txt
Keep ads.txt flat text only
Avoid CMS rewrites or redirects
Monitor AdSense Policy Center weekly
Use URL channels for large subdomain traffic
Document ads.txt changes in change logs
For same-hosting, folder-mapped subdomains, a single root-domain ads.txt is sufficient and fully compliant.
If ads are serving and no AdSense warnings exist, earnings from the subdomain are valid and credited normally.
No additional configuration is required.
#adsense #adstxt #googlesense #subdomainads #admonetization #publisherguide #webhosting #customphp #serveradmin #siteops #adops #programmaticads #iab #inventorycontrol #websecurity #adsensetips #adsensehelp #techseo #webinfrastructure #dns #apache #nginx #hostingguide #adpolicy #webmasters #sitemonetization #adsenseearning #digitalads #adsenseconfig #adsenseaudit #adtech #supportengineers #itdocumentation #knowledgebase #adsensefix #adsensetroubleshooting #adopsengineering #adsensesetup #adsensedeveloper #adsensepolicy #adsensefaq #adsensetech #adsenseguide #adsensevalidation #adsensebestpractice #adsensecompliance