# Manage sitemaps and indexing with Gemini CLI

> Use Gemini CLI with StoreSEO to see which Shopify pages are noindex or out of the sitemap, change flags one at a time and set up an HTML sitemap.

Managing sitemaps and indexing with Gemini CLI means asking Google's command-line agent to read the sitemap, noindex and nofollow flags StoreSEO holds for your Shopify resources, change them one resource at a time after your yes, and run the HTML sitemap setup from the terminal.

## How do you set up Gemini CLI for this?

### 1. Add StoreSEO to Gemini CLI

Run this in any terminal. The user scope writes the server to ~/.gemini/settings.json so every project sees it. Without --scope user the command writes to the current project's .gemini/settings.json.

```bash
gemini mcp add --scope user --transport http storeseo https://mcp.storeseo.com/mcp
```

### 2. Sign in to your store

Start gemini. The first time it calls StoreSEO it opens your browser: pick your Shopify store and approve access. If the window does not open, type /mcp auth storeseo inside Gemini CLI. Then gemini mcp list should show storeseo as connected.

```text
/mcp auth storeseo
```

### 3. Or edit settings.json (optional)

Add this to ~/.gemini/settings.json for every project, or to .gemini/settings.json in one project. It is the entry gemini mcp add writes: url plus type set to http. The docs page still shows the older httpUrl key for streamable HTTP.

```json
{
  "mcpServers": {
    "storeseo": {
      "url": "https://mcp.storeseo.com/mcp",
      "type": "http"
    }
  }
}
```

### 4. Or connect with an access token (optional)

On a headless machine the browser sign-in cannot run. Generate a token in StoreSEO under Settings, AI Toolkit and pass it as a header. Keep the token out of version control.

```bash
gemini mcp add --scope user --transport http \
  --header "Authorization: Bearer YOUR_TOKEN" \
  storeseo https://mcp.storeseo.com/mcp
```

Then ask: "Use StoreSEO to list my products that are noindex or excluded from the sitemap and tell me which look like mistakes."

## How does this work in Gemini CLI?

You run Gemini CLI in a terminal, usually in the theme folder, and ask which collections and pages are set to noindex. The model sees StoreSEO's tools under names like mcp_storeseo_storeseo_list_resource_sitemaps, and it calls storeseo_start first and then the listing tool with the resource type and the noindex filter. Gemini CLI shows each call and, unless you trust the server, asks you to confirm it before it runs, so even a read can wait on a prompt in your first session. What comes back is a list of resources with their sitemap, noindex and nofollow flags in the terminal.

For a change, you name the resource and the flag. Gemini CLI states what it will set and waits for your yes, which StoreSEO tells the agent to do before any write, and then calls storeseo_update_resource_sitemap. Gemini CLI's own confirmation prompt appears on that tool call too, so a noindex change passes two checks. The agent then lists the flags again before it reports the result, since someone may have changed them in the StoreSEO app in the meantime.

The HTML sitemap follows the same order as in every client: read storeseo_get_html_sitemap_settings, generate and enable the page with storeseo_update_html_sitemap, then call storeseo_list_sitemap_menus for the menu edit links. You add the link to a menu in Shopify admin, and the agent marks setup complete after you say it is done. If a settings object is involved, ask Gemini CLI to print the full object it plans to send, because an update replaces the stored settings. If the model has too many StoreSEO tools to choose from, includeTools in settings.json can narrow the list to these five.

### Example session (illustrative)

**You:** Which blog posts are noindex or nofollow?
→ `storeseo_start` (read-only)
→ `storeseo_list_resource_sitemaps` (read-only)
**Agent:** Two posts carry flags: Draft Announcement is noindex and nofollow, and Holiday Guide is noindex, which looks unintended for a published guide. Should I turn noindex off for Holiday Guide?
**You:** Yes, Holiday Guide only.
→ `storeseo_update_resource_sitemap` (needs approval)
→ `storeseo_list_resource_sitemaps` (read-only)
**Agent:** Holiday Guide is no longer noindex. Draft Announcement is unchanged.

## What StoreSEO does: sitemaps and indexing

StoreSEO controls two things here: per-resource sitemap flags (left out of the XML sitemap, noindex, nofollow) and an HTML sitemap page. The agent lists flags, changes them one resource at a time and walks you through the HTML sitemap setup.

Tools: `storeseo_list_resource_sitemaps`, `storeseo_update_resource_sitemap`, `storeseo_get_html_sitemap_settings`, `storeseo_update_html_sitemap`, `storeseo_list_sitemap_menus`

1. **List the flags.** The agent lists products, collections, pages or articles with their sitemap, noindex and nofollow flags, filtered as you ask.
2. **Change one resource.** After your yes it sets the flags on one resource, which writes the matching Shopify metafields.
3. **Re-read before reporting.** Flags can also change in the StoreSEO app, so the agent re-lists before telling you the current state.
4. **Create the HTML sitemap.** It reads the HTML sitemap settings, then generates and enables the page.
5. **Add it to a menu.** It lists your navigation menus with their edit links; you add the sitemap link to a menu in Shopify admin, then the agent marks setup complete.

## Sitemaps and indexing reference

| Setting or limit | What applies |
|---|---|
| Flags per resource | Excluded from sitemap, noindex, nofollow |
| Resource types | Products, collections, pages and articles |
| Where flags live | Shopify metafields on the resource |
| HTML sitemap steps | Generate and enable, add the link to a menu yourself, mark complete |
| HTML sitemap settings | Replaced wholesale on update; read first |
| Menus | Listed with edit links; the menu you choose is not stored |
| Plan | Every active plan |

## Rules Gemini CLI follows

- A noindex flag removes a page from search results, so the agent names the resource and waits for your yes.
- The agent re-lists flags in the same turn before telling you their current state.
- Adding the sitemap link to a menu is a step you do in Shopify admin; no tool does it.
- HTML sitemap settings are read before every update, because an update replaces them.

**In Gemini CLI:** Do not set trust: true or pass --trust on the storeseo server in Gemini CLI. Trust skips every tool confirmation, and for this job that means a noindex change is held only by the yes StoreSEO tells the agent to wait for. Also add the server with --scope user if you want it outside one project, and remember the browser sign-in needs a browser on the same machine; over SSH or headless, use the access token header instead.

## What can you ask Gemini CLI to do?

- Use StoreSEO to list my products that are noindex or excluded from the sitemap and tell me which look like mistakes.
- Set the article Draft Announcement to nofollow and noindex. Ask me first, then show the flags afterwards.
- Set up an HTML sitemap with StoreSEO and show me the menus and edit links so I can add it to the footer menu.
- Which of my products are set to noindex or excluded from the sitemap?
- Exclude the product Gift Card Test from the sitemap and set it to noindex.
- Set up an HTML sitemap for my store and tell me which menu to add it to.
- Are any of my blog posts set to nofollow?
- Remove noindex from the page About Us.

## Frequently asked questions

### How do I stop Gemini CLI from changing sitemap flags without a prompt?

Leave trust off for the storeseo server, which is the default. Then Gemini CLI asks you to confirm each MCP tool call, including storeseo_update_resource_sitemap, on top of the yes StoreSEO tells the agent to wait for.

### Can I show Gemini CLI only the sitemap tools?

Yes. The includeTools list on the server entry in settings.json limits which StoreSEO tools the model sees, so you can keep the five sitemap tools and storeseo_start and hide the rest.

### What is the difference between excluding a page from the sitemap and noindex?

Excluding a resource leaves it out of your XML sitemap, so crawlers are not pointed at it. Noindex tells search engines not to show the page in results even if they find it. StoreSEO sets each flag separately per resource.

### Can the agent add the HTML sitemap to my menu?

No. The agent generates the HTML sitemap and lists your menus with their edit links, and you add the sitemap link to a menu in Shopify admin. Then the agent can mark setup complete.

### Do sitemap tools need a paid plan?

No. The sitemap tools work on every active StoreSEO plan.

### Why does the agent check the flags again before answering?

Sitemap flags can also be changed in the StoreSEO app outside the conversation, so an earlier listing may be stale. Re-reading in the same turn keeps the answer accurate.

## Sitemaps and indexing with other agents

- [Manage sitemaps and indexing with Claude](https://storeseo.com/agent/claude/sitemaps)
- [Manage sitemaps and indexing with ChatGPT](https://storeseo.com/agent/chatgpt/sitemaps)
- [Manage sitemaps and indexing with Claude Code](https://storeseo.com/agent/claude-code/sitemaps)
- [Manage sitemaps and indexing with Claude Cowork](https://storeseo.com/agent/claude-cowork/sitemaps)
- [Manage sitemaps and indexing with Cursor](https://storeseo.com/agent/cursor/sitemaps)
- [Manage sitemaps and indexing with Codex](https://storeseo.com/agent/codex/sitemaps)
- [Manage sitemaps and indexing with GitHub Copilot](https://storeseo.com/agent/github-copilot/sitemaps)
- [Manage sitemaps and indexing with Windsurf](https://storeseo.com/agent/windsurf/sitemaps)
- [Manage sitemaps and indexing with Grok](https://storeseo.com/agent/grok/sitemaps)
- [Manage sitemaps and indexing with ChatGPT dots](https://storeseo.com/agent/chatgpt-dots/sitemaps)
- [Manage sitemaps and indexing with Grok Bot](https://storeseo.com/agent/grok-bot/sitemaps)
- [Manage sitemaps and indexing with Muse](https://storeseo.com/agent/muse/sitemaps)
- [Manage sitemaps and indexing with Manus](https://storeseo.com/agent/manus/sitemaps)
- [Manage sitemaps and indexing with OpenClaw](https://storeseo.com/agent/openclaw/sitemaps)
- [Manage sitemaps and indexing with Hermes Agent](https://storeseo.com/agent/hermes-agent/sitemaps)
- [Manage sitemaps and indexing with Paperclip](https://storeseo.com/agent/paperclip/sitemaps)
- [Manage sitemaps and indexing with NanoClaw](https://storeseo.com/agent/nanoclaw/sitemaps)
- [Manage sitemaps and indexing with OpenCode](https://storeseo.com/agent/opencode/sitemaps)
- [Manage sitemaps and indexing with Zed](https://storeseo.com/agent/zed/sitemaps)
- [Manage sitemaps and indexing with Kiro](https://storeseo.com/agent/kiro/sitemaps)
- [Manage sitemaps and indexing with Antigravity](https://storeseo.com/agent/antigravity/sitemaps)
- [Manage sitemaps and indexing with Kimi Code](https://storeseo.com/agent/kimi/sitemaps)

## More Gemini CLI guides

- [Gemini CLI and StoreSEO overview](https://storeseo.com/agent/gemini-cli)
- [Audit your store's SEO with Gemini CLI](https://storeseo.com/agent/gemini-cli/seo-audit)
- [Optimize meta tags and content with Gemini CLI](https://storeseo.com/agent/gemini-cli/optimize-meta)
- [Optimize images and alt text with Gemini CLI](https://storeseo.com/agent/gemini-cli/image-seo)
- [Get products ready for AI search with Gemini CLI](https://storeseo.com/agent/gemini-cli/ai-search-readiness)
- [Publish llms.txt and agents.md with Gemini CLI](https://storeseo.com/agent/gemini-cli/llms-txt-agents-md)
- [Set up structured data with Gemini CLI](https://storeseo.com/agent/gemini-cli/structured-data)
- [Track keyword rankings with Gemini CLI](https://storeseo.com/agent/gemini-cli/keyword-tracking)
- [Read Search Console and Analytics with Gemini CLI](https://storeseo.com/agent/gemini-cli/google-reports)
- [Write SEO blog post drafts with Gemini CLI](https://storeseo.com/agent/gemini-cli/blog-posts)

## Related documentation

- [How to generate an HTML sitemap](https://storeseo.com/docs/how-to-generate-html-sitemap)
- [Choose products to include in the sitemap](https://storeseo.com/docs/how-to-choose-products-to-include-in-sitemap)
- [Store not appearing in Google search results](https://storeseo.com/docs/store-not-appearing-in-google-search-results)

---

Canonical: https://storeseo.com/agent/gemini-cli/sitemaps
Last updated: October 2026.

Approval: Reads run straight away; StoreSEO tells the agent to preview and wait for your yes before it writes, spends credit or publishes, and your client's tool-approval setting is the hard stop.

Every agent guide: https://storeseo.com/agent · Connect the MCP server: https://storeseo.com/docs/connect-storeseo-mcp-to-your-ai-assistant · Pricing: https://storeseo.com/pricing · Install StoreSEO: https://apps.shopify.com/storeseo
