Sitemaps, robots & schema

Configure clean URLs, XML sitemaps, robots.txt rules, canonical tags, JSON-LD structured data, and Google Search Console so search and AI crawlers index cleanly.

How crawlers discover, filter, and understand pages

Search engines like Google and Bing—alongside AI answer engines like ChatGPT Search, Perplexity, Gemini, and Claude—evaluate published ExaSpark apps through four sequential stages.

  • Discovery. Crawlers find public URLs through /sitemap.xml and clean internal <a> links in navigation, footers, and catalogs.
  • Crawl control. Crawlers read /robots.txt and HTTP status codes (200, 301, 404) to decide which routes to fetch and which operational paths to skip.
  • Canonicalization. <link rel="canonical"> tags and 301 redirects assign ranking credit to one HTTPS URL when duplicate variants exist.
  • Understanding. Semantic headings (<h1>–<h3>), plain-English copy, and Schema.org JSON-LD supply structured facts for rich snippets and AI citations.

Designing clean, crawlable URLs and canonicals

Descriptive lowercase URLs such as /pricing, /services/deep-cleaning, or /products/espresso-grinder communicate hierarchy clearly to visitors and crawlers alike. Avoid opaque numeric query URLs (/item?id=4821) or client-only hash routes (/#pricing) for public content.

Every public route should emit a self-referencing <link rel="canonical"> tag using the exact HTTPS URL of your primary custom domain, stripping tracking parameters (?utm_source=..., ?fbclid=..., ?ref=...) so ad clicks never fragment ranking signals.

Route typeExampleIn `sitemap.xml`?DirectivePurpose
Core public pages/, /pricing, /about, /faqYesAllow + self-canonicalPrimary landing routes for search and AI queries
Dynamic detail pages/listings/:slug, /classes/:slugYes (published only)Allow + self-canonicalCaptures specific long-tail searches
Filtered search results/listings?sort=price&tag=newNonoindex, followPrevents thousands of duplicate URL permutations
Signed-in app areas/dashboard, /account, /adminNoDisallow + noindexKeeps private app shells out of search results
Checkout callbacks/checkout/success, /auth/callbackNonoindexTransactional routes have no value in search

After connecting a custom domain in Custom domains, DNS & SSL, point every canonical tag and sitemap entry to that primary host rather than .exaspark.app; see Subdomains & www redirects.

Building XML sitemaps that stay accurate

An XML sitemap hands Google and Bing an authoritative list of indexable pages. Small marketing sites work cleanly with a static /sitemap.xml, whereas database-backed directories, storefronts, or booking marketplaces should generate /sitemap.xml dynamically from published records.

  • List only canonical `200 OK` URLs. Exclude redirects (301), 404 pages, login-gated routes, and noindex pages.
  • Keep `<lastmod>` honest. Update timestamps only when content genuinely changes so crawlers trust your freshness signals.
  • Respect file limits. Keep each sitemap under 50,000 URLs and 50 MB uncompressed; use a sitemap index for larger catalogs.
xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://yourdomain.com/</loc>
    <lastmod>2026-04-12</lastmod>
  </url>
  <url>
    <loc>https://yourdomain.com/pricing</loc>
    <lastmod>2026-04-10</lastmod>
  </url>
  <url>
    <loc>https://yourdomain.com/classes/intro-pilates</loc>
    <lastmod>2026-04-11</lastmod>
  </url>
</urlset>

Writing a safe robots.txt policy

Serve /robots.txt at your domain root (https://yourdomain.com/robots.txt). Block private operational routes while leaving public pages, CSS, JavaScript, and images crawlable so search engines render layouts accurately.

  • Never block CSS or JS assets. Blocking static scripts breaks mobile rendering checks and harms rankings.
  • Never leave `Disallow: /` on Live. Verify after launch that no staging lockout rule shipped by mistake.
  • Declare your full HTTPS `Sitemap:` URL. Explicit sitemap references speed discovery for both search and AI crawlers.
text
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /dashboard/
Disallow: /account/
Disallow: /api/

Sitemap: https://yourdomain.com/sitemap.xml

Adding JSON-LD structured data without errors

JSON-LD embeds machine-readable facts inside <script type="application/ld+json"> without changing visual layout. Search engines and AI answer engines inspect JSON-LD to verify your brand, pricing, service area, availability, and FAQ answers.

Keep JSON-LD strictly aligned with visible page copy. Listing prices, offers, or FAQs that do not appear on the screen violates search guidelines and causes crawlers to ignore your schema.

Use a connected @graph block on your homepage to link your Organization entity to your SoftwareApplication (or LocalBusiness) and Offer:

json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://yourdomain.com/#org",
      "name": "CourtSide Booking",
      "url": "https://yourdomain.com/",
      "logo": "https://yourdomain.com/icon-512.png"
    },
    {
      "@type": "SoftwareApplication",
      "name": "CourtSide Booking",
      "applicationCategory": "BusinessApplication",
      "operatingSystem": "Web, Android",
      "publisher": { "@id": "https://yourdomain.com/#org" },
      "offers": {
        "@type": "Offer",
        "price": "19.00",
        "priceCurrency": "USD"
      }
    }
  ]
}

Prompts to generate your technical SEO stack

Wire your full crawlable stack in one prompt, then publish and inspect /robots.txt and /sitemap.xml directly in your browser.

For marketing websites and SaaS landing pages:

Starter prompt · Web

Implement technical SEO using https://yourdomain.com as our canonical host: add self-referencing canonical tags ignoring UTM parameters, serve /robots.txt disallowing /admin, /dashboard, and /api while referencing /sitemap.xml, generate /sitemap.xml with all public routes, add Organization and FAQPage JSON-LD matching visible text, and serve a clean 404 page for unknown paths.

For database-backed catalogs, marketplaces, or booking directories:

Starter prompt · App

Create a dynamic /sitemap.xml route listing static public pages plus every published listing from the database with updated_at dates. Output unique titles, meta descriptions, canonical links, and Product or Service JSON-LD on /listings/:slug, and add meta robots noindex to authenticated /dashboard and /account pages.

Verifying Google Search Console and requesting indexing

Verifying your domain in Google Search Console speeds initial discovery and exposes crawl or canonical mistakes early.

  1. Confirm custom domain HTTPS

    Ensure your canonical domain resolves over HTTPS with clean redirects from alternate hostnames.

  2. Add a Domain property

    In Google Search Console, choose Domain (covering apex, www, and subdomains together) and copy the DNS TXT verification value.

  3. Publish the TXT record

    Add the root (@) TXT row at Cloudflare, GoDaddy, Namecheap, or Squarespace without editing existing A, CNAME, or MX records; see Cloudflare & registrar DNS.

  4. Verify and submit your sitemap

    Click Verify, open Indexing > Sitemaps, and submit https://yourdomain.com/sitemap.xml.

  5. Request indexing on priority URLs

    Paste your homepage and core landing routes into URL Inspection and click Request indexing.

Technical SEO troubleshooting table

Audit or Search Console symptomLikely causeConcrete fix
`Sitemap could not be read`/sitemap.xml returns HTML fallback or malformed XMLOpen /sitemap.xml directly and return valid XML with application/xml
`Duplicate without user-selected canonical`www, apex, or .exaspark.app serves duplicate pagesEnforce 301 redirects and point every canonical tag to one host
`Blocked by robots.txt` on public pageOverly broad Disallow rule blocks a public routeUpdate /robots.txt to allow public paths and retest in URL Inspection
`Discovered - currently not indexed`Thin copy, orphan route without internal links, or brand-new domainAdd concrete unique copy, link from homepage/footer, and request indexing
JSON-LD error in Rich Results TestMissing required Schema.org field (e.g., priceCurrency)Validate the live URL and match JSON-LD fields to visible page facts
Private `/dashboard` appears in GoogleRoute lacked noindex and was publicly linkedAdd <meta name="robots" content="noindex"> and server-side login checks

Next steps

Still have a question?Ask our team and other builders on Discord.

From the blog