5 Claude Prompts for Hreflang Plans (Copy & Paste)

What you get from these five prompts is a hreflang plan you can hand to a developer: the codes you need, the tags for each page group, and the checks that catch the mistakes tags cause. Hreflang fails quietly, so the plan matters more than the tags themselves. Nothing on this page needs an account or an email address.

Where most attempts fall flat

  • Tags added page by page, with no map. Someone tags one URL, then another, and a month later nobody can say which pages belong to the same group or whether the set is complete.
  • Missing return tags. Page A points to page B but B never points back to A, so the signal is ignored rather than fixed.
  • Language codes used without region codes. A page written for one market gets tagged as if it serves every speaker of that language, and the two versions end up competing.

Prompts that fix it

1. Map the language and region codes

Build the hreflang code list for a site whose default language is [default language] and which targets these markets: [target regions]. For each market give the code, what it says, and when a language-only code is better than a language-region code.

What it does: Settles the code list once so every later tag uses the same values.

How to use: Replace [default language] and [target regions]; keep the list somewhere the whole team can see it.

2. Write the tags for one page group

Write the hreflang tags for one page group. The default version is [default URL] and the other versions follow this URL pattern: [URL pattern]. Produce the full set of tags, one per line, using the codes from this list: [code list].

What it does: Generates the complete tag set in one pass instead of one tag at a time.

How to use: Replace [default URL], [URL pattern] and [code list]; paste the output into the head section as-is.

3. Check the return tags line by line

Here are the hreflang tags currently on my pages: [current tags]. Check that every tag has a matching return tag and list any page that points out but is never pointed to. Do not rewrite the tags yet, just report the gaps.

What it does: Finds the one-way tags that make an otherwise correct set useless.

How to use: Replace [current tags]; run the report after any page is added to a group.

4. Audit existing tags for conflicts

Audit these hreflang tags: [current tags]. Flag conflicting codes for the same URL, tags that point to a URL that is not in the group, and any page missing a default fallback tag. For each issue, say what to change and why it matters.

What it does: Catches the contradictions that accumulate when several people edit the same template.

How to use: Replace [current tags]; fix conflicts before adding new markets to the site.

5. Plan for regions you add later

I currently target [target regions] and the site runs on [CMS]. Write a plan for adding a new market without redoing the existing hreflang set. Cover the code to add, the pages that need updating, the return tags, and the order to do it in.

What it does: Keeps a working tag set from breaking every time a market is added.

How to use: Replace [target regions] and [CMS]; follow the order so no page is left one-way at any point.

Weak ask vs better ask

Weak ask Better ask
Add hreflang to these pages. Write the full hreflang tag set for one page group using [URL pattern] and [code list], one tag per line.
Is my hreflang right? Check these tags for missing return tags and conflicting codes, and list every page that is pointed to but never points back.

Keep going

Want more like this? Browse the full free library at GuPrompt.

Leave a Comment