November 22, 2026 · 8 min read · Thomas Osayi
How to build a bilingual website in English and Spanish that ranks in both
A practical guide to a bilingual website in English and Spanish: URL structure, hreflang, language switchers, translation quality, and what it costs to do properly.
In Los Angeles, a lot of businesses serve customers who would rather read about a service in Spanish, and plenty of owners already run their front desk in both languages. The website is often the one place where everything is still English only, or where a translate button sits in the corner producing pages that Google never sees.
A proper bilingual website is not hard, but it has a few rules that are easy to get wrong. Here is how I set one up: the URL structure, the hreflang tags, the switcher, the translation process and the pieces people forget, with realistic costs at the end.
Do I need a real bilingual website, or is a translate widget enough?
If you want Spanish speakers to find you in search and trust what they read, you need real Spanish pages with their own URLs, not a widget.
A translate widget changes the text in the visitor's browser after the page loads. The Spanish version usually has no URL of its own, so there is nothing for Google to crawl, index or show to someone searching in Spanish. Google's documentation on multilingual sites recommends using different URLs for each language version rather than relying on cookies or browser settings to change the language, and it notes that if you adjust content that way anyway, Google might not find and crawl all your variations.
Quality is the other problem. Automatic translation of a service page can turn "free estimate" or "same-day appointment" into something stiff or wrong, and visitors notice. A widget is better than nothing for a long tail of pages nobody will translate. For your homepage, service pages, contact page and booking flow, real translations are worth the effort.
What URL structure should a bilingual site use?
For most small businesses, keep English at the root and put Spanish in a subdirectory, so example.com/services has a Spanish twin at example.com/es/servicios.
Google's guide to multi-regional and multilingual sites compares the options:
- Country domains, such as a separate .mx domain: clear signals but expensive and only sensible if you truly target another country.
- Subdomains, such as es.example.com: easy to set up, but treated more like a separate site to maintain.
- Subdirectories, such as example.com/es/: easy to set up and low maintenance, sharing one domain.
- URL parameters, such as example.com?lang=es: Google labels this not recommended.
A business serving Spanish speakers in Los Angeles is not targeting another country, it is serving another language in the same city. That is exactly what a subdirectory does well. The Spanish pages benefit from the same domain, the same hosting and the same deployment, and there is one site to keep healthy.
In Next.js, this maps to a dynamic segment. The Next.js internationalization guide nests the app under app/[lang], so every page receives the language as a parameter and the root layout can set the html lang attribute to match. Each language reads its strings from a dictionary file, such as dictionaries/en.json and dictionaries/es.json, loaded on the server.
What is hreflang, and how do I set it up?
Hreflang is an annotation that tells Google which pages are language versions of each other, so it can show the Spanish page to Spanish searchers and the English page to everyone else.
According to Google's localized versions documentation, there are three equivalent ways to declare it: link tags in the page head, HTTP headers, or entries in your XML sitemap. Pick one and use it consistently. The rules that matter:
- Every version must list itself and every other version. If the English page points to the Spanish one but the Spanish page does not point back, Google may ignore the annotation.
- Use full URLs, including https.
- The code is a language, optionally followed by a region: es, es-US, en or en-US. A region alone is not valid.
- Add an x-default entry for the page to show when no language matches, usually the English version or a language chooser.
For a service business in Los Angeles, I usually use en-US and es-US, because the content is about local services in the United States. Plain es and en are fine too if you do not need a region.
In the Next.js App Router, I generate these from the metadata API, setting a canonical URL and the alternates for each language in generateMetadata, so every page gets matching tags automatically. Google also notes that it does not use hreflang or the lang attribute to detect what language a page is in. It reads the content, so the Spanish page has to actually be in Spanish, including the menu and footer.
Should I translate the URLs as well?
Translating slugs is optional, but I recommend it for the main pages because example.com/es/servicios looks right to a Spanish reader in a way that example.com/es/services does not.
The trade-off is maintenance. Translated slugs mean you need a mapping from each English page to its Spanish page, so the language switcher and hreflang tags know where to point. In code this is a small table, or a field on each page in a CMS. If you skip it, the switcher sends people to the Spanish homepage instead of the Spanish version of the page they were on, which is frustrating.
Whatever you choose, do not change slugs after launch without redirects. If you later move from /es/services to /es/servicios, add permanent redirects from the old paths, the same way you would during any migration. My post "How to move from Wix or Squarespace without losing your Google rankings" covers how to plan redirects so rankings carry over.
How should the language switcher work?
Put a visible link labelled "Español" on English pages and "English" on Spanish pages, pointing to the equivalent page in the other language, and never force visitors into a language.
Google's multilingual guidance says to avoid automatically redirecting users based on what you think their language may be, because that can prevent people and search engines from seeing all versions of the site. That is worth knowing because the Next.js internationalization guide shows a proxy.js file that redirects visitors from the root URL based on their browser's Accept-Language header. It works, but for a small business I prefer to serve English at the root, mark it as x-default, and let people choose.
A few details make switchers better:
- Use language names written in that language, such as "Español," not flags. Flags represent countries, and Spanish is spoken in many.
- Keep the switcher in the same spot on every page, usually the header and the footer.
- Remember the choice for later visits with a cookie, but still give every page its own URL.
- On mobile, keep the switcher outside a collapsed menu if Spanish speakers are a large share of your visitors.
How do I get translation quality right?
Use machine translation for a first draft if you like, then have a fluent speaker who knows your industry review and localize every page before it goes live.
Translation for a website is closer to rewriting than to word swapping. Headlines need to sound natural, calls to action need to be short, and service names need to match the words customers actually use when they search. Spanish varies by region, and an audience in Los Angeles may use different everyday words than a reader in Madrid. Your reviewer should know who the customers are.
A process that works:
- Freeze the English copy first. Translating while the English is still changing doubles the work.
- Export all the text, including button labels and error messages, into one document or the dictionary files.
- Translate, then have a second fluent person review it on the actual pages, not in a spreadsheet, because layout reveals problems such as long Spanish phrases breaking buttons.
- Agree on a glossary for service names and recurring terms so they stay consistent.
Professional translation is commonly priced per word or per project, so get quotes. Treat any number someone gives you without seeing the word count as a guess.
What do people forget to translate?
The pages usually get translated; the small text around them often does not.
My checklist for the Spanish version:
- Page titles and meta descriptions, which are what searchers see in results
- Image alt text and the labels on icons
- Form placeholders, validation errors such as "Please enter a valid phone number," and success messages
- Confirmation and reminder emails or texts sent by a booking or quote tool
- The cookie banner, the 404 page and the privacy policy summary
- PDFs such as menus, price lists or intake forms
- Structured data, so the name of each service in the markup matches the visible Spanish text
- Your Google Business Profile, which can mention that you serve customers in Spanish
And the offline part: if the site says "Llámenos," someone who answers the phone should be able to continue in Spanish.
What does a bilingual site cost and how long does it take?
Expect the build to take somewhat longer than an English-only site of the same size, with translation as a separate cost that depends on the word count.
Based on my packages, a bilingual site of up to five pages per language with a contact or booking form can start from the Business Site at $450 in 14 days, with extra time for translated forms and emails. A larger site where staff edit both languages in a CMS fits the Full Custom Build from $1,200 in 21 days, because the editor, the page pairings and the publishing flow all need to handle two languages. The website cost calculator on this site gives a fuller estimate.
Here is an illustration with a made-up business: Rivera Family Dental in the San Gabriel Valley. English lives at the root, Spanish under /es/, with translated slugs for the five main pages. Every page carries en-US, es-US and x-default annotations. The switcher sits in the header. The booking form, its error messages and the confirmation email exist in both languages, and the front desk reviewed the Spanish copy with a professional translator before launch.
The bottom line
A bilingual website in English and Spanish works when each language has its own URL, the pages are linked with reciprocal hreflang tags, visitors choose their language instead of being redirected, and a fluent person reviews every word, including forms and emails. Use a subdirectory such as /es/ unless you have a strong reason not to, translate the small text as carefully as the headlines, and plan the build and translation together so the Spanish site launches as complete as the English one.
Questions, answered in one line
Is a Google Translate widget enough for a bilingual website?
No, because widget translations usually do not get their own URLs, so search engines do not index them as Spanish pages and the quality is not reviewed.
Should the Spanish version be on a subdomain or a subfolder?
For most small businesses a subfolder such as /es/ is simplest, because it shares the main domain, is easy to maintain and works cleanly with hreflang.
Which hreflang code should I use for Spanish in the United States?
Use es-US if the pages target Spanish speakers in the United States, or plain es if they serve Spanish speakers anywhere, and pair it with en-US or en for English.
Do I need to translate the URLs too?
It is optional, but translated slugs such as /es/servicios/ read better to Spanish speakers and can help them recognize relevant results.
How much does Thomas Osayi charge for a bilingual website?
A bilingual site of a few pages can start from his Business Site at $450, and larger bilingual sites with a CMS fit his Full Custom Build from $1,200, with translation priced separately.
Sources
- Tell Google about localized versions of your page Google Search Central
- Managing multi-regional and multilingual sites Google Search Central
- Internationalization Next.js
Related articles
- How much does a restaurant website cost in 2026?
- How to take restaurant orders online without third-party fees
- Toast vs Squarespace vs a custom website for restaurants
- Google Business Profile vs website: do you need both?
Custom Next.js websites for businesses
Custom Next.js websites for small businesses, clinics, restaurants and startups. Fast, SEO-ready, built from scratch with booking, ordering or quote tools. Based in Los Angeles.
See the service