Hreflang ٹیگ جنریٹر

استعمال کا طریقہ 3 مراحل
  1. ہر زبان اور علاقے کا ورژن اس کے URL کے ساتھ لکھیں؛ مزید کے لیے + ورژن شامل کریں دبائیں۔
  2. x-default URL طے کریں اور نتیجہ بطور چنیں۔
  3. ٹیگز بنائیں دبائیں، پھر انہیں صفحے کے ہر ورژن میں کاپی کریں کریں۔
اُن وزیٹرز کے لیے متبادل جن کی زبان اوپر دی گئی کسی زبان سے میل نہیں کھاتی۔ اختیاری، مگر تجویز کردہ۔
Hreflang ٹیگز

Hreflang کا باہمی ہونا ضروری ہے: مجموعے کا ہر صفحہ باقی سب صفحات کو، بشمول خود اپنے، درج کرے۔ یہاں کا نتیجہ پورا مجموعہ رکھتا ہے، اس لیے وہی بلاک ہر نسخے پر جاتا ہے۔ زبان کے کوڈ ISO 639-1 اور علاقے کے کوڈ ISO 3166-1 Alpha-2 ہوتے ہیں — en-GB، en-UK نہیں، اور یہی سب سے عام غلطی ہے۔

یہ ٹول کیسے کام کرتا ہے

Hreflang سرچ انجن کو بتاتا ہے کہ کئی URLs دراصل ایک ہی صفحے کی مختلف زبانوں یا مختلف خطوں کے لیے تیار کردہ صورتیں ہیں، تاکہ ہر قاری کو درست صورت دکھائی جائے۔ یہ رینکنگ پر اثر نہیں ڈالتا اور نہ ہی ترجمے کا اشارہ ہے — یہ صرف اُن صورتوں میں سے انتخاب کرتا ہے جو آپ کے پاس پہلے سے موجود ہیں۔

ہر قطار ایک alternate لنک بنتی ہے۔ کوڈز کو ISO ساخت کے مطابق جانچا جاتا ہے: دو یا تین حروف کی زبان، اختیاری چار حروف کا رسم الخط، اور اختیاری دو حروف کا خطہ یا تین ہندسوں کا کوڈ۔ چنانچہ en، en-GB اور zh-Hant-TW درست ہیں، جبکہ زیریں خط والا en_GB اور en-UK درست نہیں۔ دہرائے گئے کوڈ، اور ایک ہی URL کی طرف اشارہ کرنے والی دو صورتیں، خارج کرنے کے بجائے نشان زد کر دی جاتی ہیں۔ نتیجہ یا تو head کے لیے لنک ٹیگز ہوتا ہے یا سائٹ میپ کے اندراجات۔

Hreflang کو کارآمد بنانا

  • ہر صورت کو ہر صورت کا ذکر کرنا چاہیے، بشمول خود اپنے: یہ مجموعہ باہمی ہونا ضروری ہے۔ جو صفحہ دوسروں کا نام لے مگر وہ اس کا نام نہ لیں، اسے مکمل طور پر نظرانداز کر دیا جاتا ہے۔
  • خطہ زبان نہیں ہے: en-GB کا مطلب برطانوی اندازِ تحریر والی انگریزی ہے، محض برطانوی ویب سائٹ نہیں۔ جہاں ایک ہی زبان کئی منڈیوں کو خدمت دیتی ہو، وہاں es-MX اور es-ES درست تفریق ہے۔
  • ایک x-default شامل کریں: یہ اُن قارئین کے لیے صورت متعین کرتا ہے جن کی زبان اور خطہ باقی کسی سے میل نہیں کھاتا — اور بیشتر سائٹس کے لیے یہ دنیا کا بڑا حصہ ہوتا ہے۔
  • ایک جگہ منتخب کریں اور اسی پر قائم رہیں: head ٹیگز، HTTP ہیڈرز یا سائٹ میپ۔ ایک ہی مجموعہ ان میں سے دو جگہ درج کرنا متضاد اندراجات کی عام وجہ ہے۔

What hreflang actually solves

It tells search engines that several URLs are the same page in different languages or for different regions, so the right one is shown to the right person. It does not affect ranking directly — it affects which of your existing pages appears.

The problem it prevents is real: without it, a search engine treats near-identical pages in English and American English as duplicates competing with each other, and picks one arbitrarily. With it, they are recognised as alternates of one another.

The [msm_tool slug="hreflang-generator"] produces the tags and flags the mistakes that make them silently useless.

The tags must be reciprocal

This is the rule that catches almost everyone. Every page in the set must list every page in the set, including itself.

If your English page points at the French one but the French page does not point back, search engines ignore the annotation entirely. Not partially — entirely. A one-way hreflang is the same as no hreflang, and because nothing breaks visibly, it can sit there for a year doing nothing.

Three languages means three pages each carrying four tags: one for each language plus the x-default. Six languages means six pages carrying seven tags each. The count grows quickly and it has to be complete.

Self-referencing is not optional

Each page includes a tag pointing at itself. It looks redundant and it is required — without it the set is incomplete and the same all-or-nothing rule applies.

The codes are not what people assume

  • Language codes are ISO 639-1, two letters. en, fr, de, ur.
  • Region codes are ISO 3166-1 Alpha 2, and they are countries, not languages. en-GB is English for the United Kingdom.
  • The common error is using a language where a country belongs. en-UK is invalid — the country code is GB. So is zh-CN meaning simplified Chinese; CN is China the country, and script is expressed as zh-Hans.
  • Region alone is not valid. You cannot write hreflang="GB". Language is mandatory, region is optional.

x-default is for everyone else

It marks the page shown to users whose language and region match none of your alternates. Usually that is an international English page or a language selector.

It is optional and almost always worth having. Without it, a visitor from a country you have not covered gets whichever page the search engine guesses at.

Absolute URLs, always

Relative paths do not work in hreflang. Every URL must include the protocol and the domain, and it must be the canonical version — the exact URL you want indexed, matching what your canonical tag says.

Two things follow. An hreflang pointing at a URL that redirects is broken. An hreflang pointing at a URL whose canonical points somewhere else is also broken, because you are giving contradictory instructions.

Where to put them

Three placements are valid: in the HTML head, in HTTP headers, or in an XML sitemap.

The head is simplest for a small site. The sitemap is far better for a large one — it keeps the tags in one place, avoids adding weight to every page, and makes the reciprocity easy to verify because the whole set is visible at once. For non-HTML files such as PDFs, HTTP headers are the only option.

What to check before shipping

  1. Every page lists every alternate, including itself.
  2. Region codes are countries, and en-UK appears nowhere.
  3. Every URL is absolute, canonical, and returns 200 rather than a redirect.
  4. The language actually matches the content — a tag claiming French on an English page is worse than no tag.
  5. An x-default exists.

اکثر پوچھے گئے سوالات

خاص طور پر Hreflang ٹیگ جنریٹر کے بارے میں۔ اس زمرے سے متعلق عمومی سوالات کے جواب زمرے کے صفحے پر موجود ہیں۔

نہیں۔ یہ صرف یہ طے کرتا ہے کہ کسی قاری کو آپ کا کون سا URL دکھایا جائے۔ صفحات دونوں صورتوں میں اپنی خوبی کے بل پر مقابلہ کرتے ہیں، اور ایک زبان والی سائٹ پر Hreflang لگانے کا کوئی فائدہ نہیں۔
یہ متبادل صورت ہے، اُن قارئین کے لیے جن کی زبان اور خطہ درج کردہ کسی متبادل سے میل نہیں کھاتا۔ عام طور پر زبان منتخب کرنے والا صفحہ یا بین الاقوامی انگریزی صورت اس کے لیے چنی جاتی ہے۔
خطے کا حصہ ISO 3166-1 کے مطابق ہوتا ہے، جس میں برطانیہ کا کوڈ GB ہے۔ UK وہاں درست کوڈ نہیں، اور سرچ انجن اندازہ لگانے کے بجائے اس اندراج کو رد کر دیتے ہیں۔
کسی ایک کو ترجیح حاصل نہیں۔ head ٹیگز کا معائنہ آسان ہے اور ہر ٹیمپلیٹ میں غلطی بھی آسانی سے ہو جاتی ہے؛ سائٹ میپ پورے مجموعے کو ایک فائل میں رکھتی ہے، جس کی جانچ بڑی سائٹ پر آسان رہتی ہے۔ کوئی ایک چن لیں۔
صرف اُس صورت میں جب ہر ملک کا اپنا URL ہو۔ اگر سب ایک ہی صفحہ پڑھتے ہیں تو انتخاب کے لیے کچھ ہے ہی نہیں اور اس اندراج کا کوئی مقصد نہیں۔

نئے ٹولز، خصوصیات اور کارکردگی بڑھانے کے مشوروں کی اطلاع پانے کے لیے سبسکرائب کریں۔