قد تكون إدارة مجموعة كبيرة من المواقع الإلكترونية مملة إذا كنت تنشئ محرك بحث كبيرًا. بدلاً من ذلك، يمكنك إضافة وإدارة الكثير من المواقع عن طريق إدراجها في ملف تعليقات توضيحية وتحميلها. بالإضافة إلى ذلك، تمنحك ملفات التعليقات التوضيحية تحكّمًا أكبر في ترتيب نتائج البحث.
ملف التعليقات التوضيحية هو مجرد قائمة من التعليقات التوضيحية. يحتوي كل تعليق توضيحي على مكونين: الموقع والتسميات المرتبطة به. تخبر العلامة "محرك البحث المبرمَج" بكيفية التعامل مع موقع إلكتروني. أي ما إذا كان ينبغي تضمين الموقع أو استبعاده أو الترويج له أو خفض ترتيبه. يمكنك تحديد التصنيفات في ملف السياق. في ملف التعليقات التوضيحية، يمكنك وضع علامة على المواقع باستخدام التسميات المناسبة.
عند بدء تعديل ملف التعليقات التوضيحية، ابدأ بإضافة عدد قليل من التعليقات التوضيحية. من الأسهل اختبار محرك البحث وتحري الخلل وإصلاحه باستخدام عدد قليل من التعليقات التوضيحية. وعندما تحصل على النتائج التي تتوقعها، أضِف المزيد من التعليقات التوضيحية بشكل تدريجي.
إذا أردت الاستفادة من جميع الميزات المتوفرة في ملف إعداد "محرك البحث المبرمَج"، يمكنك استخدام XML.
التعليقات التوضيحية في XML
في ما يلي مثال على تعليقات XML التوضيحية. يطلب ملف التعليقات التوضيحية هذا من "محرك البحث المبرمج" تضمين كل المحتوى ضمن www.webmd.com/hw/* واستبعاد أي محتوى ضمن www.webmd.com/hw/cancer/*.
يمكنك ربط الموقع الإلكتروني بمحرّك البحث باستخدام العلامة <Label name=" "/>، وتحديد الطريقة التي يجب أن يتعامل بها محرك البحث مع هذا الموقع الإلكتروني. يمكنك الحصول على التصنيفات الخاصة بمحرك البحث من ملف السياق الخاص بمحرك البحث. سيظهر لك تصنيفان: أحدهما لإضافة مواقع إلكترونية إلى "محرك البحث المبرمَج" والآخر لاستبعاد المواقع الإلكترونية منه. إذا لم تكن قد غيّرت اسم تصنيف محرك البحث في ملف السياق، سيكون تصنيف تضمين المواقع الإلكترونية على شكل _include_، وسيكون تصنيف استبعاد المواقع الإلكترونية على شكل _exclude_. لتجنب الأخطاء، انسخ هذه التصنيفات والصقها بدلاً من كتابتها يدويًا.
تمّ إنشاء "محرك البحث المبرمَج" في أعلى فهرس Google. وهذا يعني أنّ صفحات الويب الموجودة في فهرس Google متاحة لمحرك البحث الخاص بك؛ وفي المقابل، لن تظهر صفحات الويب التي لم يزحف إليها محرّك البحث Google في نتائج البحث. إذا أردت أن يتضمّن "محرك البحث المبرمَج" مواقع إلكترونية غير مُدرَجة حاليًا في فهرس Google، أرسِل ملف خريطة الموقع إلى Google Search Console.
تتضمّن خريطة الموقع قائمة بصفحات موقعك الإلكتروني، بالإضافة إلى معلومات حول معدل تعديل صفحات الويب وأهميتها بالنسبة إلى بعضها البعض. يساعد إرسال ملف خريطة الموقع Google في اكتشاف صفحات الويب وتحسين جدول الزحف. لمعرفة المزيد من المعلومات عن ملفات Sitemap، اطّلع على مركز مساعدة مشرفي المواقع واستخدام بروتوكول ملفات Sitemap. إذا كنت مهتمًا بإنشاء ملفات خرائط موقع رائعة، يمكنك الاطّلاع على http://www.sitemaps.org/protocol.php.
ويكون إرسال ملفات Sitemap مفيدًا بشكل خاص إذا كان موقعك الإلكتروني يتضمن ما يلي:
محتوى ديناميكي
صفحات الويب التي لا يمكن لبرنامج Googlebot اكتشافها بسهولة (زاحف الويب من Google)، مثل الصفحات التي تحتوي على ميزات AJAX أو Flash الغنية
عدد قليل من المواقع الإلكترونية التي تضيف روابط تؤدي إليها.
يزحف Googlebot إلى الويب من خلال اتّباع الروابط من صفحة إلى أخرى، وبالتالي إذا لم يكن موقعك الإلكتروني مرتبطًا بشكل جيد، يصعب على الزاحف اكتشافه. إذا كان موقعك الإلكتروني جديدًا، على الأرجح أنّ الكثير من المواقع الإلكترونية لا توجّه المستخدمين إلى موقعك الإلكتروني.
أرشيف ضخم من صفحات المحتوى التي لا تتضمن شبكة قوية من الروابط المتبادلة
يستطيع محرّك بحث Google فهرسة الصفحات التي يمكنه الوصول إليها فقط. لذلك، إذا كنت تستخدم ملف robots.txt أو العلامات الوصفية لبرامج الروبوت في صفحات الويب، تأكّد من عدم حظر برامج الزحف في تلك الصفحات.
التغطية المحسّنة ليست فورية، لأنّ الزحف إلى الصفحات وفهرستها يستغرق بعض الوقت. بعد إضافة صفحات الويب الخاصة بك إلى الفهرس، قد تظهر في كلّ من "بحث Google" و"محرّك البحث المبرمَج".
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eDefine your Programmable Search Engine's coverage using an XML annotations file to manage large site collections and fine-tune search result rankings.\u003c/p\u003e\n"],["\u003cp\u003eAnnotations files use labels to include, exclude, promote, or demote sites within your search engine, providing granular control over search results.\u003c/p\u003e\n"],["\u003cp\u003eUtilize XML annotations to specify URL patterns and associate them with labels, enabling precise control over site inclusion and exclusion.\u003c/p\u003e\n"],["\u003cp\u003eImprove search coverage by submitting a Sitemap to Google Search Console, ensuring your site's pages are indexed and available in your search engine.\u003c/p\u003e\n"],["\u003cp\u003eAdhere to the annotations file size and maximum annotation limits to ensure optimal search engine performance.\u003c/p\u003e\n"]]],[],null,["# Annotations: Defining Sites to Search\n\nThis page describes how to define the coverage of your search engine using a XML annotations file.\n\n1. [Overview](#overview)\n2. [Using the Programmable Search XML Format](#xml)\n3. [Improving Search Coverage](#sitemaps)\n4. [Annotations Limits](#limits)\n\nOverview\n--------\n\nManaging a large collection of sites can be tedious if you're building a large search engine. Instead, you can add and manage a lot of sites by listing them in an annotations file and uploading it. In addition, annotations files give you far greater control over the ranking of search results.\n\nAn annotations file is simply a list of annotations. Each annotation has two components: the site and its associated labels. The label tells Programmable Search Engine how to handle a site; that is, whether a site should be included, excluded, promoted, or demoted. In the [context file](/custom-search/docs/context), you define labels; in the annotations file, you tag sites with the appropriate labels.\n\nWhen you start editing your annotations file, start out with a small number of annotations. It's easier to test and troubleshoot your search engine with a handful of annotations. When you get the results that you expect, incrementally add more annotations.\n\nYou can [upload the annotations file](/custom-search/docs/basics#edit) to the Control Panel. For details about file limits, see the [Annotations Limits](#limits) section.\n\n[Back to top](#top)\n\nUsing the Programmable Search XML Format\n----------------------------------------\n\nIf you want to take advantage of all the features available in the Programmable Search Engine configuration file, XML is the way to go.\n\n\n### XML Annotations\n\nThe following is an example of XML annotations. This annotations file tells Programmable Search Engine to include everything under www.webmd.com/hw/\\* but exclude everything under www.webmd.com/hw/cancer/\\*. \n\n```carbon\n\u003cAnnotations\u003e\n \u003cAnnotation about=\"www.cancer.gov/cancertopics/types/liver/*\"\u003e\n \u003cLabel name=\"_include_\"/\u003e\n \u003cComment\u003egovernment site\u003c/Comment\u003e\n \u003c/Annotation\u003e\n \u003cAnnotation about=\"www.medicinenet.com/liver_cancer/\"\u003e\n \u003cLabel name=\"_exclude_\"/\u003e\n \u003cComment\u003esite on symptoms\u003c/Comment\u003e\n \u003c/Annotation\u003e\n \u003cAnnotation about=\"www.webmd.com/hw/*\"\u003e\n \u003cLabel name=\"_include_\"/\u003e\n \u003cComment\u003egreat sites for patients!\u003c/Comment\u003e\n \u003c/Annotation\u003e\n \u003cAnnotation about=\"www.webmd.com/hw/cancer/*\"\u003e\n \u003cLabel name=\"_exclude_\"/\u003e\n \u003cComment\u003egreat sites for patients!\u003c/Comment\u003e\n \u003c/Annotation\u003e\n \u003cAnnotation about=\"www.oncologychannel.com/*/treatment\"\u003e\n \u003cLabel name=\"_exclude_\"/\u003e\n \u003c/Annotation\u003e\n\u003c/Annotations\u003e\n```\n\nThe annotations file has four elements in the following hierarchy:\n\n- `Annotations` *(root element)*\n - `Annotation`\n - `Label`\n - `Comment` *(optional)*\n\n[Back to top](#top)\n\n### Creating External Annotations\n\nTo list sites you want your search engine to cover, do the the following:\n\n1. Start the file with the `\u003cAnnotations\u003e\u003c/Annotations\u003e` root element.\n2. Create an annotation by adding the `\u003cAnnotation\u003e\u003c/Annotation\u003e` tags, and then define the `about` attribute with the URL pattern of the site. \n\n ```scdoc\n \u003cAnnotations\u003e\n \u003cAnnotation about=\"www.webmd.com/hw/cancer/*\"\u003e\n \u003c/Annotation\u003e\n \u003c/Annotations\u003e\n ```\n3. Associate the site with the search engine by using the `\u003cLabel name=\" \"/\u003e` tag, and specify how that site should be treated by the search engine. You can get the labels for your search engine from the Context file of the search engine. You'll find two labels: one for adding sites to your Programmable Search Engine and one for excluding sites from it. If you have not changed the name of the search engine label in the context file, the label for including sites is in the form of `_include_`, and the label for excluding sites is in the form of `_exclude_`. To avoid errors, copy and paste these labels instead of typing them by hand. \n\n ```scdoc\n \u003cAnnotations\u003e\n \u003cAnnotation about=\"http://www.solarenergy.org/*\"\u003e\n \u003cLabel name=\"_include_\"/\u003e\n \u003c/Annotation\u003e\n \u003c/Annotations\u003e\n ```\n\n A single site can have multiple labels associated with it,\n\n If you have changed the name of the label in the context file, remember to update the `Label name` values in your annotation file.\n4. To add more sites, create and define another `Annotation` element.\n5. Save the XML file.\n\n[Back to top](#top)\n\nImproving Search Coverage\n-------------------------\n\nProgrammable Search Engine is built on top of the Google index. This means that webpages that are in the Google index are available to your search engine; conversely, webpages that have not been crawled by Google will not show up in your search results. If you want your Programmable Search Engine to include sites that are not currently in the Google index, submit a Sitemap to [Google Search Console](https://www.google.com/webmasters/tools/dashboard).\n\nA Sitemap includes a list of pages in your site, as well as information about the update frequency of the webpages and their importance relative to each other. Submitting a Sitemap helps Google discover your webpages and improve the crawling schedule. To learn more about Sitemaps, see the [Webmaster Help Center](http://www.google.com/support/webmasters/bin/answer.py?answer=40318&query=sitemap&topic=&type=) and [Using the Sitemap Protocol](https://www.google.com/webmasters/tools/docs/en/protocol.html). If you are interested in building fancier Sitemaps, see \u003chttp://www.sitemaps.org/protocol.php\u003e.\n\nSubmitting Sitemaps is particularly helpful if your site has the following:\n\n- Dynamic content\n- Webpages that aren't easily discovered by Googlebot (Google's web crawler), such as pages with rich AJAX or Flash features\n- Few websites linking to it. Googlebot crawls the web by following links from one page to another, so if your site isn't well linked, it is hard for the crawler to discover it. If your website is new, probably not many websites are pointing to your site.\n\n- A large archive of content pages that does not have a strong network of cross-linking\n\nGoogle can index only pages it can access. So, if you use [robots.txt](/webmasters/control-crawl-index/docs/robots_txt) file or [robots meta tags](http://www.google.com/support/webmasters/bin/answer.py?answer=79812) in your webpages, make sure those pages don't block crawlers.\n\nImproved coverage is not instantaneous, as it takes some time for the pages to be crawled and indexed. But once your webpages are in the index, they could appear in both Google search and your Programmable Search Engine.\n\n[Back to top](#top)\n\nAnnotations Limits\n------------------\n\nThe following table lists the limits for annotations files that are uploaded to Programmable Search Engine:\n\n**Note:** Follow the limits closely; if you exceed them, your search engine might not show results.\n\n| Aspect | Limit |\n|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| File size (context or annotations files) | 30KB |\n| Maximum number of annotations per search engine | 5,000 **Tip:** If you find your search engine outgrowing the large 5,000-site limit, consider consolidating individual URLs into [URL patterns](https://support.google.com/programmable-search/answer/4513886). |\n\n[Back to top](#top)"]]