Hreflang Tag Generator
Spin up clean, standards-compliant hreflang annotations for every language and country version of a page. Add a row per locale, set an x-default fallback, and copy a ready-to-paste block of link tags — with live warnings for duplicate codes and relative URLs, so your bilingual and international pages are mapped correctly the first time.
What hreflang tags do — and why Ottawa businesses need them
A hreflang annotation is a small <link rel="alternate"> element that tells Google and other search engines which language or regional version of a page to serve to which visitor. When you run more than one version of the same content — say an English page and a French page, or a Canadian page and a US page — these tags stop the versions from competing with each other and make sure the right one shows up in the right person's results.
That matters a lot in the National Capital Region. Ottawa is officially bilingual, and a huge share of local audiences — from federal government departments and Crown corporations to consumer brands serving both Ontario and Gatineau — publish in both English and French. If you maintain an English page at one URL and its French equivalent at another, hreflang is what links them as a pair: en-CA for your English-Canadian version and fr-CA for the French-Canadian version. Skip it, and Google may show a francophone searcher your English page (or vice versa), quietly costing you engagement and rankings. This generator builds those en-CA / fr-CA pairs — and any other locale you serve — in seconds.
How to use the generator
- Add a row for each version. Pick a language (e.g. English or French) and, where it matters, a region (e.g. Canada). Two rows are pre-filled to get you started.
- Paste the full URL. Drop in the absolute address of each localized page, including
https://. Relative paths are flagged for you. - Set your x-default. Leave the toggle on and add a fallback URL — typically a language-picker page or your main landing page — for visitors who don't match any listed locale.
- Copy the output. The link tags update live in the panel on the right. Hit Copy and paste the whole block into the
<head>of every version, or hand it to your developer.
Hreflang best practices
- Make the tags reciprocal (return tags). Every version must reference all the others, itself included. If your English page points to the French one, the French page has to point back — otherwise search engines ignore the whole set.
- Always use absolute URLs. hreflang requires complete addresses beginning with
http://orhttps://. The tool warns you the moment a URL isn't absolute. - Add an x-default. Give visitors who don't fit any of your locales a sensible fallback so no one lands in the wrong language by default.
- Keep codes consistent and unique. Use valid ISO language and region subtags, and never list the same code twice — duplicates are flagged here automatically.
Frequently asked questions
Do I need separate hreflang tags for English and French in Ottawa?
If you publish genuinely separate English and French pages, yes. Pair them with en-CA and fr-CA so Google serves each language to the right audience across Ottawa, Gatineau and the rest of Canada. A single mixed-language page does not need hreflang.
What's the difference between a language code and a region code?
The language subtag (like fr) is required and describes the content's language. The optional region subtag (like CA) narrows it to a country. Use a region only when you actually serve a country-specific version — fr-CA for Canadian French versus fr-FR for France, for example.
Where do these tags go on my site?
The most common method is placing the link tags in the <head> section of every page version. You can alternatively serve them via HTTP headers or an XML sitemap, but the head method this tool produces is the simplest to implement and audit.
Does anything I type get sent to a server?
No. The generator runs entirely in your browser with plain JavaScript — there's no backend, no API call and no tracking. The URLs you enter never leave your device.
Going bilingual or international?
From clean hreflang implementation to full English/French site architecture for the Ottawa market, our team makes sure every version of your site ranks where it should.
Get a Free Consultation