Hreflang tag generator

If your page exists in several languages, hreflang tells search engines which one to show to whom. List each version and get the tags every one of them must carry.

How it works

  1. Write one line per version: the language code, a space, the URL.
  2. Add the page for everyone else as x-default.
  3. Press Generate and paste the same block on every listed page.

Which codes do I use?

A two-letter language (en, pt, de), optionally followed by a country (en-GB, pt-BR). The country alone is not valid.

What is x-default?

The page for visitors whose language you do not cover, usually the English version or a language picker.

Why must every page list all the others?

Hreflang only counts when it is mutual. If the German page does not link back to the English one, both tags are ignored.

Use it from ChatGPT, Claude or your own agent

This tool is also a function an AI agent can call for you. It needs the same free account as this page, nothing else.

Fields

  • pages (text, required): Language versions
  • x_default_url (text, optional): x-default URL

A call that works

POST https://orkosi.com/api/v1/public/tools/hreflang-generator/run
Authorization: Bearer <api_key>

{
  "input": {
    "pages": "en-GB https://example.com/uk/pricing\nen-US https://example.com/us/pricing\npt-PT https://example.com/pt/precos",
    "x_default_url": "https://example.com/pricing"
  }
}

Need an account? One request creates it and answers the key: POST https://orkosi.com/api/v1/public/signup. In Claude or ChatGPT, add the Orkosi connector and sign in: https://orkosi.com/api/v1/public/mcp.

This tool as Markdown · Connect an AI assistant