Sub topic 8
Context: location, language, and settings
Two people can type the same words into Google at the same moment and see different results. This chapter explains why. It covers the signals Google uses to adapt results to the person searching, what a site owner can and cannot control, and the mistakes that most often break international and local visibility.
Prerequisites
This chapter assumes you know the following:
- The crawl, index, and serve stages from the first chapter.
- How Google interprets a query and the idea of relevance from the chapters on query understanding and relevance.
- What a URL is, and how to read simple HTML such as a
<head>section.
Why the same query gives different results
Google's ranking systems do not only ask "which pages match these words?" They also ask "which pages are useful for this person, here, in this language, right now?" The inputs that answer the second question are called context signals. Google's documentation names several of them, mainly location, language, and search settings.
Context mostly changes which candidate pages are chosen and how they are ordered. It does not make a low-quality page good. A page still has to be crawlable, indexed, relevant, and useful before context can favor it.
Take the query pharmacy open now. The words alone cannot produce a good answer. The useful result is a nearby pharmacy, in the searcher's language, that is open at this hour. Location and time supply the missing information.
The main context signals
| Signal | What Google infers | Typical effect |
|---|---|---|
| Location | Where the searcher is, or a place named in the query | Local businesses, regional news, country-specific pages |
| Language | The language of the query and the searcher's language settings | Pages written in a language the searcher reads |
| Search settings | SafeSearch, the interface language, and the country version of Google | Filtering of explicit results, and a regional emphasis |
| Past activity | Earlier searches, if the searcher has chosen to keep activity history | Minor adjustments, such as familiar topics |
Location
Google estimates location from the device, the network, and the searcher's saved settings. The query can also name a place directly, as in plumber in Leeds. A named place usually takes priority over the inferred one.
Location matters most for queries with local intent, meaning the searcher wants something physical or nearby. Examples are coffee shop, bus times, and emergency dentist. For these queries, Google leans on a business's proximity, its prominence, and how well its information matches the query. The business profile data that Google Business Profile provides is a major input for local results.
Location matters much less for queries where geography is irrelevant. How does photosynthesis work returns broadly similar results in most places.
Language
Google tries to return pages in the language the searcher can read. It decides this from the language of the query, the interface language, and the language of the page content. Pages are identified by their visible text. Google does not rely on the lang attribute alone, and it does not use the language in the URL as a deciding factor.
The practical consequence for a site owner is straightforward. Write each page in one main language, and keep the navigation and the body text in that same language. A page that mixes languages makes language detection less reliable.
Search settings
Searchers can change settings that alter results. SafeSearch filters explicit content. The interface language and the country version of Google, such as google.de, shift which results appear first. Site owners cannot change a visitor's settings. What they can do is make sure the pages describe themselves accurately, so the right pages match the right settings.
How context fits into the pipeline
Context enters the process at the serving stage. Google does not build one index per person. It uses one shared index, and at query time it picks and orders candidates using the query plus the searcher's context.
This explains a common observation. Rank-tracking tools report one position for a keyword, but real searchers see a range of positions. Any single number is a sample from one location, language, and setting.
Telling Google which version of a page is for whom
Many sites publish more than one version of the same content, for example English for the US and English for the UK, or the same page in German and French. Google needs help to treat these as related versions instead of duplicates. The tool for this is hreflang.
hreflang annotations
An hreflang annotation declares that a set of URLs are alternate versions of the same page for different languages or regions. This example goes in the <head> of each version.
<head>
<title>Repot a Snake Plant | Example Garden</title>
<link rel="alternate" hreflang="en-us" href="https://www.example.com/us/repot-snake-plant">
<link rel="alternate" hreflang="en-gb" href="https://www.example.com/uk/repot-snake-plant">
<link rel="alternate" hreflang="de" href="https://www.example.com/de/schlangenpflanze-umtopfen">
<link rel="alternate" hreflang="x-default" href="https://www.example.com/repot-snake-plant">
</head>The value of hreflang is a language code, optionally followed by a region code. en-gb means English for the United Kingdom. The special value x-default names the fallback page for searchers who match none of the listed languages.
Several rules cause most of the errors:
- Annotations must be reciprocal. If the US page points to the UK page, the UK page must point back. Without the return link, Google can ignore the annotation.
- Each page lists itself. The set on each page includes its own URL.
- Use full, absolute URLs. Relative paths are a frequent source of mistakes.
- Codes must be valid. The language comes first, then the region.
en-ukis wrong. The region code for the United Kingdom isGB. - Point to indexable pages. Each URL in the set should return a normal 200 response, and it should not be blocked by
noindex. Each URL should canonicalize to itself.
You can place the same annotations in an XML sitemap or in HTTP headers instead of in the HTML. Use one method consistently. Mixing methods makes conflicts harder to find.
Canonical links and language versions
A canonical link tells Google which URL is the preferred version among duplicates. Do not use it to merge translated versions into one. If the French page has a canonical link pointing to the English page, Google may drop the French page from its index, and the hreflang set breaks. Each language version should canonicalize to itself.
Site structure for international sites
There are three common ways to organize multi-regional sites.
| Structure | Example | Strength | Trade-off |
|---|---|---|---|
| Country-code domain | `example.de` | Clear country signal | Separate sites to maintain and build trust for |
| Subdirectory | `example.com/de/` | One domain, simple to maintain | Weaker country signal unless supported by other cues |
| Subdomain | `de.example.com` | Easy to host separately | Treated as a separate area, more setup |
Google can use country-code domains as a country signal. For generic domains, the Search Console country-targeting setting was historically used, but Google has retired much of that tooling, so you should not rely on it. Content, language, hreflang, and local signals do most of the work. Choose a structure based on your team's ability to maintain it, because Google does not prefer one structure over another.
Local results
Local search is the most visible case of location context. A local pack is the map and the short list of businesses that appears for queries with local intent. The ranking factors Google documents for local results are relevance, distance, and prominence.
- Relevance: how well a business profile matches what the searcher wants. Complete, accurate categories, services, and descriptions help.
- Distance: how far the business is from the searcher or from the place named in the query. You cannot change this.
- Prominence: how well known the business is, based on information such as reviews, links, and mentions across the web.
For a site owner, the practical steps are small and concrete:
- Claim and verify your Google Business Profile.
- Keep your name, address, and phone number consistent everywhere they appear.
- Keep opening hours current, including holidays.
- Respond to reviews honestly. Do not pay for reviews or write your own.
A fake address or a keyword-stuffed business name falls under Google's spam and policy rules, which a later chapter covers. It can get a profile suspended.
Common errors and how to avoid them
- Automatic redirects by location or language. Sending visitors to a version based on their IP address can stop Google from reaching some versions. Googlebot usually crawls from the United States, so it may always be redirected to the US version and never see the others. Offer a banner suggesting the right version, and let users and crawlers reach every URL directly.
- Machine translation with no review. Poorly translated pages are low quality, and large amounts of auto-generated text with little value can violate spam policies. Review translations or have a native speaker edit them.
- Translating only the template. Translating the navigation but leaving the body in the original language gives Google mixed signals.
- Missing return links in
hreflang. This is the most common reason that the annotations are ignored. Search Console and third-party crawlers can list the mismatches. - Assuming personalization is large. Google states that personalization is limited. Location and language have strong effects, but past activity usually has a small one. Do not tune a site for individual users.
- Checking rankings from your own browser. Your own results reflect your location, language, and history. Use the Search Console Performance report, which can filter by country, for a representative view.
Checking context effects in Search Console
The Performance report lets you filter by Country and by Device. Comparing countries shows whether a regional page is reaching its intended audience. If your Spanish page gets impressions mostly in a country you did not target, check the hreflang set and the page language. A later chapter covers the report in detail.
For a quick manual check, use a private browser window, add a place name to the query, and compare the results. This is a rough tool, not a measurement.
Exercise
A site has an English US page at /us/guide and an English UK page at /uk/guide. The /us/guide page has hreflang links to both pages, but /uk/guide has none. Also, the UK page has a canonical link pointing to /us/guide. Name two problems and say how to fix each.
Show answer
First, the annotations are not reciprocal, because /uk/guide does not link back to /us/guide. Add a full hreflang set to /uk/guide that includes itself and the US page. Second, the canonical link on /uk/guide points to the US page, which tells Google the UK page is a duplicate and may remove it from the index. Change the canonical link so that /uk/guide points to itself.
Exercise
Your site automatically redirects every visitor to a language version based on their IP address. Why can this hurt visibility, and what is a safer approach?
Show answer
Googlebot mostly crawls from one region, so it may always be redirected to a single version and never discover the others. Those versions may then go unindexed. A safer approach is to show a banner or link suggesting the better version, while keeping every version reachable at its own URL.
Exercise
A colleague says that adding hreflang to a weak German page will lift its rankings in Germany. Is that correct?
Show answer
No. hreflang only helps Google show the right language or regional version to the right searcher. It does not add ranking strength. The German page still needs to be indexed, relevant, and useful.