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

trailing-slash

ما الذي تفعله

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

متى تستخدمها

  • ✓عندما يعرض الموقع الصفحة نفسها على عنوانين، أحدهما بشرطة مائلة في النهاية والآخر بلا شرطة.
  • ✓عندما تستخدم الروابط الداخلية وخريطة الموقع والوسوم canonical أنماط URL مختلفة.
  • ✓عندما ينتقل الموقع إلى منصة جديدة وربما تغيرت قواعد عناوينه.

رابط المهارة

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

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

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

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

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

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

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

“تعرض Google بعض صفحاتي مرتين، مرة بشرطة مائلة في النهاية ومرة بدونها. هل يمكنك إصلاح عناوين URL؟”

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

كيف تعمل

يختبر الوكيل النسختين من العنوان ويتحقق من الروابط الداخلية وخرائط الموقع. ثم يوصي بنمط مفضل واحد، مع إعادة توجيه دائمة من النسخة الأخرى.

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

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

Use trailing slashes consistently

Inconsistent trailing slashes create duplicate content — Google sees /page and /page/ as two separate URLs competing for the same ranking, splitting PageRank between them.

Quick Reference

  • Pick one convention — trailing slash or no trailing slash — and enforce it site-wide with 301 redirects
  • Both /page/ and /page must not return HTTP 200; one must redirect to the other
  • Set rel="canonical" to the preferred version on all pages
  • Ensure all internal links, sitemaps, and canonical tags use the same convention

Check

For a sample of URLs, test both the trailing-slash and non-trailing-slash versions. Both should NOT return HTTP 200 — one must 301-redirect to the other. Check that internal links, sitemap <loc> values, and canonical tags all use the same convention consistently.

Fix

Choose a canonical URL convention. Add server or framework redirect rules so the non-preferred variant permanently redirects (301) to the preferred one. Update all internal links, canonical tags, and sitemap entries to use the preferred format.

Explain

Explain why /page and /page/ are treated as distinct URLs by default, how this creates duplicate content, and how 301 redirects and canonical tags resolve the ambiguity.

Code Review

Review metadata generation, rendered HTML, structured data, and response headers related to Use trailing slashes consistently. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.


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

Rule page: https://frontendchecklist.io/rules/seo/trailing-slash

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

لماذا يُعامَل العنوانان كأنهما مختلفان؟

افتراضيًا، ترى محركات البحث /page و/page/ عنوانين منفصلين، فتتوزع إشارات الترتيب بينهما.

كيف تُحل الصفحات المكررة؟

توصي المهارة بإعادة توجيه 301 من النسخة غير المفضلة، ووسوم canonical في الصفحات.

هل يجب أن أحدّث خريطة الموقع أيضًا؟

نعم. تقول المهارة إن مدخلات خريطة الموقع يجب أن تستخدم الصيغة نفسها للعنوان المفضل.

التفاصيل

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

Use when applies to all static and dynamic websites. Use when auditing a site for duplicate content, setting up a new site, or after migrating platforms that changed URL conventions.

repo: thedaviddias/Front-End-Checklist

الشعبية

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

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

0

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

التعليقات

  • …

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

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