WeChat has now opened search within mini-programs . Developers can configure whether their mini-program pages are allowed to be indexed by WeChat through sitemap.json configuration or by managing the backend page inclusion switch. When developers allow WeChat indexing, WeChat will index the page content of the Mini Program through crawlers. When a user's search term triggers the index, the Mini Program's page may be displayed in the search results. When a crawler accesses a page in a mini program, it carries a specific user-agent: mpcrawler and a scenario value: 1129. It should be noted that if the page data discovered by the mini program crawler is inconsistent with the presentation of the real user, the page will not be included in the index. Sitemap Configuration The sitemap.json file in the root directory of the Mini Program is used to configure whether the Mini Program and its pages are allowed to be indexed by WeChat. The file content is a JSON object. If there is no sitemap.json, all pages are allowed to be indexed by default; sitemap.json has the following properties: Configuration items
rulesThe rules configuration item specifies the index rules. Each rule is a JSON object with the following properties:
matching value description
Configuration ExampleExample 1 { "rules":[{ "action": "allow", "page": "path/to/page", "params": ["a", "b"], "matching": "exact" }, { "action": "disallow", "page": "path/to/page" }]}
Example 2 { "rules":[{ "action": "allow", "page": "path/to/page", "params": ["a", "b"], "matching": "inclusive" }, { "action": "disallow", "page": "path/to/page" }]}
Example 3 { "rules":[{ "action": "allow", "page": "path/to/page", "params": ["a", "b"], "matching": "exclusive" }, { "action": "disallow", "page": "path/to/page" }]}
Example 4 { "rules":[{ "action": "allow", "page": "path/to/page", "params": ["a", "b"], "matching": "partial" }, { "action": "disallow", "page": "path/to/page" }]}
Note: If there is no sitemap.json, all pages can be indexed by default Note: {"action": "allow", "page": "*"} is the default rule with the lowest priority. All pages without "disallow" are indexed by default. |
<<: Community operation: How can community fission activities achieve high conversion rates?
>>: The 4 user quadrants of product promotion!
After buying a Mercedes-Benz and driving it for t...
Emotional Cycle Theory - Introduction to the reso...
1. META/LINK related 1. Baidu prohibits transcodi...
Image source: Pinterest Dumb Guess the insects by...
Audit expert: Ji Hongzeng PhD candidate in Refrig...
I have waited for a long time and finally waited ...
When it comes to online novels, most people are f...
I believe that the "Transformers" serie...
1. What is Shenma Search ? Shenma Search is a mob...
The development of enterprises in the Internet er...
In the Internet age, short videos are king. 2018 ...
1 Project Background Children's English learn...
Original title: Hua Chunying tweeted: China has p...