AdSense ads.txt File Setup
✅ What Was Created
An ads.txt file has been created in the root directory of your site with the following content:
google.com, ca-pub-4166647782860352, DIRECT, f08c47fec0942fa0
📋 File Format Explained
The ads.txt file format is:
google.com, ca-pub-4166647782860352, DIRECT, f08c47fec0942fa0
Where:
- google.com: The ad network (Google)
- ca-pub-4166647782860352: Your AdSense Publisher ID
- DIRECT: Indicates a direct relationship with the seller
- f08c47fec0942fa0: Google’s certification authority ID (fixed value for AdSense)
🔍 Verification
After deploying to GitHub Pages, your ads.txt file should be accessible at:
- URL:
https://mrajan.com.np/ads.txt - Expected Content: Should display the line with your publisher ID
⚠️ Important Notes
- File Location: The file MUST be in the root directory (
/) of your domain - File Name: Must be exactly
ads.txt(lowercase) - No Extra Content: The file should only contain the authorization line(s)
- HTTPS: Must be accessible via HTTPS (GitHub Pages provides this)
✅ How to Verify After Deployment
- Deploy your site to GitHub Pages
- Wait 5-10 minutes for GitHub Pages to rebuild
- Visit:
https://mrajan.com.np/ads.txtin your browser - Expected Result: You should see:
google.com, ca-pub-4166647782860352, DIRECT, f08c47fec0942fa0
🚨 Common Issues
File Not Found (404)
- Check if the file is in the root directory
- Verify the file is committed to your repository
- Ensure GitHub Pages has finished building (check Actions tab)
Wrong Publisher ID
- Verify your Publisher ID is correct:
ca-pub-4166647782860352 - Check for typos in the ads.txt file
Not Accessible via HTTPS
- GitHub Pages automatically provides HTTPS
- Ensure your custom domain is properly configured
📊 AdSense Dashboard Status
After deployment, check your AdSense dashboard:
- Go to Sites → Your Site → ads.txt status
- Status should show: “Authorized” after Google crawls your site (may take 24-48 hours)
🔄 If Status Shows “Not Found”
If AdSense shows “Not found” after 48 hours:
- Verify the file is accessible:
https://mrajan.com.np/ads.txt - Check file name is exactly
ads.txt(case-sensitive) - Ensure file is in root directory (not in a subdirectory)
- Clear browser cache and try again
- Wait for Google to recrawl (can take up to 48 hours)
📚 Additional Resources
Your ads.txt file is ready! After deployment, it will be available at the root of your domain.