Skillpedia
تحسين محركات البحث (SEO)75k · #2880

hyphens

ما الذي تفعله

تتحقق هذه المهارة من عناوين الويب في الموقع، وتقترح الشرطات الوسطى بدلًا من الشرطات السفلية أو المسافات. وهي موجهة لأصحاب المواقع الذين يريدون روابط أوضح للبحث.

متى تستخدمها

  • ✓عندما تستخدم عناوين صفحاتك الشرطات السفلية للفصل بين الكلمات.
  • ✓عندما تخطط لبنية روابط جديدة أو لصيغة معرّف نصي (slug) جديدة.
  • ✓عندما تنقل صفحات من روابط بشرطات سفلية إلى روابط بشرطات وسطى.

رابط المهارة

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/hyphens/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/hyphens/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“هل يمكنك فحص عناوين صفحاتي وتغيير الشرطات السفلية إلى شرطات وسطى؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يفحص الوكيل مسارات الروابط بحثًا عن الشرطات السفلية والمسافات المشفّرة والفواصل المختلطة. ويقترح نسخًا بشرطات وسطى، وعمليات إعادة التوجيه بـ 301 اللازمة للإبقاء على الروابط القديمة تعمل.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Use hyphens in URLs

Google's search systems interpret hyphens in URLs as word boundaries, enabling it to match the URL against individual keyword queries. Underscores join words into a single token, meaning /seo_practices is seen as one word 'seopractices' rather than two separate words 'seo' and 'practices'.

Quick Reference

  • Use hyphens (-) to separate words in URLs — Google treats hyphens as word separators, underscores as part of the word
  • /best-seo-practices is better than /best_seo_practices or /bestseopractices
  • Changing existing URLs from underscores to hyphens requires 301 redirects to preserve link equity

Check

Inspect the URL path segment of each page. Flag any URL that contains: (1) Underscores (_) as word separators (e.g., /best_practices). (2) Spaces encoded as %20 or + in path segments. (3) Mixed separators in the same URL (e.g., /best-practices_guide). Report the count of non-hyphenated URLs by category.

Fix

  1. Identify all pages with underscores or spaces in URL path segments.
  2. Generate the hyphenated equivalent: replace _ with -, spaces/%20 with -.
  3. Set up 301 permanent redirects from the old URLs to the new hyphenated URLs.
  4. Update internal links throughout the site to point to the new URLs.
  5. Submit the new URLs to Google Search Console for re-indexing.
  6. Update your sitemap.xml to include only the new hyphenated URLs.
  7. In your CMS or slug-generation function, enforce hyphens going forward:
    • Slug: title.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '')

Explain

Google's John Mueller has confirmed that Google interprets hyphens as word separators in URLs, but treats underscores as word joiners. This means a URL with underscores matches fewer individual keyword queries. For example, /web_design would match 'web_design' as a single token, while /web-design matches both 'web design' and 'webdesign' queries.

Code Review

Parse all URL paths used in the application's router or CMS slug fields. Flag any path segment containing _ characters between words or any %20 space encoding. Verify slug-generation utilities produce lowercase hyphenated output. Check redirect rules to confirm old underscore URLs are permanently (301) redirected to their hyphenated equivalents.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/hyphens

الأسئلة الشائعة

لماذا الشرطات الوسطى أفضل من الشرطات السفلية؟

تقول المهارة إن Google تعامل الشرطة الوسطى حدًا فاصلًا بين الكلمات، بينما تدمج الشرطة السفلية الكلمات في رمز واحد.

ماذا عن الروابط القديمة بعد التغيير؟

تقترح المهارة إعادة توجيه 301 من العناوين القديمة، مع تحديث الروابط الداخلية وخريطة الموقع.

هل يجب إرسال الروابط الجديدة؟

تقترح المهارة إرسال الروابط الجديدة إلى Google Search Console لإعادة الفهرسة.

التفاصيل

الوصف الأصلي من المؤلف

Use when auditing URL structures for word separator format, generating slugs from titles, or planning a URL migration from underscores or spaces to hyphens with appropriate redirects.

repo: thedaviddias/Front-End-Checklist

الشعبية

نجوم GitHub
75k
الترتيب
#2880
الترخيص
MIT
آخر تحديث
31‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة