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!
Festivals have always been a time for brands to r...
Where do you think your home is most likely to br...
gossip “Can taking fish oil lower blood lipids?” ...
Everyone is very familiar with bidding accounts, ...
We already know that the sky is filled with twink...
The Webb Telescope (abbreviated as Webb) was offi...
I’m sure you were all flooded with messages about...
[Tong Yao was surrounded by men at the elevator e...
UBS analyzed the current rise of Chinese multinat...
On June 25, according to XDA, Google has added im...
Why should you be an agent for WeChat Mini Progra...
"Baidu Index is a data sharing platform base...
Author: Duan Yuechu and Huang Yanhong When we ste...