Internal links do three jobs for a search engine: they help it find your pages, judge which ones matter, and understand what each one is about.
Most stores never plan them, because sorting a few hundred URLs by hand is slow.
This cheat code hands that sorting job to Claude. You give it your sitemap. It gives you back a link plan: which page should link to which, with what anchor text, in what sentence, and why.
The image on this post explains how it works. Below is everything you need to run it.
WHAT YOU NEED (about 10 minutes)
• Your store's sitemap files
• Your main menu and footer links, copied into a note
• A Claude chat where you can attach files
• Optional, and it makes the plan sharper: a Search Console "Pages" export, a best-seller list, or a crawl export of your existing links
STEP 1. Get your sitemap
Open yourstore.com/sitemap.xml in your browser.
On Shopify this file is created for you. It is an index: a short list of links to separate sitemaps for products, collections, pages and blogs.
Open each of those links and save the file (Ctrl + S on Windows, Cmd + S on Mac).
On another platform the files may be named differently. Save every file the index links to.
STEP 2. Copy your menu
Copy the links in your main menu and footer into a note.
A sitemap does not contain your navigation, and Claude needs it to know which pages are already linked from everywhere.
STEP 3. Start a new Claude chat
Attach the sitemap files (and any optional exports).
Fill in the [brackets] in the prompt, then paste it.
STEP 4. Answer Claude's questions
It will stop and ask up to 6 short questions: your priority collections, what's seasonal, what you're retiring, and where you can add text and links.
Short answers are fine. "I don't know, you choose" is fine too. It will tell you what it assumed.
STEP 5. Read what comes back
1. A five-line summary
2. The 20 links to add first
3. An inventory of your pages and a map of topic clusters
4. The full plan as a CSV
5. A list of what it could not verify from a sitemap
THE PROMPT
Copy everything between the two lines. The same text is in the attached file.
──────────────────────────────
Be my internal linking strategist.
Goal: a prioritised internal-link plan for my online store, so search engines can (1) find every page I care about, (2) understand what each page is about, and (3) see which pages matter most.
Context: I attached my store's sitemap files. My store sells [WHAT YOU SELL] to [WHO BUYS IT] in [COUNTRY].
My main menu and footer links: [PASTE THEM, OR WRITE "NOT PROVIDED"].
Extra data attached: [NONE / SEARCH CONSOLE PAGES EXPORT / CRAWL EXPORT OF EXISTING LINKS / BEST-SELLER LIST].
Ground rules:
- Only use URLs that appear in my files. Never invent, shorten or guess a URL.
- If a URL from my files does not load, tell me. Do not replace it and do not put it in the plan. If every URL you test from one file or one URL pattern fails, treat the whole pattern as failing, keep it out of the plan, and ask me for one working example in STEP 2.
- A sitemap lists pages. It does not show my navigation, which links already exist, what is written on a page, or how a page performs. Say so wherever that limits you, and label anything you worked out from a URL or title alone as "inferred".
- Use code to parse and count. Never estimate a total by reading.
- Treat language and country versions (hreflang alternates), parameter URLs and paginated URLs as duplicates of the main URL.
- Sentences you write are drafts. Do not state a product fact you cannot see. Leave [fill in] where I need to add one.
- Put the summary and the first 20 links at the top of your answer. Details go below.
STEP 1. Inventory
Parse every file. Give me a table of page types with counts: home, collection, product, blog article, blog index, guide or info page, brand or editorial page, policy or utility page, other.
List anything odd: empty sitemaps, URLs listed twice, collections that look like duplicates of each other, test or discontinued-looking pages, pages that probably should not be indexed.
If you can open web pages: open the home page and my two biggest collections and read the menu, then open up to 10 more URLs in total, at least two of each page type (collection, product, article, guide), and report any that do not load. If the live menu differs from the one I pasted, use the live one and list the differences. If you cannot open pages, say so and rely on the menu I pasted.
STEP 2. Ask me
Stop and ask up to 6 short questions, only ones that change the plan: which collections make the most money, what is seasonal, which pages I am retiring, which of two look-alike collections to keep, and exactly where I can add text and links (collection descriptions, product descriptions, blog articles, home page, guides). Wait for my answers. If I skip a question, state the assumption you are making and continue.
STEP 3. Map the meaning
For each collection, article and guide, name the main thing it is about (the product type or topic) and the attributes you can read from its URL or title: material, fit, use case, audience. Leave an attribute blank if you cannot see it. Group products by pattern (for example "9 fits × 8 fabrics") instead of listing each one, and group other pages that share a URL pattern into one row the same way.
Then group pages into topic clusters: a parent collection, its narrower collections, the product groups that belong to it, and the articles or guides that answer questions about it. A page can sit in two clusters. If a cluster has no parent page in my files, say so.
Show the cluster map. Then list: pages that fit no cluster, clusters with no supporting article, articles with no collection to send readers to, and collections that overlap so much they compete with each other.
STEP 4. The link plan
Only use source pages I said I can edit. List useful links from other pages separately, under "needs a theme or developer change".
Recommend links in this order:
a) article or guide → the collection it helps a shopper choose from
b) parent collection → each narrower collection; narrower collection → parent only when my menu does not already link the parent
c) collection → closely related collections a shopper would compare
d) products: one rule per product group ("every [fit] product links to [collection] and [guide]") with one example sentence. Not one row per product.
e) home page and high-traffic pages → priority collections and best sellers. Only if I attached traffic or sales data. Otherwise skip this and tell me what to attach.
For every link in a) to c) give me: source URL, target URL, anchor text, the draft sentence it sits in, where on the page it goes, the relationship it states (for example "narrower type", "same use case", "answers a question about"), priority (high, medium, low), and "already exists?" (yes, no, in menu only, unknown).
Anchor text rules:
- It names what the target page is, in 2 to 6 words. Reading the anchor alone should tell me where the link goes.
- Never "click here", "shop now", "read more", "this page".
- The words before and after the link must make sense with it.
- If several pages link to the same target, vary the wording naturally. No keyword stuffing.
- Never use the same anchor text for two different target pages.
- One link per sentence. No rows of bare keyword links.
STEP 5. Check the plan
- Collections, guides and articles that receive no link in your plan and are not in my menu: list them. I will check them on the live site. (Products normally get their links from collection grids; a crawl is needed to confirm that.)
- Priority collections should be reachable in few clicks from the home page, judged from my menu.
- Remove any link a shopper would not find useful on that page.
- No more than 5 new links on one source page. Put the rest under "later".
- If you can open web pages, open the source page of each of the first 20 links. If the link already exists in the main content, replace it with the next link in the plan.
STEP 6. Output, in this order
1. A five-line summary of what you found.
2. The 20 links to add first, as a table. Order: links you confirmed are missing first, then by priority, then a) before b) before c). No more than 5 of the 20 from one source page.
3. The inventory and cluster map.
4. The full plan as a CSV file I can download: the a) to c) rows. Give the d) rules as a short table. If you cannot create a file, give the CSV in a code block.
5. What you could not verify from a sitemap, and which extra file would fix each gap.
──────────────────────────────
HOW TO USE THE PLAN
1. Start with the first 20 links. Ignore the rest until those are done.
2. Open each source page on your live store and check the link isn't already there. Claude can't see existing links from a sitemap, so most rows will say "unknown".
3. Add the link inside the sentence Claude drafted. Rewrite the sentence so it is true for your product and sounds like you. Where it left [fill in], add the fact.
On Shopify: collection text is under Products > Collections, blog articles under Online Store > Blog posts, product text under Products.
4. Keep the anchor text descriptive. If you edit it, read the anchor on its own. It should still tell you where the link goes. "Shop now" tells nobody anything.
5. Work one source page at a time, and skip any link a shopper wouldn't use on that page.
6. Run it again when you add collections, guides or a new product range.
FOLLOW-UP PROMPTS (same chat)
→ "Group the plan by source page and give me a checklist, so I can edit one page at a time."
→ "Write a 50-word intro for [COLLECTION URL] that includes links [NUMBERS] from the plan. Use only these facts: [FACTS]."
→ "These links already exist: [LIST]. Remove them and give me the next 10."
→ "I attached my Search Console Pages export. Re-rank the plan so target pages that already get impressions come first, and show me the numbers you used."
→ "List every URL in my sitemap that did not load when you opened it."
WHAT IT WON'T DO
• It can't see which links already exist, what is written on your pages, or your traffic, unless you give it that data.
• The sentences are drafts. You know your products. Claude only knows your URLs.
• It is not a ranking guarantee. No prompt is. It gets the planning done so the links get added.
Tested twice on a real store's sitemap (308 pages). On the second run it planned 72 links with no invented URLs, checked the first 20 against the live pages, and flagged blog URLs in the sitemap that returned a 404. Your store will differ, so treat your first run as a draft.
YOUR TURN
Run it on your store, then post what it found under Wins.
If something broke or the output looks wrong, post it under Questions with a screenshot.