To add hreflang to translated SaaS blog posts, list the public URL for each version of the same article, then place an identical set of alternate links in every version’s HTML head. Include a link to the page itself as well as its translations. After release, inspect each public page—not just the template you edited. Google’s HTML hreflang guidance specifies the identical-set, self-reference, and fully qualified URL requirements.
Map the article URLs before editing the template
Start with one article and the translations that answer the same reader task. Record the intended public address of each version, its language code, and whether that destination is already live. A draft or a different post is not an alternate for this set. If you are still deciding which posts deserve translation, use the separate language-version planning guide; this worksheet is for implementing the versions you have chosen.
Here is a fictional pair of published versions. Replace both addresses with your own exact public URLs, including the path, before generating annotations. Google recommends distinct URLs for different language versions rather than changing the language at one address based solely on browser settings or cookies.
| Version | Public article URL |
|---|---|
English (en) | https://example.com/blog/setup-guide |
Spanish (es) | https://example.com/es/blog/setup-guide |
Put the same alternate links in both HTML heads
For this fictional pair, add these two elements inside the well-formed <head> of the English page and add the exact same two elements inside the <head> of the Spanish page: <link rel="alternate" hreflang="en" href="https://example.com/blog/setup-guide" /> and <link rel="alternate" hreflang="es" href="https://example.com/es/blog/setup-guide" />. On the English page, the en entry is its self-reference; on the Spanish page, the es entry is its self-reference. The other entry on each page points to its counterpart. This follows Google’s HTML example format and its requirement that every version list itself and all other versions using fully qualified URLs.
Make the change in the site’s article-page output, not in the visible body of the post. Scope the annotations to this article pair: a site-wide head template that emits these setup-guide URLs on unrelated posts would describe the wrong alternatives. If your template generates the links from article records, give both records the same pair of language-to-URL entries and check what the template actually emits for each.
Prepare both pages’ annotations against the worksheet before release. If your site can release the Spanish destination and both pages’ links together, deploy them together. If releases are separate, make the destination publicly reachable first, then release the links that point to it. Ranks says articles live on the customer’s own blog and offers review and editing before publication; if a Ranks article is your source, use that review option when a person must approve the article. Your site owner still needs to implement and check the translation’s URLs and page annotations.
Check both public pages after release
Open each URL from the worksheet on the deployed site. Confirm that it loads the intended article in the intended language; a correct-looking annotation in a draft cannot establish that its destination works. Then inspect the HTML head on each public page using page source or your browser’s developer tools. If your site changes the head in the browser, compare the delivered source with the rendered head so you know which output you are checking. Google specifies that HTML alternate links belong inside a well-formed <head>.
- Compare destinations character for character with the worksheet. Each
hrefshould be the complete public article URL, not a relative path, draft address, or another post. - Check the English page for both
enpointing to itself andespointing to Spanish. Check the Spanish page for those same two entries:esnow points to itself, andenpoints back to English. - If one page is missing an entry, fix that page’s output and inspect both pages again. For example, an English page with both links but a Spanish page with only
enlacks the Spanish self-reference; the pair is not yet the identical set specified in Google’s guidance. - If a tag appears outside
<head>or the head markup is malformed, correct the template and check the deployed output again. Keep a copy of the URL worksheet for the next time either article’s address changes.



