tests
hi
Search engine indexing (SEO)
This app is set up for SEO: metadata, Schema.org JSON-LD (Person, WebSite, FAQPage), robots.txt, and sitemap.xml. To get indexed by Google (and show up in search and AI answers) you must complete the steps below.
1. Set the canonical URL
In .env (and in your host’s env for production), set:
NEXT_PUBLIC_SITE_URL=https://ahadnawaz.dev
Use your real live domain. This drives canonical URLs, sitemap URLs, and all structured data.
2. Google Search Console (required for indexing)
Your site will not show up in Google search until you add and verify it in GSC and submit a sitemap.
- Go to Google Search Console.
- Add a property for your exact URL (e.g.
https://ahadnawaz.dev). - Verify ownership using one of:
- HTML tag (easiest): GSC will show a meta tag like
<meta name="google-site-verification" content="ABC123..." />. Copy only the content value (ABC123...). In your.envadd:
Redeploy; the app injects this meta tag automatically.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION=ABC123... - Or use the DNS or HTML file method if you prefer.
- HTML tag (easiest): GSC will show a meta tag like
- After verification: open Sitemaps → Add a new sitemap → enter:
sitemap.xml(full URL ishttps://your-domain/sitemap.xml) → Submit. - Request indexing for the homepage: URL Inspection → paste your homepage URL → Request indexing. Repeat for
/blogand/guideif you like. This can speed up the first crawl.
3. Bing Webmaster Tools
- Go to Bing Webmaster Tools.
- Add your site and verify ownership.
- Submit your sitemap:
https://ahadnawaz.dev/sitemap.xml.
4. Person structured data (Schema.org JSON-LD)
The site emits Person markup so search engines and AI tools can understand your profile. It includes:
- Identity: name, job title, description, image (with dimensions)
- Location: address, nationality, areaServed
- Contact: email, contactPoint (ContactPoint schema)
- Links: url (home, blog, guide), sameAs (GitHub, LinkedIn, Calendly)
- Professional: worksFor, alumniOf, hasOccupation, knowsAbout
To validate structured data: use Google Rich Results Test with your live homepage URL after deployment.
5. What this app already provides
- Crawlable content: The homepage returns static HTML (name, bio, links) so crawlers that don’t run JavaScript still see indexable content.
- Meta & Open Graph: Title, description, and OG/Twitter tags in
app/layout.tsx. - Structured data: JSON-LD for Person, WebSite, and FAQPage in the layout.
- robots.txt: Served at
/robots.txt(allows crawlers, points to sitemap, disallows/api/,/blog/new,/blog/edit/,/blog/seed). - sitemap.xml: Served at
/sitemap.xmlwith home,/blog, and/guide. Dynamic blog post URLs can be added later if you have a server-side list of slugs.
6. After deployment
- Confirm
NEXT_PUBLIC_SITE_URLis set correctly in production. - Open
https://your-domain/robots.txtandhttps://your-domain/sitemap.xmlto confirm they match your domain. - Use Rich Results Test and Mobile-Friendly Test to validate.
Indexing can take a few days to a few weeks after sitemap submission and verification.