🚀 ULTRA HIGH-PERFORMANCE SEO IMPLEMENTATION ## SEO Features ✅ Comprehensive metadata (OpenGraph, Twitter Cards) ✅ Structured data (JSON-LD) for all pages ✅ Programmatic SEO: 120+ TLD landing pages ✅ Dynamic OG image generation (TLD & Domain pages) ✅ robots.txt with proper crawl directives ✅ XML sitemap with 120+ indexed pages ✅ Rich snippets for domain listings ✅ Breadcrumb navigation schema ✅ FAQ schema for key pages ✅ Product/Offer schema for marketplace ## Performance Optimizations ✅ Next.js Image optimization (AVIF/WebP) ✅ Security headers (HSTS, CSP, XSS protection) ✅ Cache-Control headers (1yr immutable for static) ✅ Gzip compression enabled ✅ Core Web Vitals monitoring (FCP, LCP, FID, CLS, TTFB) ✅ Edge runtime for OG images ✅ Lazy loading setup ✅ PWA manifest with app shortcuts ## Geo-Targeting ✅ Multi-language support (13 locales) ✅ Hreflang alternate tags ✅ Locale detection from headers ✅ Currency formatting per region ✅ x-default fallback ## Analytics ✅ Google Analytics integration ✅ Plausible Analytics (privacy-friendly) ✅ Custom event tracking ✅ Web Vitals reporting ✅ Error tracking ✅ A/B test support ✅ GDPR consent management ## New Files - SEO_PERFORMANCE.md (complete documentation) - frontend/src/components/SEO.tsx (reusable SEO component) - frontend/src/lib/seo.ts (geo-targeting utilities) - frontend/src/lib/analytics.ts (performance monitoring) - frontend/src/lib/domain-seo.ts (marketplace SEO) - frontend/src/app/api/og/tld/route.tsx (dynamic TLD images) - frontend/src/app/api/og/domain/route.tsx (dynamic domain images) - frontend/src/app/*/metadata.ts (page-specific meta) ## Updated Files - frontend/src/app/layout.tsx (root SEO) - frontend/next.config.js (performance config) - frontend/public/robots.txt (crawl directives) - frontend/public/site.webmanifest (PWA config) - frontend/src/app/sitemap.ts (120+ pages) Target: Lighthouse 95+ / 100 SEO Score Expected: 100K+ organic visitors/month (Month 12)
156 lines
3.9 KiB
JavaScript
156 lines
3.9 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
// output: 'standalone', // Only needed for Docker deployment
|
|
|
|
// Performance & SEO optimizations
|
|
poweredByHeader: false, // Remove X-Powered-By header for security
|
|
compress: true, // Enable gzip compression
|
|
|
|
// Image optimization
|
|
images: {
|
|
formats: ['image/avif', 'image/webp'], // Modern image formats
|
|
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
|
|
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
|
|
minimumCacheTTL: 60 * 60 * 24 * 365, // 1 year cache
|
|
dangerouslyAllowSVG: true,
|
|
contentDispositionType: 'attachment',
|
|
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**.pounce.com',
|
|
},
|
|
],
|
|
},
|
|
|
|
// Headers for security and caching
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/:path*',
|
|
headers: [
|
|
{
|
|
key: 'X-DNS-Prefetch-Control',
|
|
value: 'on',
|
|
},
|
|
{
|
|
key: 'Strict-Transport-Security',
|
|
value: 'max-age=63072000; includeSubDomains; preload',
|
|
},
|
|
{
|
|
key: 'X-Frame-Options',
|
|
value: 'SAMEORIGIN',
|
|
},
|
|
{
|
|
key: 'X-Content-Type-Options',
|
|
value: 'nosniff',
|
|
},
|
|
{
|
|
key: 'X-XSS-Protection',
|
|
value: '1; mode=block',
|
|
},
|
|
{
|
|
key: 'Referrer-Policy',
|
|
value: 'origin-when-cross-origin',
|
|
},
|
|
{
|
|
key: 'Permissions-Policy',
|
|
value: 'camera=(), microphone=(), geolocation=()',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
source: '/static/:path*',
|
|
headers: [
|
|
{
|
|
key: 'Cache-Control',
|
|
value: 'public, max-age=31536000, immutable',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
},
|
|
|
|
// Redirects from old routes to new Terminal routes
|
|
async redirects() {
|
|
return [
|
|
// Old Command Center routes
|
|
{
|
|
source: '/command',
|
|
destination: '/terminal/radar',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/command/:path*',
|
|
destination: '/terminal/:path*',
|
|
permanent: true,
|
|
},
|
|
// Dashboard → RADAR
|
|
{
|
|
source: '/terminal/dashboard',
|
|
destination: '/terminal/radar',
|
|
permanent: true,
|
|
},
|
|
// Pricing → INTEL
|
|
{
|
|
source: '/terminal/pricing',
|
|
destination: '/terminal/intel',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/terminal/pricing/:tld*',
|
|
destination: '/terminal/intel/:tld*',
|
|
permanent: true,
|
|
},
|
|
// Listings → LISTING
|
|
{
|
|
source: '/terminal/listings',
|
|
destination: '/terminal/listing',
|
|
permanent: true,
|
|
},
|
|
// Auctions & Marketplace → MARKET
|
|
{
|
|
source: '/terminal/auctions',
|
|
destination: '/terminal/market',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/terminal/marketplace',
|
|
destination: '/terminal/market',
|
|
permanent: true,
|
|
},
|
|
// Portfolio is now a separate page (not redirected anymore)
|
|
// Alerts → RADAR (will be integrated)
|
|
{
|
|
source: '/terminal/alerts',
|
|
destination: '/terminal/radar',
|
|
permanent: true,
|
|
},
|
|
// SEO → RADAR (premium feature, hidden for now)
|
|
{
|
|
source: '/terminal/seo',
|
|
destination: '/terminal/radar',
|
|
permanent: true,
|
|
},
|
|
]
|
|
},
|
|
|
|
// Proxy API requests to backend
|
|
// This ensures /api/v1/* works regardless of how the server is accessed
|
|
async rewrites() {
|
|
// Determine backend URL based on environment
|
|
const backendUrl = process.env.BACKEND_URL || 'http://127.0.0.1:8000'
|
|
|
|
return [
|
|
{
|
|
source: '/api/v1/:path*',
|
|
destination: `${backendUrl}/api/v1/:path*`,
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|
|
|