跳转到正文
HL

hreflang 标签生成器

根据多语言 URL 生成 link rel=alternate hreflang 标签。

5 tags
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="ja" href="https://example.com/ja/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

Builds `<link rel="alternate" hreflang="…">` tags from per-locale URLs, with optional x-default. Nothing is fetched or uploaded.

关于hreflang 标签生成器

hreflang (`link rel="alternate" hreflang`) tells search engines which language or regional URL matches the same content. You typically place absolute URLs for each locale—and often an x-default fallback—in the page `<head>`. toco.tools’s Hreflang Generator turns language-code + URL rows into paste-ready tags, with an optional x-default entry. Nothing is crawled or fetched remotely. Validation is lightweight (not full BCP 47 registry checks or reciprocal-link audits). In production, confirm pages cross-link each other and URLs are canonical. Your input never leaves the browser.

使用方法

  1. Enter a language code and URL per row (or load the sample)
  2. Optionally enable x-default and set the fallback URL
  3. Copy the link tags and paste them into each page’s <head>

常见问题

What is x-default?

A fallback URL for users whose language doesn’t match any alternate. Often the homepage or a language picker. Optional, but commonly recommended for multilingual sites.

Does this crawl my site for URLs?

No. It only builds tags from the rows you enter. Nothing is fetched or uploaded.

Can I use region or script codes like zh-Hans?

Yes. Codes with subtags such as en-US or zh-Hans are accepted. Checks are soft and do not fully validate against the IANA registry.