تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
إدارة الزحف إلى عناوين URL التي تتيح البحث المتعدّد الأوجه
البحث المتعدّد الأوجه هو ميزة شائعة في المواقع الإلكترونية التي تسمح لزوارها بتغيير طريقة عرض العناصر
(على سبيل المثال، المنتجات أو المقالات أو الفعاليات) على إحدى الصفحات. هذه الميزة مفيدة ويكثر استخدامها، إلا أنّ طريقة تنفيذها الأكثر شيوعًا والتي تعتمد على معلَمات عنوان URL يمكن أن تنشئ مساحات URL غير محدودة، ما قد يُلحق الضرر بالموقع الإلكتروني من خلال الطريقتين التاليتين:
عمليات الزحف الزائدة: بما أنّ عناوين URL التي تم إنشاؤها لأغراض البحث المتعدّد الأوجه تبدو جديدة ولا يمكن لبرامج الزحف تحديد ما إذا كانت هذه العناوين مفيدة بدون الزحف إليها أولاً، ستصل برامج الزحف عادةً إلى عدد كبير جدًا من عناوين URL التي تتيح البحث المتعدّد الأوجه قبل أن يتبيّن من خلال عمليات المعالجة في برامج الزحف أنّ هذه العناوين عديمة الفائدة في الواقع.
بطء عمليات الزحف الاستكشافي: انطلاقًا من النقطة السابقة، إذا تم استهلاك موارد الزحف على عناوين URL غير مفيدة، يقل الوقت المتاح للزحف إلى عناوين URL جديدة ومفيدة.
ضمن أي عنوان URL نموذجي يتيح البحث المتعدّد الأوجه، قد تتوفّر معلَمات مختلفة في سلسلة طلب البحث تتعلّق بالسمات التي تتم فلترة العناصر استنادًا إليها. على سبيل المثال:
يؤدي تغيير أي معلَمة من معلَمات عنوان URL، products أو color أو size، إلى عرض مجموعة مختلفة من العناصر في الصفحة الأساسية. وهذا يعني في الغالب عددًا كبيرًا جدًا من المجموعات المحتمَلة للفلاتر، ما يؤدي إلى عدد هائل من عناوين URL المحتمَلة. لتوفير الموارد، ننصحك بالتعامل مع عناوين URL هذه بإحدى الطريقتين التاليتين:
إذا كنت لا تحتاج إلى إجراء فهرسة محتمَلة لعناوين URL التي تتيح البحث المتعدّد الأوجه، يمكنك منع الزحف إلى عناوين URL هذه.
إذا كنت بحاجة إلى إجراء فهرسة محتمَلة لعناوين URL التي تتيح البحث المتعدّد الأوجه، يجب التأكد من أنّ هذه العناوين تتّبع أفضل الممارسات الموضحة في القسم التالي. وتذكَّر أنّ الزحف إلى عناوين URL المتعدّدة الأوجه يؤدي غالبًا إلى استهلاك مقدار كبير من موارد الحوسبة في المواقع الإلكترونية بسبب العدد الهائل لتلك العناوين والعمليات اللازمة لعرض تلك الصفحات.
منع الزحف إلى عناوين URL التي تتيح البحث المتعدّد الأوجه
إذا أردت توفير موارد الخادم ولم تكن بحاجة إلى ظهور عناوين URL التي تتيح البحث المتعدّد الأوجه في "بحث Google"، بإمكانك منع الزحف إلى عناوين URL هذه بإحدى الطرق التالية.
استخدِم ملف robots.txt لمنع الزحف إلى عناوين URL التي تتيح البحث المتعدّد الأوجه. في معظم الأحيان، لا يكون هناك سبب وجيه للسماح بالزحف إلى العناصر المفلترة، إذ إنّه يؤدي إلى استهلاك موارد الخادم بدون فائدة تُذكر. بدلاً من ذلك، ننصحك بالسماح بالزحف إلى الصفحات الخاصة بالسلع المحددة بالإضافة إلى صفحة بيانات مخصصة لعرض جميع المنتجات بدون تطبيق الفلاتر.
تتوفر طريقتان أخريان، وهما استخدام العنصر rel="canonical"link وسمة علامة الارتساء rel="nofollow"، للإشارة إلى خيارك المفضّل المتعلّق بالزحف (أو عدم الزحف) إلى عناوين URL التي تتيح البحث المتعدّد الأوجه. مع ذلك، تكون هاتان الطريقتان أقل فاعلية بشكل عام على المدى البعيد مقارنةً بالطريقتين السابقتين.
إذا استخدمت rel="canonical"
لتحديد النسخة الأساسية من عنوان URL الذي يتيح البحث المتعدّد الأوجه
قد يؤدي ذلك بمرور الوقت إلى تقليل حجم الزحف إلى النسخة غير الأساسية من تلك العناوين. مثلاً، إذا كان لديك 3 أنواع من الصفحات المفلتَرة، ننصحك بتوجيه rel="canonical" إلى النسخة غير المفلتَرة:
https://example.com/items.shtm?products=fish&color=radioactive_green&size=tiny
يحدّد <link rel="canonical" href="https://example.com/items.shtm?products=fish" >.
قد يكون مفيدًا استخدام سمات
rel="nofollow"
على علامات الارتساء التي تشير إلى صفحات النتائج المفلتَرة، إلا أنّه يجب تضمين السمة rel="nofollow" في كل علامة ارتساء تشير إلى عنوان URL محدد لكي تكون العلامة فعّالة.
التأكّد من أنّ عناوين URL التي تتيح البحث المتعدّد الأوجه محسَّنة بما يلائم الويب
لزيادة احتمال الزحف إلى عناوين URL التي تتيح البحث المتعدّد الأوجه وفهرستها، يجب اتّباع أفضل الممارسات الموضّحة أدناه للحد من الآثار السلبية للزحف إلى عدد كبير من عناوين URL المحتمَلة على موقعك الإلكتروني:
استخدِم فاصل معلَمات عناوين URL المتَّبع في المجال "&"، إذ يصعب على برامج الزحف رصد أحرف مثل الفاصلة (,) والفاصلة المنقوطة (;) والأقواس ([ و]) باعتبارها فواصل معلمات (لأنّها لا تُشكّل فواصل في معظم الأحيان).
عند ترميز الفلاتر في مسار عنوان URL، مثل /products/fish/green/tiny، يجب التأكد من عدم تغيير الترتيب المنطقي للفلاتر مطلقًا ومن عدم تكرار أي فلاتر.
اعرض رمز حالة HTTP 404 عندما لا تؤدي مجموعة الفلاتر إلى عرض أي نتائج.
إذا لم تكن هناك سمكة خضراء في مستودع الموقع الإلكتروني، سيتلقّى المستخدمون وبرامج الزاحف خطأ "لم يتم العثور على الصفحة" مع رمز حالة HTTP المناسب (404). ومن المفترض أن يحدث هذا أيضًا عندما يحتوي عنوان URL على فلاتر مكررة أو مجموعات فلاتر غير صالحة، وعناوين URL لنتائج مقسّمة على صفحات غير متاحة. وبالمثل، إذا لم تظهر نتائج لمجموعة فلاتر، يجب عدم إعادة التوجيه إلى صفحة عادية تعرض الخطأ "لم يتم العثور على الصفحة". بدلاً من ذلك، يمكن عرض خطأ "لم يتم العثور على الصفحة" مع رمز حالة HTTP 404
على عنوان URL الذي تم العثور على الخطأ فيه.
تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)"],[],["Faceted navigation URLs, often using parameters, can lead to overcrawling and slower discovery of new content. To manage this, prevent crawling of these URLs using `robots.txt` to disallow specific parameters or employ URL fragments instead of parameters. Alternatively, use `rel=\"canonical\"` or `rel=\"nofollow\"` to reduce crawling of these pages. If faceted URLs are needed, utilize `&` for parameters, maintain consistent filter order, and return `404` for no-result combinations.\n"],null,["# Managing crawling of faceted navigation URLs | Google Search Central\n\nManaging crawling of faceted navigation URLs\n============================================\n\n\nFaceted navigation is a common feature of websites that allows its visitors to change how items\n(for example, products, articles, or events) are displayed on a page. It's a popular and useful\nfeature, however its most common implementation, which is based on URL parameters, can generate\ninfinite URL spaces which harms the website in a couple ways:\n\n- **Overcrawling**: Because the URLs created for the faceted navigation seem to be novel and crawlers can't determine whether the URLs are going to be useful without crawling first, the crawlers will typically access a very large number of faceted navigation URLs before the crawlers' processes determine the URLs are in fact useless.\n- **Slower discovery crawls**: Stemming from the previous point, if crawling is spent on useless URLs, the crawlers have less time to spend on new, useful URLs.\n\n\nA typical faceted navigation URL may contain various parameters in the query string related to the\nproperties of items they filter for. For example: \n\n```\nhttps://example.com/items.shtm?products=fish&color=radioactive_green&size=tiny\n```\n\n\nChanging any of the URL parameters `products`, `color`, and\n`size` would show a different set of items on the underlying page. This often means a\nvery large number of possible combinations of filters, which translates to a very large number of\npossible URLs. To save your resources, we recommend dealing with these URLs one of the following\nways:\n\n- If you don't need the faceted navigation URLs potentially indexed, prevent crawling of these URLs.\n- If you need the faceted navigation URLs potentially indexed, ensure that the URLs follow our best practices outlined in the following section. Keep in mind that crawling faceted URLs tends to cost sites large amounts of computing resources due to the sheer amount of URLs and operations needed to render those pages.\n\nPrevent crawling of faceted navigation URLs\n-------------------------------------------\n\n\nIf you want to save server resources and you don't need your faceted navigation URLs to show up in\nGoogle Search, you can prevent crawling of these URLs with one of the following ways.\n\n- **Use [robots.txt](/search/docs/crawling-indexing/robots/intro) to disallow crawling of faceted navigation URLs.** Oftentimes there's no good reason to allow crawling of filtered items, as it consumes server resources for no or negligible benefit; instead, allow crawling of just the individual items' pages along with a dedicated listing page that shows all products without filters applied. \n\n ```\n user-agent: Googlebot\n disallow: /*?*products=\n disallow: /*?*color=\n disallow: /*?*size=\n allow: /*?products=all$\n ```\n- **Use URL fragments to specify filters.** [Google Search generally doesn't support URL fragments in crawling and indexing](/search/docs/crawling-indexing/url-structure#fragments). If your filtering mechanism is based on URL fragments, it will have no impact on crawling (positive or negative). For example, instead of URL parameters, use URL fragments: \n\n ```\n https://example.com/items.shtm#products=fish&color=radioactive_green&size=tiny\n ```\n\n\nOther ways to signal a preference of which faceted navigation URLs (not) to crawl is using\n`rel=\"canonical\"` `link` element and the `rel=\"nofollow\"` anchor\nattribute. However, these methods are generally less effective in the long term than the\npreviously mentioned methods.\n\n- **Using [`rel=\"canonical\"`](/search/docs/crawling-indexing/consolidate-duplicate-urls#rel-canonical-link-method)\n to specify which URL is the canonical version of a faceted navigation URL** may, over time, decrease the crawl volume of non-canonical versions of those URLs. For example, if you have 3 filtered page types, consider pointing the `rel=\"canonical\"` to the unfiltered version: `https://example.com/items.shtm?products=fish&color=radioactive_green&size=tiny` specifies `\u003clink rel=\"canonical\" href=\"https://example.com/items.shtm?products=fish\" \u003e`.\n- **Using\n [`rel=\"nofollow\"`](/search/docs/crawling-indexing/qualify-outbound-links#nofollow)\n attributes on anchors pointing to filtered results pages** may be beneficial, however keep in mind that every anchor pointing to a specific URL must have the `rel=\"nofollow\"` attribute in order for it to be effective.\n\nEnsure the faceted navigation URLs are optimal for the web\n----------------------------------------------------------\n\n\nIf you need your faceted navigation URLs to be potentially crawled and indexed, ensure you're\nfollowing these best practices to minimize the negative effects of crawling the large number of\npotential URLs on your site:\n| Keep in mind that having these URLs crawled means an increased resource usage on your server and, potentially, slower discovery of new URLs on your site.\n\n1. **Use the industry standard URL parameter separator '`&`'.** Characters like comma (`,`), semicolon (`;`), and brackets (`[` and `]`) are hard for crawlers to detect as parameter separators (because most often they're not separators).\n2. If you're encoding filters in the URL path, such as `/products/`**fish** `/`**green** `/`**tiny**, ensure that the logical order of the filters always stays the same and that no duplicate filters can exist.\n3. **Return an HTTP `404` status code when a filter combination doesn't return\n results.** If there are no green fish in the site's inventory, users as well as crawlers should receive a \"not found\" error with the proper HTTP status code (`404`). This should also be the case if the URL contains duplicate filters or otherwise nonsensical filter combinations, and nonexistent pagination URLs. Similarly, if a filter combination has no results, don't redirect to a common \"not found\" error page. Instead, serve a \"not found\" error with the `404` HTTP status code under the URL where it was encountered. If [you have a single-page app](/search/docs/crawling-indexing/javascript/javascript-seo-basics#avoid-soft-404s) this might not be possible. Follow the best practices for single page apps."]]