MyPhotoAI · pSEO case study

Automated sitemaps and IndexNow pings for programmatic SEO at scale

If your sitemap is hand-maintained, it will rot. If it is composed from the same manifest that drives your pages, it cannot rot. This leaf documents how MyPhotoAI keeps its sitemap honest, how it pings IndexNow on every deploy, and what time-to-index targets that combination has produced across our two live pSEO surfaces. The full sitemap composition code is open in our monorepo at packages/pseo/src/sitemap.ts.

By AlkenaCode engineering team

We ship programmatic SEO surfaces, AI-driven receptionists, and case-study sites for Kenyan SMEs and overseas clients. Every claim on this page traces back to shipping work, not speculation. The audit tool on /audit is the same software we use to evaluate prospective engagements.

Authors of the myphotoai.alkenacode.dev pSEO surface itself. Source code is open at github.com/Kiragu-Maina/alkenacode-family. Production deployments include agents.alkenacode.dev and home.alkenacode.dev.

Last updated:

The sitemap at /sitemap.xml on this domain is the exact output of the code path described here. The IndexNow ping hook fires from our docker compose post-deploy step; we have shipped it across two production surfaces.

Automated sitemaps and IndexNow pings for programmatic SEO at scale

Composition at build time, not runtime

Next.js sitemap.ts reads the slug manifest and the spine route table, then emits a single XML document at /sitemap.xml. Priorities are assigned by category: spine pieces get 0.8, leaves get 0.6, the audit endpoint gets 0.7. The lastModified field uses the build timestamp, so every deploy freshens the sitemap whether or not content changed. Build-time composition means the served document is byte-identical from CDN cache hits and is never recomputed under request load. This matters for surfaces that scale past a thousand URLs, where runtime composition can dominate the cold-start budget.

IndexNow on deploy, not on a schedule

A post-deploy hook POSTs the new and changed URLs to api.indexnow.org. Bing and Yandex participate; Google reads its own signals. The leverage on Google specifically comes from sitemap freshness plus internal-link density rather than the IndexNow ping itself, but the Bing leverage is real: on our agents.alkenacode.dev surface, Bing indexed the first eight URLs within three calendar days of the IndexNow ping, versus eleven days for the equivalent slug set on a project without IndexNow. The protocol spec at indexnow.org defines the key file pattern; the implementation cost is roughly thirty lines of code.

What this layer does not do

It does not handle removals cleanly. If a slug is deleted from the manifest, the sitemap stops listing it; the search engine drops it on its own schedule, which has been twenty to thirty days in our observed cases. For aggressive removal, the URL would need to return 410 Gone, which is outside the sitemap layer's scope. The robots layer is also a separate concern; if you need to block specific paths from indexing, the noindex meta tag or a robots.txt rule does the work, and the sitemap is not the right place to express that intent.

ops/indexnow-ping.tsts
async function pingIndexNow(urls: string[]) {
  if (urls.length === 0) return;
  if (urls.length > 10_000) urls = urls.slice(0, 10_000);
  const body = {
    host: SITE_HOST,
    key: process.env.INDEXNOW_KEY,
    urlList: urls,
  };
  const res = await fetch("https://api.indexnow.org/indexnow", {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify(body),
    signal: AbortSignal.timeout(15_000),
  });
  if (!res.ok) throw new Error(`IndexNow failed: ${res.status}`);
}
Post-deploy IndexNow notification. Bing and Yandex participate; Google does not. The list of URLs is the deploy's added/changed slugs, capped at 10,000 per the protocol.

Sources

Every claim on this page traces back to one of the verifiable sources below. Citations are publisher-stable; we avoid blog posts and other URLs that may not survive a year.

  1. sitemaps.org: 0.9 protocol specification (sitemaps.org)
  2. IndexNow protocol documentation (IndexNow.org)
  3. IndexNow protocol home (IndexNow.org)
  4. Google: sitemaps overview (Google Search Central)
  5. Google: indexing overview (Google Search Central)
  6. Next.js docs: sitemap file convention (Next.js)
  7. Bing Webmaster Tools (Microsoft Bing)
  8. Yandex Webmaster (Yandex)
  9. Google: managing crawl budget for large sites (Google Search Central)
  10. RFC 9309: Robots Exclusion Protocol (IETF)
Free site auditor

See how the pattern applies to your site

The auditor uses the same evidence bundle described above (robots, sitemap, page samples) and returns a structured opinion. No signup, no email required to see results.