# Making your website multi-regional using top-level domains

DevFeed: [Making your website multi-regional using top-level domains](<https://devfeed.tech/articles/making-your-website-multi-regional-using-top-level-domains-34700.md>)

Original publisher: [Read original article](<https://medium.com/unexpected-token/making-your-website-multi-regional-using-top-level-domains-cdbbdb951b65?source=rss----2d2624499d2---4>)

Author: Nicolas Mondollot

Published: 2015-04-15T12:19:08Z

Content type: article

Language: en

Sources: [eFounders](<https://devfeed.tech/sources/efounders.md>)

Topics: [Website](<https://devfeed.tech/topics/website.md>), [Search engine optimization (SEO)](<https://devfeed.tech/topics/seo.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [domain](<https://devfeed.tech/topics/domain.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [development](<https://devfeed.tech/tags/development.md>), [dns](<https://devfeed.tech/tags/dns.md>), [domain](<https://devfeed.tech/tags/domain.md>), [rails](<https://devfeed.tech/tags/rails.md>), [search-engine-optimization](<https://devfeed.tech/tags/search-engine-optimization.md>), [seo](<https://devfeed.tech/tags/seo.md>), [startup](<https://devfeed.tech/tags/startup.md>), [tech](<https://devfeed.tech/tags/tech.md>), [website](<https://devfeed.tech/tags/website.md>)

## AI overview

This article explains how to localize a website for multiple languages and regions, compare URL strategies for international SEO, and use country-specific top-level domains with Rails. It describes Drivy's choice of ccTLDs and notes limitations in a simple domain-based locale implementation.

## Source excerpt

illustration: Adrien Griveau Hi there. My name is Nicolas Mondollot, I am the CTO of Drivy -- an awesome peer-to-peer car rental service. We launched our german website in early 2015. Here are some things we learned along the way. When you start a website you usually start small: one website, hosted on one domain, targeting one country and one language. Simple, right? Then, one day you decide to go international (exciting!). One problem, though: people don't all speak/read the same language everywhere. You must localize you content in multiple languages. The standardized way to do so is to use a locale for each language and geographical region you are targeting. For instance if you want to make your website available in the US, France and Canada you'll need 4 locales: en : English (US) fr : French (France) fr-CA : French (Canada) en-CA : English (Canada) side note: this is a 'pragmatic' approach to locale naming, where we drop the regional part when it is not needed (more information here). Great. Now, how do you make your website available in all these locales? Locales and URLs The first rule of Search Engine Optimization when you go international is: the locale must appear in the URL. Google suggests choosing among several options: URL parameters: example.com?locale=fr Subdirectories with a generic top-level domain (gTLD): example.com/fr/ Subdomains with a generic top-level domain (gTLD): fr.example.com Country-specific top-level domains (ccTLD): example.fr There is no one-size-fits-all approach. The best solution really depends on your specific requirements (this article from Moz may give you some pointers). At Drivy we decided to use ccTLDs because it was the best solution SEO-wise to target different countries. Plus it's prettier. First implementation In Rails this is pretty straightforward. You just need to point your new domain DNS to your application server and drop this code in your ApplicationController (inspired by the official Rails guide): class Applicat