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!
When smartphones were first introduced, the mobil...
WeChat Mini Program is an application that users ...
Tesla founders Elon Musk and Jack Ma seem to have...
It is a fact that tool- type products have low op...
Boge Taobao customer traffic: 1,000 followers in ...
In recent years, with the rapid development of mo...
There has never been a lack of great women on the...
One, two, three...prepare to sing Let's learn...
Among the many ways to find customers, telephone ...
On my first day at work in 2019, I was assigned n...
The annual grand festival is coming I guess every...
WM Motor, which is about to deliver in September,...
This is the 4937th article of Da Yi Xiao Hu The m...
Fast Company's technology editor Harry McCrac...
The gameplay of the expanding red envelope is ver...