# Manage sitemaps and indexing with Codex

> Use Codex with StoreSEO to list noindex and sitemap-excluded resources, change flags one at a time and set up an HTML sitemap from the command line.

Managing sitemaps and indexing with Codex means asking OpenAI's coding agent, from a terminal or the IDE extension, 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 set up an HTML sitemap.

## How do you set up Codex for this?

### 1. Add StoreSEO to Codex

Run this in any terminal. It writes a [mcp_servers.storeseo] table to ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app all read.

```bash
codex mcp add storeseo --url https://mcp.storeseo.com/mcp
```

### 2. Sign in to your store

Run the login command. Your browser opens: pick your Shopify store and approve access. Then run codex mcp list, or type /mcp inside Codex, to confirm storeseo is there.

```bash
codex mcp login storeseo
codex mcp list
```

### 3. Or write it in config.toml (optional)

If you would rather edit the file, add this table to ~/.codex/config.toml, or to .codex/config.toml in a trusted project. In the desktop app or the IDE extension you can add the same URL under MCP servers, Add server, Streamable HTTP.

```toml
[mcp_servers.storeseo]
url = "https://mcp.storeseo.com/mcp"
```

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

Generate a token in StoreSEO under Settings, AI Toolkit, export it as STORESEO_TOKEN in your shell, and point config.toml at that variable. Codex sends it as an Authorization Bearer header, so the token never sits in the file.

```toml
[mcp_servers.storeseo]
url = "https://mcp.storeseo.com/mcp"
bearer_token_env_var = "STORESEO_TOKEN"
```

Then ask: "Use StoreSEO to list all pages with noindex or excluded from the sitemap, then compare with the menus in this theme and flag any linked page that is noindex."

## How does this work in Codex?

You start Codex in the repository that holds your theme, or in any folder, and ask for the flags: which products and pages are noindex, and are any of them linked from my navigation. Codex calls storeseo_start for the conversation id and then storeseo_list_resource_sitemaps, once per resource type you ask about, and prints each tool call in the session. Because it also reads the repository, it can compare the flags with the menu files in the theme. The same setup works in the IDE extension and the ChatGPT desktop app, since they read the same config.toml.

A flag change is a named request. You say set Old Returns Policy to noindex and exclude it from the sitemap, Codex states the resource and the two flags and waits for your yes, and then calls storeseo_update_resource_sitemap. Where the server's approval mode is set to writes, Codex also prompts on that call because the tool is not marked read-only, which gives you a second stop. After the write it re-lists the resource, because flags can be edited in the StoreSEO app at the same time and you want the current value, not the call's own response.

The HTML sitemap goes in order: storeseo_get_html_sitemap_settings, then storeseo_update_html_sitemap with setup_step 1 to generate and enable the page, then storeseo_list_sitemap_menus for the menu edit links and the sitemap URL. Adding the link to a menu is a manual step in Shopify admin, and a last update marks setup complete once you confirm. If you customize the settings, ask Codex to show the full object first, since the update replaces the stored settings instead of merging them.

### Example session (illustrative)

**You:** Which pages are noindex, and is any of them linked from my menu?
→ `storeseo_start` (read-only)
→ `storeseo_list_resource_sitemaps` (read-only)
**Agent:** Two pages are noindex: Staff Notes and Returns Draft. Neither appears in the menus I can see in this theme. Returns Draft is still in the sitemap, so should I exclude it from the sitemap as well?
**You:** Yes, exclude Returns Draft from the sitemap.
→ `storeseo_update_resource_sitemap` (needs approval)
→ `storeseo_list_resource_sitemaps` (read-only)
**Agent:** Returns Draft is now excluded from the sitemap and still noindex. Staff Notes was already excluded.

## 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 Codex 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 Codex:** Set the storeseo server's default_tools_approval_mode in config.toml to writes or prompt. Writes lets the list and get tools run and stops on storeseo_update_resource_sitemap and storeseo_update_html_sitemap, which is the pairing this job wants. Approve skips the prompt, and then the yes StoreSEO tells Codex to wait for is the only check on a noindex change. A project-level .codex/config.toml only loads in a trusted project, so use ~/.codex/config.toml if the server seems to be missing.

## What can you ask Codex to do?

- Use StoreSEO to list all pages with noindex or excluded from the sitemap, then compare with the menus in this theme and flag any linked page that is noindex.
- Set the product Sample Pack to noindex and exclude it from the sitemap. Wait for my yes, then list its flags again.
- Set up the HTML sitemap with StoreSEO. Read the current settings first, generate it, and list the menus I can add it to.
- 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

### Which Codex approval mode suits StoreSEO sitemap changes?

The writes mode fits well. It lets the read tools run and prompts for any tool not marked read-only, so storeseo_update_resource_sitemap and storeseo_update_html_sitemap stop for you, while listing flags does not.

### Does the Codex setup carry over to the IDE extension?

Yes. The CLI, the IDE extension and the ChatGPT desktop app read the same config.toml, so the StoreSEO server and its approval settings apply in all of them.

### 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 Gemini CLI](https://storeseo.com/agent/gemini-cli/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 Codex guides

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