Skip to main content

Sitemaps (SEO) — Technical Reference

Server-generated data that powers the public XML sitemaps and robots.txt for search-engine indexing of profiles, posts, and hashtag pages. There's no user-facing UI — this is infrastructure consumed by Next.js at build/request time.

Where this lives

Backend

Frontend

GraphQL

type SitemapCounts { profiles: Int! posts: Int! hashtags: Int! }
type SitemapProfileEntry { username: String! updatedAt: DateTime! }
type SitemapPostEntry { id: ID! updatedAt: DateTime! }
type SitemapHashtagEntry { name: String! updatedAt: DateTime! }

type Query {
"Totals per section — used to compute how many 50k-URL sitemap shards to generate."
sitemapCounts: SitemapCounts!
sitemapProfiles(limit: Int, offset: Int): [SitemapProfileEntry!]!
sitemapPosts(limit: Int, offset: Int): [SitemapPostEntry!]!
sitemapHashtags(limit: Int, offset: Int): [SitemapHashtagEntry!]!
}

Each entry carries an updatedAt so the emitted <url><lastmod> reflects real content freshness. Pagination (limit/offset) lets the frontend page through large sets one shard at a time.