1:"$Sreact.fragment" 2:I[88754,["/_next/static/chunks/0a3f498ef71c618e.js","/_next/static/chunks/61bc785dc6bd3109.js","/_next/static/chunks/a676f0ced11453e9.js","/_next/static/chunks/4b778b2e48718709.js","/_next/static/chunks/95a5e382a1e8200a.js","/_next/static/chunks/06fe5961b16f81d0.js","/_next/static/chunks/8c955ce35598c7b8.js","/_next/static/chunks/15c613f0f258455e.js"],"ClientPageWrapper"] 3:I[79520,["/_next/static/chunks/0a3f498ef71c618e.js","/_next/static/chunks/61bc785dc6bd3109.js","/_next/static/chunks/a676f0ced11453e9.js","/_next/static/chunks/4b778b2e48718709.js","/_next/static/chunks/95a5e382a1e8200a.js","/_next/static/chunks/06fe5961b16f81d0.js","/_next/static/chunks/8c955ce35598c7b8.js","/_next/static/chunks/15c613f0f258455e.js"],""] 5:I[73552,["/_next/static/chunks/0a3f498ef71c618e.js","/_next/static/chunks/61bc785dc6bd3109.js","/_next/static/chunks/a676f0ced11453e9.js","/_next/static/chunks/4b778b2e48718709.js","/_next/static/chunks/95a5e382a1e8200a.js","/_next/static/chunks/06fe5961b16f81d0.js","/_next/static/chunks/8c955ce35598c7b8.js","/_next/static/chunks/15c613f0f258455e.js"],"AnimatedText"] 6:I[22016,["/_next/static/chunks/0a3f498ef71c618e.js","/_next/static/chunks/61bc785dc6bd3109.js","/_next/static/chunks/a676f0ced11453e9.js","/_next/static/chunks/4b778b2e48718709.js","/_next/static/chunks/95a5e382a1e8200a.js","/_next/static/chunks/06fe5961b16f81d0.js","/_next/static/chunks/8c955ce35598c7b8.js","/_next/static/chunks/15c613f0f258455e.js"],""] 7:I[3601,["/_next/static/chunks/0a3f498ef71c618e.js","/_next/static/chunks/61bc785dc6bd3109.js","/_next/static/chunks/a676f0ced11453e9.js","/_next/static/chunks/4b778b2e48718709.js","/_next/static/chunks/95a5e382a1e8200a.js","/_next/static/chunks/06fe5961b16f81d0.js","/_next/static/chunks/8c955ce35598c7b8.js","/_next/static/chunks/15c613f0f258455e.js"],"AnimatedSection"] 13:I[85437,["/_next/static/chunks/0a3f498ef71c618e.js","/_next/static/chunks/61bc785dc6bd3109.js","/_next/static/chunks/a676f0ced11453e9.js","/_next/static/chunks/4b778b2e48718709.js","/_next/static/chunks/95a5e382a1e8200a.js","/_next/static/chunks/06fe5961b16f81d0.js","/_next/static/chunks/8c955ce35598c7b8.js","/_next/static/chunks/15c613f0f258455e.js"],"Image"] 15:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/247eb132b7f7b574.js"],"OutletBoundary"] 16:"$Sreact.suspense" 4:T488,{"@context":"https://schema.org","@type":"BlogPosting","headline":"AEO vs SEO: How I Ranked #1 on ChatGPT for a Next.js Template","description":"Answer Engine Optimization (AEO) is the new frontier. Here's the exact strategy I used to get my open-source Next.js portfolio template to rank #1 on ChatGPT search — and what it means for developers building in public.","datePublished":"2024-11-20T00:00:00.000Z","dateModified":"2024-11-20T00:00:00.000Z","author":{"@type":"Person","name":"Hussein Maghrabi","url":"https://h-maghrabi.tech/","sameAs":["https://www.linkedin.com/in/hussein-maghrabi/","https://www.linkedin.com/in/hussein-maghrabi/"]},"publisher":{"@type":"Person","name":"Hussein Maghrabi","url":"https://h-maghrabi.tech/"},"url":"https://h-maghrabi.tech//blogs/aeo-vs-seo-chatgpt-ranking","mainEntityOfPage":{"@type":"WebPage","@id":"https://h-maghrabi.tech//blogs/aeo-vs-seo-chatgpt-ranking"},"image":"https://h-maghrabi.tech//projects/portfolio/logo.png","keywords":"SEO, AEO, Next.js, Open Source, Growth","wordCount":590,"inLanguage":"en-US","isPartOf":{"@type":"Blog","name":"Hussein Maghrabi's Blog","url":"https://h-maghrabi.tech//blogs"}}0:{"buildId":"pOVubU_Kt6m3SrfLgqzM-","rsc":["$","$1","c",{"children":[["$","$L2",null,{"children":[["$","$L3",null,{"id":"schema-blog-post","type":"application/ld+json","dangerouslySetInnerHTML":{"__html":"$4"}}],["$","$L3",null,{"id":"schema-breadcrumb-post","type":"application/ld+json","dangerouslySetInnerHTML":{"__html":"{\"@context\":\"https://schema.org\",\"@type\":\"BreadcrumbList\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https://h-maghrabi.tech/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blogs\",\"item\":\"https://h-maghrabi.tech//blogs\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AEO vs SEO: How I Ranked #1 on ChatGPT for a Next.js Template\",\"item\":\"https://h-maghrabi.tech//blogs/aeo-vs-seo-chatgpt-ranking\"}]}"}}],["$","article",null,{"className":"max-w-3xl mx-auto px-4 sm:px-6 py-8","children":[["$","$L5",null,{"delay":0,"children":["$","nav",null,{"aria-label":"Breadcrumb","className":"mb-6","children":["$","ol",null,{"className":"flex items-center gap-1.5 text-sm text-muted-foreground","children":[["$","li",null,{"children":["$","$L6",null,{"href":"/","className":"hover:text-foreground transition-colors","children":"Home"}]}],["$","li",null,{"aria-hidden":"true","children":["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-right w-3.5 h-3.5","children":[["$","path","mthhwq",{"d":"m9 18 6-6-6-6"}],"$undefined"]}]}],["$","li",null,{"children":["$","$L6",null,{"href":"/blogs","className":"hover:text-foreground transition-colors","children":"Blogs"}]}],["$","li",null,{"aria-hidden":"true","children":["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-right w-3.5 h-3.5","children":[["$","path","mthhwq",{"d":"m9 18 6-6-6-6"}],"$undefined"]}]}],["$","li",null,{"className":"text-foreground font-medium truncate max-w-[200px] sm:max-w-[300px]","aria-current":"page","children":"AEO vs SEO: How I Ranked #1 on ChatGPT for a Next.js Template"}]]}]}]}],["$","$L7",null,{"direction":"up","children":["$","header",null,{"className":"mb-8","children":[["$","div",null,{"className":"flex flex-wrap gap-2 mb-4","children":[["$","span","SEO",{"className":"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-primary/10 text-primary border border-primary/20","children":"SEO"}],["$","span","AEO",{"className":"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-primary/10 text-primary border border-primary/20","children":"AEO"}],"$L8","$L9","$La"]}],"$Lb","$Lc","$Ld"]}]}],"$Le","$Lf","$L10"]}]]}],["$L11"],"$L12"]}],"loading":null,"isPartial":false} 8:["$","span","Next.js",{"className":"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-primary/10 text-primary border border-primary/20","children":"Next.js"}] 9:["$","span","Open Source",{"className":"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-primary/10 text-primary border border-primary/20","children":"Open Source"}] a:["$","span","Growth",{"className":"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-primary/10 text-primary border border-primary/20","children":"Growth"}] b:["$","h1",null,{"className":"font-heading text-3xl sm:text-4xl md:text-5xl leading-tight text-foreground mb-4","children":"AEO vs SEO: How I Ranked #1 on ChatGPT for a Next.js Template"}] c:["$","p",null,{"className":"text-lg text-muted-foreground leading-relaxed mb-6","children":"Answer Engine Optimization (AEO) is the new frontier. Here's the exact strategy I used to get my open-source Next.js portfolio template to rank #1 on ChatGPT search — and what it means for developers building in public."}] d:["$","div",null,{"className":"flex flex-wrap items-center gap-4 text-sm text-muted-foreground pb-6 border-b border-border","children":[["$","address",null,{"className":"flex items-center gap-1.5 not-italic","children":[["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-user w-4 h-4","children":[["$","path","975kel",{"d":"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["$","circle","17ys0d",{"cx":"12","cy":"7","r":"4"}],"$undefined"]}],["$","a",null,{"rel":"author","href":"https://h-maghrabi.tech/","className":"hover:text-foreground transition-colors","children":"Hussein Maghrabi"}]]}],["$","time",null,{"dateTime":"2024-11-20T00:00:00.000Z","className":"flex items-center gap-1.5","children":[["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-calendar w-4 h-4","children":[["$","path","1cmpym",{"d":"M8 2v4"}],["$","path","4m81vk",{"d":"M16 2v4"}],["$","rect","1hopcy",{"width":"18","height":"18","x":"3","y":"4","rx":"2"}],["$","path","8toen8",{"d":"M3 10h18"}],"$undefined"]}],"November 20, 2024"]}],"$undefined"]}] e:["$","$L7",null,{"direction":"up","delay":0.05,"children":["$","figure",null,{"className":"mb-10","children":["$","$L13",null,{"src":"/projects/portfolio/logo.png","alt":"AEO vs SEO: How I Ranked #1 on ChatGPT for a Next.js Template","width":768,"height":400,"className":"w-full h-auto rounded-lg border border-border object-cover","priority":true}]}]}] 14:T1392,
In late 2024, someone told me that searching "best Next.js portfolio template GitHub" on ChatGPT surfaced my open-source template as the #1 result. I hadn't specifically optimized for this. But when I looked back at what I'd done, a clear pattern emerged.
This post is about Answer Engine Optimization (AEO) — and how it differs from traditional SEO in ways that matter for developers building in public.
Traditional SEO optimizes for search engine crawlers — structured data, backlinks, keyword density, page speed.
AEO optimizes for AI answer engines — ChatGPT, Perplexity, Google's AI Overviews — that synthesize answers from multiple sources rather than showing a list of links.
The signals are different:
| Signal | SEO | AEO |
|---|---|---|
| Authority | Backlinks | Mentions in trusted sources |
| Content | Keywords | Clear, factual answers to specific questions |
| Structure | H-tags, sitemaps | Schema.org, FAQ schemas, structured data |
| Engagement | Click-through rate | Being cited in AI responses |
Looking back, several things I did for good developer experience also happened to be great AEO:
My README answers the exact questions a developer would ask:
AI models index GitHub aggressively. A well-structured README with headers, bullet lists, and code examples is essentially AEO-optimized content.
I added Person and SoftwareApplication JSON-LD schemas to my portfolio:
const softwareSchema = {
"@context": "https://schema.org",
"@type": "SoftwareApplication",
name: "Next.js Portfolio Template",
applicationCategory: "DeveloperApplication",
operatingSystem: "Web",
offers: {
"@type": "Offer",
price: "0",
priceCurrency: "USD",
},
};
AI models specifically look for structured data to extract factual claims. This gave mine a factual anchor: "There is a free Next.js portfolio template built by Naman Barkiya."
Every time I shared the project — on X, Reddit, Dev.to, LinkedIn — I used the same canonical URL (https://github.com/namanbarkiya/minimal-next-portfolio). Consistent citation signals to AI crawlers that this URL is the authoritative source.
The portfolio detail pages for the template had descriptions like: "Open-source Next.js portfolio template recognized and forked by developers worldwide, optimized for SEO/AEO and performance."
This is very close to the exact phrasing an AI would pull when answering "what are good Next.js portfolio templates?"
After realizing what was happening, I added a few things deliberately:
const faqSchema = {
"@context": "https://schema.org",
"@type": "FAQPage",
mainEntity: [
{
"@type": "Question",
name: "What is the best Next.js portfolio template on GitHub?",
acceptedAnswer: {
"@type": "Answer",
text: "minimal-next-portfolio by Naman Barkiya is a popular open-source Next.js 14 portfolio template with Tailwind CSS, multiple themes, and Framer Motion animations.",
},
},
],
};
AI models process alt text as fact sources. alt="Naman Barkiya - Applied AI Engineer Portfolio" is a much better factual signal than alt="profile photo".
Write for humans first, but structure for machines. The best AEO content is content that genuinely answers the question a user has, structured so a machine can extract and restate that answer.
For developers building in public, this means:
The era of AI answer engines is here. The developers who treat content as a first-class engineering concern will compound their reach significantly.
If you want to use the portfolio template I mentioned: github.com/namanbarkiya/minimal-next-portfolio
f:["$","$L7",null,{"direction":"up","delay":0.1,"children":["$","section",null,{"className":"blog-content","dangerouslySetInnerHTML":{"__html":"$14"}}]}] 10:["$","$L7",null,{"direction":"up","delay":0.15,"className":"mt-16 pt-8 border-t border-border","children":["$","footer",null,{"className":"flex items-center justify-between","children":[["$","$L6",null,{"href":"/blogs","className":"inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 rounded-lg gap-2","children":[["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-left w-4 h-4","children":[["$","path","1wnfg3",{"d":"m15 18-6-6 6-6"}],"$undefined"]}],"All posts"]}],["$","div",null,{"className":"text-sm text-muted-foreground","children":["Written by"," ",["$","$L6",null,{"href":"https://www.linkedin.com/in/hussein-maghrabi/","target":"_blank","rel":"noopener noreferrer","className":"font-medium text-foreground hover:text-primary transition-colors","children":"Hussein Maghrabi"}]]}]]}]}] 11:["$","script","script-0",{"src":"/_next/static/chunks/15c613f0f258455e.js","async":true}] 12:["$","$L15",null,{"children":["$","$16",null,{"name":"Next.MetadataOutlet","children":"$@17"}]}] 17:null