Explaining a bilingual site to search engines
Per-language URLs, automatic language detection, hreflang, x-default and the sitemap.
This site is in Turkish and English. On a bilingual site the real work isn't translation; it's telling search engines which page is in which language and that they're versions of each other.
Every language gets its own URL
Each page has two addresses: /tr/blog and /en/blog. The language lives in the URL rather than a cookie or a browser setting, so a search engine can see and index both versions separately.
Choosing a language automatically
When someone lands on vezironi.com directly, I look at the Accept-Language header the browser sends. A value like tr-TR,tr;q=0.9,en;q=0.8 is ranked by its quality scores and the first supported language wins. If the visitor has switched languages before, the choice stored in a cookie takes priority. Crawlers usually don't send the header, so they get English by default.
That redirect is temporary (307) because the result depends on the visitor. Old URLs from the previous site, like /about, use permanent (301) redirects to their new equivalents.
hreflang and x-default
Every page's head points at its other language version:
<link rel="alternate" hreflang="tr" href="https://vezironi.com/tr/blog" />
<link rel="alternate" hreflang="en" href="https://vezironi.com/en/blog" />
<link rel="alternate" hreflang="x-default" href="https://vezironi.com/en/blog" />
x-default says which version to show visitors whose language doesn't match. If a post exists in only one language, the other language's tag is left out and that URL returns 404; I never point a search engine at a page that doesn't exist.
Sitemap and structured data
sitemap.xml lists every URL together with its counterpart in the other language. The home page carries Person structured data and posts carry BlogPosting. Each page's share image is generated automatically, too.
Keeping the staging site out of the index
Before going live I test on a separate staging address. One setting there marks every page "noindex" and closes everything in robots.txt, so the staging copy never competes with the real site.