Skip to content
All articles

Bilingual Website SEO: Getting English and Spanish Pages Right with hreflang

For businesses serving English and Spanish speakers: the URL structure, hreflang tags, canonical rules, translation standards and language switcher that help both versions show up in search.

M By Max · 6 min read
Bilingual Website SEO: Getting English and Spanish Pages Right with hreflang

If your business serves both English and Spanish speakers, the setup that works best in search is simple to describe. Give each language its own URL, usually an /es/ folder on the same domain. Connect each page to its translation with hreflang tags that point both ways. Translate the content properly, including titles and meta descriptions. Let visitors switch languages with a visible link instead of redirecting them automatically. Google states each of these points in its own documentation. The usual mistakes are redirecting visitors by IP address, leaving titles in English and publishing raw machine translation.

Step 1: Choose a URL structure

Google recommends a separate URL for each language version of a page rather than switching languages with cookies or browser settings. The options:

Structure Example Pros Cons
Subfolder example.com/es/ Easy to set up, one site to maintain, shares the domain's history Single hosting location (rarely an issue for a local business)
Subdomain es.example.com Easy to separate technically Two "sites" to manage; "es" could be read as a language or a country
Country-code domain example.mx Clear country targeting Targets a country, not a language; more domains to buy, secure and renew
URL parameter or cookie example.com?lang=es None worth having Google doesn't recommend parameters, and content that switches by cookie may never be crawled

For a US company serving Spanish speakers in the same market, subfolders are usually the right answer. A Mexican or Spanish country domain would tell search engines you are targeting Mexico or Spain, which isn't what a Miami law firm or medical practice wants. Our own site uses this pattern: English at / and Spanish at /es/.

Step 2: One language per page

Google determines a page's language from its visible content. It doesn't use the HTML lang attribute or the URL for that. So:

  • Keep each page in one language, including navigation, buttons, forms, cookie banners and error messages.
  • Avoid side-by-side translations on the same page.
  • Still set <html lang="es"> on Spanish pages. Google doesn't rely on it for language detection, but screen readers and browsers do, and it is part of accessibility guidelines (WCAG "Language of Page").

Step 3: Add hreflang correctly

hreflang tells search engines that two pages are translations of each other, so each searcher gets the right version. For a pair of pages, the head of both the English and the Spanish page should contain:

<link rel="alternate" hreflang="en" href="https://www.example.com/services/managed-it" />
<link rel="alternate" hreflang="es" href="https://www.example.com/es/services/managed-it" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/services/managed-it" />

The rules that matter:

  1. List every version, including the page itself. Google says each language version must list itself as well as all the others.
  2. Return links are mandatory. If the English page points to the Spanish page, the Spanish page must point back. If two pages don't point to each other, Google ignores the tags.
  3. Use full URLs with https://, not relative paths like /es/....
  4. Use valid codes. Use an ISO 639-1 language code (en, es), optionally followed by an ISO 3166-1 alpha-2 region (es-US, es-MX). A region on its own isn't valid, and Google says codes such as es-419 aren't supported. If you only have one Spanish version, plain es is the safest choice.
  5. Add x-default for the fallback version shown when no listed language matches. On most US sites, that's the English page or a language selector page.
  6. Pick one method. HTML <link> tags, HTTP headers and XML sitemaps are equivalent for Google. Using more than one adds maintenance work without any search benefit.

Canonical tags must agree

Each language version should have a canonical tag pointing to itself, in the same language. A common mistake is pointing the Spanish page's canonical at the English page. That tells Google the Spanish page is a duplicate and can keep it out of results. Google's guidance is to specify a canonical page in the same language when you use hreflang.

Miami skyline at dusk, a market where many businesses need English and Spanish websites

Step 4: Translate, don't dump

Google treats localized pages as duplicates only when the main content stays untranslated. That doesn't make every translation good enough, though. Google's spam policies list mass-producing pages through automated transformations, including translation, as scaled content abuse when they offer little value to users. Raw machine output also reads badly to the customers you are trying to win.

What a real translation covers:

  • Titles and meta descriptions. These are what people see in search results. An English title on a Spanish page is an easy oversight that undermines the whole translation.
  • Headings, body text, image alt text and button labels.
  • Forms and confirmations, including validation errors, thank-you pages and the automatic email the visitor receives.
  • Structured data in the page's language, such as service names and FAQ answers.
  • Local wording. Write for your actual audience. In South Florida, that often means neutral Spanish that reads naturally to people from Cuba, Venezuela, Colombia, Puerto Rico and elsewhere, with technical terms like VPN or MFA left as they are.
  • Human review. AI-assisted drafts can be a reasonable start, but a fluent person should read every page before it goes live.

If a page isn't translated yet, don't publish a Spanish URL that shows English content. Leave it out of the Spanish navigation and the hreflang set until it's ready.

Step 5: Build a language switcher people can find

  • Put it in the header on every page, with each language labelled in its own language: "English" and "Español".
  • Link to the equivalent page, not the home page. Someone reading your Spanish cybersecurity page should land on the English cybersecurity page.
  • Use plain links, so both visitors and crawlers can follow them. Google recommends linking between language versions.
  • Prefer text to flags. Flags represent countries, not languages, and Spanish is spoken in many of them.
  • Remember the choice (a cookie is fine for this), but never hide the other version.

Step 6: Don't redirect automatically by IP or browser language

It is tempting to send Spanish-speaking visitors straight to /es/. Google advises against automatic redirects based on IP address or language settings, because they can stop both users and search engines from reaching every version. There's a technical reason as well. Googlebot usually crawls from US IP addresses and doesn't send an Accept-Language header, so content that changes by location or browser language may never be crawled in every language.

A better pattern is a small, dismissible banner. If the browser prefers Spanish and the visitor is on an English page, offer a link to the Spanish version and let them decide.

A launch checklist for bilingual sites

  1. Every English page has a Spanish URL under /es/, or is deliberately English-only.
  2. Each page carries hreflang for en, es and x-default, with return links.
  3. Canonical tags point to the same-language URL.
  4. Titles, meta descriptions, headings, alt text, forms and emails are translated and reviewed.
  5. The XML sitemap lists both language versions.
  6. The language switcher links page-to-page.
  7. No automatic redirects by IP or Accept-Language.
  8. In Google Search Console, the Performance report filtered by /es/ shows Spanish pages receiving impressions.

Speed matters in both languages. See our guide to website speed and Core Web Vitals, and our take on why bilingual IT support matters in South Florida. If you're planning a new site, our comparison of custom websites and WordPress covers how each handles multiple languages.

Core Florida IT builds and maintains bilingual custom websites for businesses in Miami-Dade, Broward and across South Florida. If your Spanish pages aren't showing up in search, request a free IT assessment and we'll review your setup.

Sources

Keep reading

Let's make your IT the strongest part of your business.

Book a free, no-obligation IT assessment. We'll show you exactly where you stand and what to fix first.

Call Free assessment