Developers in Nepal launching portfolios or business sites that are not showing up on Google search results.
- ✓A live website deployed with a custom domain
- ✓A Google account
- ✓Access to DNS records (Cloudflare or domain registrar)
🚀 What You Will Learn & Build
- ▸The difference between Domain Property and URL-Prefix property verification
- ▸Adding the google-site-verification DNS TXT record
- ▸Generating dynamic sitemap.ts and robots.ts in Next.js App Router
- ▸Submitting your sitemap to Google Search Console
- ▸Fixing 'Discovered - currently not indexed' and 'Crawled - currently not indexed'
1. Domain Property vs URL Prefix Verification
2. Generating a Dynamic sitemap.xml in Next.js
import { MetadataRoute } from 'next';
export default function sitemap(): MetadataRoute.Sitemap {
const baseUrl = 'https://yourdomain.com';
const now = new Date();
// Static routes
const routes = ['', '/about', '/projects', '/blog', '/contact'].map((route) => ({
url: `${baseUrl}${route}`,
lastModified: now,
changeFrequency: 'weekly' as const,
priority: route === '' ? 1.0 : 0.8,
}));
// Dynamic blog posts
// const posts = getAllPosts().map((post) => ({
// url: `${baseUrl}/blog/${post.slug}`,
// lastModified: new Date(post.updatedAt),
// changeFrequency: 'monthly' as const,
// priority: 0.7,
// }));
return [...routes];
}3. Submitting the Sitemap to Google
4. Fixing 'Discovered - Currently Not Indexed'
✨ Expected Output & Verification
Visiting https://yourdomain.com/sitemap.xml displays clean XML with all site URLs and lastModified dates. Google Search Console displays: Status: Success Discovered pages: [Count of all published pages and articles]
🧪 How to Test the Implementation
- 1Open `/sitemap.xml` in browser to verify valid XML schema
- 2Open `/robots.txt` in browser and confirm Sitemap: directive points to absolute domain
- 3Use GSC 'URL Inspection' to test live URL rendering and check Googlebot crawl response
⚠️ Common Errors & How to Fix Them
Root Cause: Using relative URLs in sitemap instead of absolute URLs with https://.
Fix: Ensure every URL in sitemap starts with your canonical domain: 'https://yourdomain.com/blog/...'.
🛡️ Security Considerations & Best Practices
- !Disallow internal APIs or private dashboards in robots.txt so Googlebot does not crawl private utility endpoints.
❓ Frequently Asked Questions (FAQ)
Initial indexing typically takes anywhere from 3 days to 2 weeks for new domains. Submitting a sitemap speeds up this discovery phase significantly.
📌 Summary of Key Takeaways
- ✓Verify Domain property via DNS TXT record for full coverage.
- ✓Generate dynamic sitemap.ts and robots.ts in Next.js.
- ✓Request manual indexing in GSC to accelerate initial crawling.
Official References & Further Reading
- 🔗Google Search Central: Sitemaps Overview— Official Google documentation on sitemap standards.
Written by Manoj Neupane
AuthorSoftware developer and programming instructor, Nepal
Building software systems and SaaS platforms with Laravel, Next.js, and Node.js. Passionate about helping students and developers in Nepal master practical, real-world development skills.