Untitled
Google AdSense Setup Guide
This guide will help you set up Google AdSense monetization on your Musfiq R. Farhan blog website.
Prerequisites
Before applying for Google AdSense, ensure your website meets these requirements:
Content Requirements
- ✅ Original Content: All blog posts must be original and unique
- ✅ Sufficient Content: At least 10-15 quality blog posts (you have 3 sample posts - add more)
- ✅ Regular Updates: Publish content regularly
- ✅ High Quality: Well-written, informative, and engaging content
- ✅ No Plagiarism: Never copy content from other websites
Technical Requirements
- ✅ Mobile Responsive: Your website is fully responsive
- ✅ Fast Loading: Optimize images and performance
- ✅ HTTPS: Use secure connections (required for deployment)
- ✅ Privacy Policy: Already implemented at
/privacy - ✅ Contact Information: Available in footer and about page
- ✅ Clear Navigation: Easy to navigate website structure
Policy Requirements
- ✅ No Prohibited Content: No adult content, violence, hate speech, etc.
- ✅ No Copyrighted Material: Only use original or properly licensed content
- ✅ No Excessive Ads: Don't overload pages with ads
- ✅ No Click Fraud: Never click your own ads
- ✅ No Incentivized Clicks: Don't encourage users to click ads
Step-by-Step Setup
Step 1: Get Your Domain Ready
- Deploy your website to a custom domain (e.g., musfiqrfarhan.blog)
- Ensure your domain is properly configured with SSL/HTTPS
- Wait 6+ months for domain history (if new domain, you may need to wait)
Step 2: Create a Google Account
- Go to https://www.google.com/account
- Create a new Google Account or use your existing one
- Verify your email address
Step 3: Apply for Google AdSense
- Visit https://www.google.com/adsense
- Click "Sign Up Now"
- Enter your website URL
- Fill in your account information
- Accept the terms and conditions
- Submit your application
Step 4: Add AdSense Code to Your Website
Once approved, you'll receive your Publisher ID. Follow these steps:
Option A: Add to index.html (Recommended)
Edit client/index.html and add this in the <head> section:
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-YOUR_PUBLISHER_ID" crossorigin="anonymous"></script>
Replace YOUR_PUBLISHER_ID with your actual AdSense Publisher ID.
Option B: Add to App.tsx
Import the AdSenseMeta component:
import { AdSenseMeta } from '@/components/AdSenseMeta';
function App() {
return (
<ErrorBoundary>
<AdSenseMeta />
{/* Rest of your app */}
</ErrorBoundary>
);
}
Step 5: Create Ad Units
- Log in to your AdSense account
- Go to "Ads" → "Ad units"
- Click "New ad unit"
- Choose ad format (Responsive, In-feed, In-article, etc.)
- Name your ad unit
- Copy the ad code
Step 6: Place Ads on Your Website
Display Ads on Blog Posts
Edit client/src/pages/BlogDetail.tsx and add:
import { AdSenseUnit } from '@/components/AdSenseMeta';
export default function BlogDetail() {
// ... existing code ...
return (
<div>
{/* Content */}
<AdSenseUnit slotId="YOUR_AD_SLOT_ID" />
{/* More content */}
</div>
);
}
Display Ads on Blog Listing
Edit client/src/pages/Blog.tsx and add ads between posts:
<AdSenseUnit slotId="YOUR_AD_SLOT_ID" />
Display Ads on News Page
Edit client/src/pages/News.tsx and add ads in the grid:
<AdSenseUnit slotId="YOUR_AD_SLOT_ID" />
Step 7: Monitor Performance
- Log in to your AdSense account
- Check "Performance Reports" for earnings and metrics
- Monitor ad impressions and clicks
- Optimize ad placement based on performance
Ad Placement Best Practices
Recommended Placements
- Above the Fold: Place one ad unit at the top of the page
- In-Article: Place ads within blog post content (after 2-3 paragraphs)
- Sidebar: If you have a sidebar, place ads there
- Between Posts: Place ads between blog post cards in listings
- Below Content: Place one ad unit at the bottom of the page
Avoid These Placements
- ❌ Too many ads on one page (max 3-4 per page)
- ❌ Ads above all content (bad user experience)
- ❌ Ads that cover content
- ❌ Ads in navigation or header
- ❌ Ads in footer (low visibility)
Important Policies
Do's ✅
- Do create original, high-quality content
- Do maintain a clean, user-friendly design
- Do follow all Google AdSense policies
- Do monitor your account regularly
- Do optimize ad placement for user experience
- Do use responsive ad units
Don'ts ❌
- Don't click on your own ads
- Don't encourage others to click your ads
- Don't place ads on pages with little content
- Don't use misleading titles or thumbnails
- Don't have excessive pop-ups or redirects
- Don't violate copyright or intellectual property rights
- Don't use automated traffic or bots
Troubleshooting
Application Rejected?
Common reasons:
- Insufficient content (add more blog posts)
- Low-quality content (improve writing)
- Duplicate content (ensure originality)
- Policy violations (review content)
- New domain (wait 6+ months)
Solution: Address the issues and reapply after 30 days.
Ads Not Showing?
- Check if your AdSense account is approved
- Verify Publisher ID is correct
- Check browser console for errors
- Wait 24-48 hours for ads to appear
- Clear browser cache
- Check if ads are blocked by ad blocker
Low Earnings?
- Increase website traffic
- Optimize ad placement
- Create more content
- Improve SEO
- Use responsive ad units
- Monitor and adjust based on performance
Revenue Optimization Tips
- Content Quality: Write longer, more detailed posts (2000+ words)
- Traffic: Promote your content on social media
- SEO: Optimize for search engines
- User Experience: Fast loading, mobile-friendly, easy navigation
- Ad Placement: Test different placements to find optimal positions
- Niche: Focus on high-value niches (entertainment, media are good)
- Consistency: Publish content regularly
Next Steps
- ✅ Ensure your website has sufficient content
- ✅ Deploy to a custom domain with HTTPS
- ✅ Apply for Google AdSense
- ✅ Wait for approval (usually 2-4 weeks)
- ✅ Add AdSense code to your website
- ✅ Create and place ad units
- ✅ Monitor performance and optimize
Resources
Questions?
For more information, visit the Google AdSense Help Center or contact Google AdSense Support.
Remember: Focus on creating great content first. Monetization will follow naturally as your audience grows!