Place these in the <head> of every language version, and make sure each page links back to all the others (including itself).
Free hreflang tag generator
This free tool — built by a Singapore SEO agency — generates valid hreflang annotations so Google serves the right language or regional version of your page to the right searcher. It’s especially relevant in a multilingual market like Singapore, where the same content may exist in English, Chinese, Malay or Tamil. Everything runs in your browser.
What is hreflang and why does it matter?
hreflang is an annotation that tells Google which language and region each version of a page targets. Without it, Google may show the wrong version to a user — an English page to a Chinese-language searcher, or your Singapore page to a visitor in another market — hurting both relevance and rankings. It also prevents your own translated pages from being treated as duplicate content competing against each other.
Hreflang rules you must follow
- It must be reciprocal. If page A points to page B as an alternate, page B must point back to page A. Missing return tags are the most common hreflang error.
- Every version must reference itself as well as all the others.
- Use correct codes: ISO 639-1 for language (
en,zh,ms,ta) and, only if targeting a region, ISO 3166-1 for country (en-SG). Don’t use a country code as a language. - Add an
x-defaultfor users whose language doesn’t match any version. - Use absolute URLs and keep hreflang consistent with your canonical tags.
Where to put hreflang tags
You can implement hreflang in three places: in the <head> as <link> tags (what this tool generates), in your XML sitemap, or in HTTP headers for non-HTML files. Pick one method and apply it consistently — mixing methods or applying them inconsistently causes errors. For most WordPress and CMS sites, the head-tag or sitemap method is easiest.
Common hreflang mistakes that quietly break targeting
The errors that cause the most damage rarely throw an obvious warning — they simply mean Google ignores your annotations and serves the wrong language version anyway. The classic one is a missing return tag: if your English page points to a Chinese alternate, that Chinese page must point back, or the whole cluster is discarded. Others include using an underscore instead of a hyphen (en_SG is invalid; it must be en-SG), inventing region codes (there is no en-UK — the country code is en-GB), and pointing hreflang URLs at pages that redirect, 404 or carry a noindex. Each of these silently invalidates the set.
The subtler trap is inconsistency across the cluster. Every page in the group must list the same complete set of alternates, use absolute URLs (including https:// and the trailing slash your site actually serves), and match the canonical you have declared elsewhere. A self-referencing hreflang line is not optional — each page should include an entry pointing to itself. If your Singapore site mixes English, Simplified Chinese and Malay, audit all three versions together rather than page by page.
Fitting hreflang into a multi-region content workflow
Hreflang is a maintenance commitment, not a one-off tag. Every time you launch, retire or re-slug a localised page, the annotations across the entire language cluster need updating in lockstep — which is why teams running large multilingual sites generate them programmatically from a single source of truth (a sitemap or CMS field) rather than hand-coding them. If you manage only a handful of regional variants, generating the block here and pasting it into each template header is perfectly sound; beyond a few dozen URL groups, drive it from an XML sitemap instead so a single change propagates everywhere.
For Singapore businesses this matters commercially, not just technically: correct hreflang is what stops your en-SG page being outranked in local results by a generic en-US version, and it keeps the right currency, phone number and address in front of each audience. If your international structure is tangled or traffic is landing on the wrong regional page, our SEO team in Singapore can audit the full cluster and rebuild it from source.
Frequently asked questions
Do I need hreflang if my site is only in English?
No — hreflang is only needed when you have multiple language or regional versions of the same content. A single-language site doesn’t require it.
What’s the difference between zh and zh-SG?
zh targets Chinese speakers regardless of country; zh-SG targets Chinese speakers specifically in Singapore. Use the region suffix only when you genuinely have country-specific versions — otherwise the language code alone is safer.
Does hreflang replace canonical tags?
No — they work together. Each language version should have a self-referencing canonical, plus hreflang annotations pointing to all versions. Conflicting canonicals (e.g. all versions canonicalising to the English page) will break hreflang.
How do I check my hreflang is correct?
Use Google Search Console’s International Targeting report and third-party hreflang validators to catch missing return tags and invalid codes. Reciprocity errors are the most common and the most damaging.
Can I use hreflang across different domains?
Yes. Hreflang works across separate domains, subdomains and subfolders alike — for example, a .sg site pointing to a .com or a .co.uk. The only requirement is that every page in the group returns the annotations pointing back at the others, so the cluster is mutually confirmed regardless of where each URL lives.
What is the x-default value for?
The x-default entry tells search engines which page to serve when no listed language or region matches the user — typically a language-selector page or your primary international version. It is optional but recommended: without it, users who fall outside your targeted locales are matched by Google’s best guess rather than a page you have chosen.