We would set up an hreflang=en or hreflang=x-default for the primary site, and an hreflang=en-uk just for the UK site
Couple of corrections here.
- For the global English content
hreflang=en
would be correct, nothreflang=x-default
. The latter is reserved for language selectors and conditionally redirecting pages, Per Google's hreflang specification:
For language/country selectors or auto-redirecting homepages, you should add an annotation for the hreflang value "x-default"
- The correct attribute value for the UK is
en-gb
, noten-uk
.
As the for the other part of your question, you're quite right that browser language is often wrong (although in my analyses, it tends to default to en-us
rather than en-uk
).
That should not be an issue for hreflang
. Primarily Google is using hreflang
to target content to its regional search engines, e.g., google.co.uk, google.ca, etc.
They push users to those sites based on IP addresses, not browser language, so it's usually correct. Once on those sites, the user's browser language will come into play (e.g., if I visit google.es it'll default to English language and give me the option to search in Spanish).
Note that hreflang
is only supported by Google and Yandex. For Bing and everything else, use at least the lang
attribute on the opening <html>
tag, and ideally the Content-Language
HTTP header too. Both use the same ISO language and country code standards as hreflang
.