Every hosted site serves its own /robots.txt, /sitemap.xml and /sitemap-pages.xml, built per request from its site record and page records. Nothing is generated ahead of time, and nothing is sent to Google for you. This page covers what's in them, how to change it, and what to hand the person for Search Console.
Titles, descriptions, share cards and verification tags are in Site identity, SEO tags and link sharing. Which page answers which address is in How a site's addresses route.
What the site serves
Tested on a local site (phasite). The output below is real.
/sitemap.xml: an index
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://<origin>/sitemap-pages.xml</loc></sitemap>
</sitemapindex>There is one child, always (base-app app/sitemap.xml/route.ts 21). <origin> is the canonical origin, as for canonical tags: the site's domain when the request came in on www.<domain> or on the platform host, else the host as requested (lib/sitemap.ts 62–64).
/sitemap-pages.xml: one URL per page record
The site passes the request through to appengine POST /site/site-map { siteName, siteOrgId, hostName } and returns its XML unchanged (app/sitemap-pages.xml/route.ts 24–31). Appengine decides everything (site.service.ts sitemapEntries 1626–1666, getSiteMap 1668–1677):
| Part | Rule |
|---|---|
| Which records | every page record with data.site = the site (the published copies when publishedPagesOnly is on). It reads them all, not a first page of results. |
| The path | /<data.slug>, else /<data.name>. Flat: a child page is /<child slug>, never /<parent>/<child>. |
| The home page | the page whose slug or name is site.data.homePage (or index) becomes /, changefreq daily, priority 1.0 |
| Every other page | changefreq weekly, priority 0.8 |
lastmod | the record's modifydate, else createdate |
| Headers | application/xml, Cache-Control: public, max-age=0, s-maxage=3600, stale-while-revalidate=86400. A CDN may serve a copy up to an hour old. |
| On an error | 503 with Retry-After: 3600, never an empty list, so Google retries instead of dropping URLs (lib/sitemap.ts 36–41) |
A page is left out when, in this order (site.service.ts 1660):
| Reason | What decides it |
|---|---|
| Same address as another page | a second page with the same path |
| Payment or unsubscribe page | a feature row { "feature": "payment" | "unsubscribe", … } in site.data.features; the path is the row's page, or /unsubscribe for unsubscribe |
| Hidden | data.hidden: true |
| Marked noindex | data.robots contains noindex or none |
| Left out by the sitemap rules | site.data.sitemap, below |
What is never in it:
- Feature addresses that have no page record:
/store,/blog,/form,/bookand the rest. Tested: phasite's/storerenders and isn't listed. - Records: products, blog posts, events. Tested: no product URL is listed. Base-app's comments say records are listed under their data page "when the owner chose to" (
app/sitemap.xml/route.ts9–10,lib/sitemap.ts10–11); the server has no such code.
What is in it, unless you take it out: every page record, including the ones nobody should land on. Tested on phasite: /root (the header and footer), /account-layout (the account template), /product (the product template, empty without ?slug=), /site-map, and every test page.
The host in the URLs (site.service.ts 1631–1635, publicDomainOf 1681–1688):
- the site's
domain; - else a custom domain mapped to the site (
site_domain, not*.site.appmint.app,appmint.apporlocalhost); - else the host the sitemap was asked on, with its port removed;
- with no host at all, the platform host from the site record.
localhost hosts get http://, everything else https://.
Tested on local: /sitemap.xml points at http://phasite-phazzer.localhost:3200/sitemap-pages.xml, but every URL inside is http://phasite-phazzer.localhost/…, without the port, so none of them open. Hosted sites have no port, so this only affects local testing. POST /site/site-map with hostName: "shop.example.test:8443" gave https://shop.example.test/….
/robots.txt
Base-app app/robots.ts. Tested, as served by phasite:
User-Agent: *
Allow: /
Disallow: /api/
Disallow: /preview/
Disallow: /__preview/
Disallow: /account/
Disallow: /checkout/
Disallow: /order/
Sitemap: https://phasite-phazzer.localhost:3200/sitemap.xml| Site record | robots.txt |
|---|---|
| nothing set | the above: the six fixed Disallow lines (15) and Sitemap: https://<request host>/sitemap.xml (20) |
seo.disallow: ["/skilltest-seo-private/", " "] | one more line, Disallow: /skilltest-seo-private/. Blank entries are dropped. Tested. |
seo.noIndex: true | User-Agent: * / Disallow: /, and no Sitemap line. Tested. |
robots (the site's meta robots string) containing noindex or none | the same Disallow: /. Tested with noindex, nofollow. |
| the site lookup fails | the permissive default, so a blip never de-indexes a live site (43–45) |
- The Sitemap line is always
https://, even on a localhttphost. Tested. - The
Disallowlines are prefixes./account/doesn't cover/accountitself; those pages saynoindexinstead./blogwould also block/blog-archive. seo.disallowhas no screen in Studio: the Classic form's schema hasseo.noIndexonly (dbsdkmodels/site.ts118–124). Write it by API (step 5).
Every way to keep a page out, and what each one does
Tested on test pages on phasite, except where marked as code.
| Mechanism | In the sitemap | The page's <meta name="robots"> | robots.txt | The page itself |
|---|---|---|---|---|
Page data.robots: "noindex, follow" | out | noindex, follow (the page's own value) | unchanged | 200 |
Page data.hidden: true | out | unchanged (index, follow, nocache) | unchanged | 200, still served |
| Sitemap rule leaves it out | out | noindex, nofollow | unchanged | 200 |
Path in seo.disallow | still listed (code: the sitemap doesn't read disallow) | unchanged | Disallow: line | 200 |
seo.noIndex: true | all still listed (tested: 31 of 31) | noindex, nofollow on every page | Disallow: / | 200 |
Site robots with noindex | all still listed | the site's value, on every page without its own robots | Disallow: / | 200 |
| The payment page (feature on) | out, when its row names the page | noindex, nofollow (code, meta.tsx 93) | unchanged | 200 |
| A 404 | — | noindex | — | 404 |
hidden is not noindex. A hidden page leaves the sitemap but still renders, and tells search engines to index it. To keep a page out of Google, set its robots to noindex (or give it an Out rule). To take it off the site, delete it or switch the site to published pages only.
Blocking a page in robots.txt keeps it in Google. A crawler that may not fetch a page never sees its noindex, so a URL that's already indexed stays, shown as "Indexed, though blocked by robots.txt". seo.noIndex does both at once, so a site that was public and is then switched off can stay in results for a long time. To remove pages that are already indexed, use noindex (page robots or an Out rule) and leave them crawlable until they are gone. Use seo.disallow only for paths that were never meant to be crawled.
The site-wide switches don't empty the sitemap. With seo.noIndex on, the sitemap still lists every page, and each one says noindex. A sitemap submitted while it is on fills Search Console with "Submitted URL marked noindex". Don't submit until it's off.
Sitemap rules
Studio: Site Config › Sitemap (the button in the header, site-sitemap-drawer.tsx). The drawer lists every page of the site under its parent (data.parent), with a search box and "N of M in". Each row has Auto · In · Out, plus In, not under on pages that have pages under them. Save sitemap writes only data.sitemap (update-partial { "data.sitemap": [...] }, 111) and reads the site back.
The field is site.data.sitemap: [ { "page": "<page name>", "rule": "in" | "out" | "in-not-children" } ] (dbsdk models/site.ts 125–137). rule defaults to out. Pages are named by name, not slug.
How a page is decided (SiteService.inSitemapByRules, site.service.ts 1581–1594, and the same code in the drawer):
- No rules: every page is in.
- Walk up from the page through its parents. The first rule found decides:
- on the page itself:
inorin-not-children→ in;out→ out; - on a parent:
in→ in;outorin-not-children→ out.
- on the page itself:
- No rule on the page or any parent: out if any rule in the list is
inorin-not-children, else in.
Tested on phasite with a parent page and a child page (data.parent = the parent):
| Rules | Sitemap | Parent | Child | Every other page |
|---|---|---|---|---|
| none | all pages | in, index | in, index | in |
parent out | all but those two | out, noindex, nofollow | out, noindex, nofollow | in |
parent in-not-children (the only rule) | only the parent | in | out, noindex, nofollow | out, noindex, nofollow (tested on /warranty) |
parent in, child out | only the parent | in | out | out |
One In rule turns the sitemap into a list of only what's In. It also marks every other page of the site noindex, nofollow, so it's equally a de-indexing switch. In, not under counts as an In rule. To leave a few pages out, use Out rules only, and leave everything else on Auto.
The server applies the same rules to each page it serves. A page left out gets sitemapOut: true (site.service.ts 1119–1129), and base-app turns that into noindex, nofollow (meta.tsx 93). Hidden, noindex, payment and duplicate pages are not shown as Out in the drawer: it reads the rules only.
Published pages only
Site Config › Pages › Published pages only (site.data.publishedPagesOnly, false by default). Code only: this wasn't switched on for testing, because it would hide every draft on the shared test site.
- The site answers each address from the
publishedcopy of the page only (findPage,site.service.ts1170–1176). A page that was never published is a 404, even by its link. - The sitemap lists the published copies (1646), with the date they were published as
lastmod. - Publish a page from Build Studio's publish control, or
POST /repository/publish/page/<sk>(staff only). - The sitemap read doesn't limit itself to published pages the way the page lookup does (
sourceDatatype: page). Any other published record that carriesdata.site= the site would be listed.
Payment and unsubscribe pages
These pages are for people sent to them, not for search.
- Payment (feature
payment, default address/pay):- Base-app gives the payment page
noindex, nofollowwhenever Payment is switched on and the page's slug or name is the feature's page (site-feature-pages.tsisUnlistedPage125–130). - With a reference in the address (
?invoiceNumber=,?invoice=,?ref=,?t=,?token=,?order=), the tab title isPay <reference>(page.tsx202–208). ?ref=on any other page is an affiliate code and changes nothing.
- Base-app gives the payment page
- Unsubscribe: left out of the sitemap, but its page isn't marked
noindex(base-app checks Payment only).
They disagree in places (code, site.service.ts 1245–1247, 1640–1645):
| Feature list says | Sitemap | Page meta |
|---|---|---|
{ "feature": "payment", "page": "billing" } | /billing out | noindex |
{ "feature": "payment" } (no page) and a page named pay | /pay listed | noindex: a submitted URL marked noindex |
bare "payment" | listed (the server reads rows only) | noindex |
{ "feature": "unsubscribe" } | /unsubscribe out | index |
Fix it with an Out rule on that page in Site Config › Sitemap.
The site's own search index ("Index site")
This is the index behind the site's search box (site.data.searchBar: top, bottom or none), not Google's. Studio: Site Config › Address › Index site (and the Active Site card). Under it is POST /tools/index-site/<site>, staff only (tools.controller.ts 56–63). Code only: running it sends the requester an email.
- It starts a background job of kind
index-siteand returns the job record (tools.service.ts377–380). Follow it on Jobs. When the job ends, the person who asked gets an email and a platform notice (jobs.service.ts81, 319–334). - It reads the public site, from
https://<site.data.domain>orhttps://<site>-<org>.site.appmint.app, never the host you're on (392). A site whose public address doesn't answer indexes nothing. - It follows every
<a href>on the same host, 20 pages a batch (384–420). It ignoresrobots.txt,noindex,hiddenand the sitemap, so/login,/accountand query-string variants are indexed too. - Each page becomes a
site_indexrecord:{ url, title, summary: <meta description>, content, hash }(439–471).contentis the text of the element#site-content. - Search reads it through
GET /repository/search/?keyword=…(no datatype meanssite_index;repository.crud.service.ts808–816).
The index holds titles and descriptions, not page text. No hosted page has an element with id="site-content". Tested on phasite's home page: 0 matches. So content is always empty, and search only matches words in a page's URL, title and meta description. Because the hash covers content only, every page already in the index is reported "Unchanged" on later runs, and a changed title or description is never picked up. To refresh one, delete its site_index record and run Index site again.
Also: records have no site field, so an org with several sites searches them all together. Pages that are gone are never removed. The Studio button reports "Indexed 0 pages" whatever happens, because it reads a total the job record doesn't have (site-action-buttons.tsx 90–95). Tested: an unknown site name returns 404 "Site not found" and starts nothing. phasite's local index is empty.
Ask first
- Which site, and its public address? Search Console needs the custom domain. Check
site.data.domainis set: without it, canonicals and sitemap URLs use whatever host is asked. - Which pages should be found, and which shouldn't? Templates, thank-you pages, landing pages for ads, member-only pages.
- Hide the whole site, or only some pages? Is it already in Google? That decides between
noindexand robots blocking (see the warnings above). - Do they have Search Console / Bing access? You can't submit for them. They need the verification code from Google, and later the sitemap URL from you.
- Rebuild the site's search index? Say it emails them when done.
Steps
1. Site Config: read the site and what it serves now
repo_find_one on the site: note domain, homePage, publishedPagesOnly, features, sitemap, seo, robots. Then fetch what's live:
curl -s "https://<public host>/robots.txt"
curl -s "https://<public host>/sitemap-pages.xml" | grep -oE '<loc>[^<]+</loc>' | sed 's/<[^>]*>//g'Hands on: the site's id, its current rules, and the list of URLs the sitemap gives today.
Check: the sitemap's host is the public domain, and robots.txt isn't Disallow: / unless the person wants that.
2. Build Studio: which pages are which
repo_find on page with { "data.site": "<site>" }, then for each URL in the sitemap: is it a real page someone should land on? Mark for Out at least root, the account template (account-layout, or the page named in site.data.myAccount.layout), a product page used as a product template, a site-map page if it isn't for visitors, and pages left over from testing. Note which pages have pages under them (data.parent).
Hands on: the list of page names to leave out, and why. Check: none of them is a page the person wants found. Show the list.
3. Site Config › Sitemap: the rules
Build the whole new list from the one you read in step 1: [{ "page": "root", "rule": "out" }, { "page": "account-layout", "rule": "out" }, …]. Use Out rules. Use In only if the person really wants "only these pages", and say that it marks every other page noindex.
Write it with repo_update on site: { "datatype": "site", "id": "<sk>", "patch": { "sitemap": [ …the whole list… ] } }. The patch replaces the whole list. By API: POST /repository/update-partial/site/<sk> with { "data.sitemap": [ … ] }, which is what the drawer sends.
Stop: every page left out also tells search engines not to index it. Show the person the pages that will drop out, and wait for yes.
Hands on: the saved rules.
Check: Site Config › Sitemap shows the rules and the in-count you expect. /sitemap-pages.xml no longer lists those pages, and each one now has <meta name="robots" content="noindex, nofollow">.
4. Build Studio: noindex on single pages
For a page that must stay reachable but out of search: repo_update on page, patch: { "robots": "noindex, follow" }. It leaves the sitemap and says noindex on the page. Don't use hidden for this.
Stop: on a site that serves drafts, this is live as soon as it is saved. Name the pages and wait for yes.
Hands on: the pages changed.
Check: each page's <meta name="robots"> shows the value, and it's gone from the sitemap.
5. Site Config: robots.txt paths, or the whole site
Only when asked.
- Extra blocked paths:
seo.disallow, an array of path prefixes.repo_updatereplaces the wholeseoobject, so send it with what it already had:patch: { "seo": { …existing keys…, "disallow": ["/drafts/", "/internal/"] } }. Orupdate-partialwith{ "data.seo.disallow": [ … ] }. - Hide the whole site:
seo.noIndex: true(Classic form, or{ "data.seo.noIndex": true }). Undo withfalse.
Stop: seo.noIndex takes the whole site out of search engines, and an already-indexed site can take weeks to come back. Say so and wait for yes. Blocked paths stay in the sitemap; give them Out rules too (step 3).
Hands on: the saved seo object.
Check: /robots.txt shows the new lines, or Disallow: /. The site's other settings are unchanged.
6. Site Config › Address: rebuild the site's search index
Only when asked. call_appengine POST /tools/index-site/<site> (or the Index site button).
Stop: it crawls the public site and emails the person who asked when it's done. Say so and wait for yes.
Hands on: the job's id.
Check: on Jobs, the index-site job runs to Done, with pages read and how many are new. Try a word from a page title in the site's search box.
7. Hand over to Google Search Console and Bing
The person does this in their own Google and Microsoft accounts. Give them:
- Property: a URL-prefix property for
https://<domain>/with the HTML tag method. They paste only the tag'scontentvalue; you write it totracking.googleSiteVerification, as in Site identity, SEO tags and link sharing. A Domain property is verified with a DNS TXT record at their DNS provider instead, outside Appmint. - Sitemap to submit:
https://<domain>/sitemap.xml, on the public domain, not the platform host. - Bing:
tracking.bingSiteVerification(msvalidate.01), or import the site from Search Console.
Appmint never pings or submits to search engines. A new page shows up when Google next reads the sitemap. The person can speed one page up with URL Inspection › Request indexing.
Stop: before they submit, robots.txt must not be Disallow: /, seo.noIndex must be off, and the sitemap must list only real pages.
Hands on: the sitemap URL and the verification status.
Check: the verification tag is in the home page's <head>. After a day or two, Search Console › Sitemaps shows the sitemap as read, with the count of URLs you expect.
When it's done
Tell the person what the sitemap now lists (how many pages and which were left out), what robots.txt blocks, which pages say noindex and why, and the sitemap URL to submit. If the search index was rebuilt, say that site search matches titles and descriptions only. Open Site Config › Sitemap and /sitemap-pages.xml on the site.
What it can't do yet
- The sitemap lists only page records. No products, posts or events, and no feature addresses without a page record (
/store,/blog). Comments in base-app say otherwise. - Every template and wrapper page is listed by default (
root,account-layout, a product template). Add Out rules. seo.noIndex, the site'srobotsandseo.disallowdon't change the sitemap. Tested for the first two.hiddenpages still render and sayindex. Tested.- One In rule de-indexes every page without a rule. Tested.
- Payment and unsubscribe handling disagree between the sitemap and the page meta.
- robots.txt names
https://for its sitemap even on an http host, and on a local host the sitemap URLs lose the port. Tested; harmless on hosted sites. - Site search indexes no page text, never refreshes a changed title or description, mixes all of an org's sites, ignores noindex, and the Studio button always reports 0.
- No
hreflangalternates in the sitemap or the pages.
Don'ts
- Don't submit a sitemap while
seo.noIndexor anoindexsiterobotsis on. - Don't use robots.txt (
seo.disallow,seo.noIndex) to remove pages that are already in Google. Usenoindex. - Don't use
hiddento keep a page out of search. - Don't add an In rule to "make sure" a page is in. With no rules, every page is in already.
- Don't send part of
sitemaporseowithrepo_update: the field is replaced whole. - Don't run Index site without telling the person it emails them and crawls the public site.
- Don't name pages by slug in sitemap rules. Use the page's
name.