Skip to content

Latest commit

 

History

History
247 lines (196 loc) · 5.99 KB

File metadata and controls

247 lines (196 loc) · 5.99 KB

SEO Indexing Fixes - Google Search Console Issues

🔍 Problems Identified

  • Soft 404: Pages returning 200 but appearing empty to Google
  • Discovered - currently not indexed: Google found pages but hasn't indexed them yet
  • Duplicate without user-selected canonical: Missing canonical URLs
  • Page with redirect: Inconsistent URL handling

✅ Implemented Solutions

1. Static Site Generation (SSG) for Blog Posts

File: src/app/blog/[slug]/page.tsx

Added generateStaticParams() function to pre-render all blog posts at build time:

export async function generateStaticParams() {
  // Fetches all blog slugs and generates static pages
  // This ensures Google gets fully rendered HTML
}

Benefits:

  • Faster page loads
  • Fully rendered HTML for crawlers
  • Better SEO performance
  • Eliminates "Soft 404" errors

2. Improved Caching Strategy

Changed from cache: 'no-store' to next: { revalidate: 3600 }:

  • Blog posts are cached for 1 hour
  • Reduces server load
  • Faster page loads
  • More reliable for crawlers

3. Enhanced Metadata & Robots Configuration

Added to all blog pages:

robots: {
  index: true,
  follow: true,
  googleBot: {
    index: true,
    follow: true,
    'max-video-preview': -1,
    'max-image-preview': 'large',
    'max-snippet': -1,
  },
}

Canonical URLs:

alternates: {
  canonical: blogUrl,
}

4. Next.js Native Sitemap

File: src/app/sitemap.ts

Created a new native Next.js sitemap that:

  • Automatically generates XML sitemap
  • Includes all static and dynamic pages
  • Uses proper TypeScript types
  • Updates automatically on build

Benefits:

  • More reliable than custom route handler
  • Better integration with Next.js
  • Automatic revalidation
  • Type-safe implementation

5. Next.js Configuration Updates

File: next.config.ts

Added:

trailingSlash: false,  // Prevents duplicate URLs
output: 'standalone',   // Better for production
async headers() {       // SEO-friendly headers
  return [
    {
      source: '/:path*',
      headers: [
        { key: 'X-Robots-Tag', value: 'index, follow' }
      ],
    },
  ];
}

6. Robots.txt Optimization

File: public/robots.txt

Changed:

  • Crawl-delay: 1Crawl-delay: 0 (faster crawling)
  • Ensured sitemap URL is correct

7. Sitemap Route Improvements

File: src/app/sitemap.xml/route.ts

Enhanced error handling and data validation:

  • Better error logging
  • Filters out invalid entries
  • Proper cache strategy
  • More reliable data fetching

🚀 Deployment Steps

1. Build and Test Locally

npm run build
npm start

2. Verify Sitemap

Visit: http://localhost:3000/sitemap.xml

Check that all blog URLs are present and valid.

3. Deploy to Production

Push changes to GitHub and deploy via Vercel.

4. Google Search Console Actions

A. Request Indexing for Individual URLs

  1. Go to Google Search Console
  2. Use URL Inspection tool
  3. Test the live URL for each blog post
  4. Click "Request Indexing"

B. Submit Updated Sitemap

  1. Go to "Sitemaps" in GSC
  2. Remove old sitemap if any
  3. Add: https://emrhngngr.tech/sitemap.xml
  4. Submit

C. Validate Fixes

  1. Go to "Page Indexing" report
  2. Click "Validate Fix" for each issue:
    • Soft 404
    • Discovered - currently not indexed
    • Duplicate without canonical
    • Page with redirect

5. Force Google Recrawl

For immediate results:

# Use Google's URL Inspection tool for each blog URL:
https://emrhngngr.tech/blog/your-blog-slug

📊 Expected Results

Immediate (1-3 days)

  • Sitemap recognized by Google
  • Pages start appearing in "Discovered" state
  • Validation process begins

Short-term (1-2 weeks)

  • Pages move from "Discovered" to "Indexed"
  • Soft 404 errors resolved
  • Duplicate content issues fixed

Long-term (2-4 weeks)

  • Full indexing of all blog posts
  • Improved search rankings
  • Better crawl efficiency

🔧 Additional Recommendations

1. Internal Linking

Add more internal links between blog posts to help Google discover and understand content relationships.

2. Content Quality Signals

Ensure each blog post has:

  • ✅ Unique title (60 chars)
  • ✅ Meta description (160 chars)
  • ✅ High-quality images with alt text
  • ✅ Proper heading hierarchy (H1 → H2 → H3)
  • ✅ Minimum 300 words content

3. Monitor Core Web Vitals

Keep your Lighthouse scores high:

  • Performance: 100/100
  • Accessibility: 100/100
  • Best Practices: 100/100
  • SEO: 100/100

4. Schema.org Structured Data

Already implemented via metadata, but verify with:

5. Check for Indexing Issues

Regular monitoring in Google Search Console:

Coverage → View details → Check for errors

🐛 Troubleshooting

If pages still aren't indexed after 2 weeks:

  1. Check robots.txt:

    https://emrhngngr.tech/robots.txt
    

    Ensure blog paths are allowed.

  2. Verify Sitemap:

    https://emrhngngr.tech/sitemap.xml
    

    All blog URLs should be listed.

  3. Test URL with Google: Use URL Inspection tool in GSC to see what Google sees.

  4. Check for Manual Actions: GSC → Security & Manual Actions → Manual Actions

  5. Review Server Logs: Check if Googlebot is successfully crawling pages.

📝 Monitoring Checklist

  • Sitemap submitted to GSC
  • All blog URLs tested with URL Inspection
  • Validation requested for all errors
  • Monitoring "Page Indexing" report weekly
  • Checking for new crawl errors
  • Verifying organic search traffic increase

🎯 Success Metrics

Track these in Google Search Console:

  • Indexed pages: Should increase from current levels
  • Impressions: Should grow as more pages get indexed
  • Average position: Should improve over time
  • Click-through rate: Should remain stable or improve

Implementation Date: October 28, 2025 Status: ✅ Completed Next Review: Check GSC in 7 days