Mini Program Search Optimization Guide

View Markdown

Last edited on 2026-06-16

When the crawler accesses pages within Mini Program, it carries the specific user-agent "mpcrawler" and scene value: 1129.

Method to determine whether a request originates from the official search crawler:

The signature algorithm is consistent with the signature algorithm of the Mini Program message push interface. Details

Parameters are set in the request headers, which are: X-WXApp-Crawler-Timestamp X-WXApp-Crawler-Nonce X-WXApp-Crawler-Signature

The signature process is as follows:

  1. Sort the three parameters: token, X-WXApp-Crawler-Timestamp, and X-WXApp-Crawler-Nonce, in lexicographical order.
  2. Concatenate the three parameter strings into a single string and perform SHA-1 encryption.
  3. The developer can compare the encrypted string with X-WXApp-Crawler-Signature to verify that the request originates from WeChat.

1. Pages (url) that can be opened directly when navigating within Mini Program.

Navigation URLs within Mini Program pages are a significant source for our crawlers to discover pages. Additionally, result pages (url) retrieved by search engines must be directly accessible and independent of context state. Specifically: It is recommended that all parameters required by the page be included in the url

2. Prioritize using the navigator component for page navigation.

Mini Program provides two page routing methods: a. navigator component b. Routing APIs, including navigateTo / redirectTo / switchTab / navigateBack / reLaunch It is recommended to use the navigator component. If using APIs is unavoidable, you may disable time locks or variable locks set for clicks when accessed by crawlers.

3. Clear and concise page parameters.

A well-structured, concise querystring with meaningful parameters greatly benefits crawling and subsequent analysis. However, using JSON data as parameters is a poor implementation.

4. Request user authorization, login, phone number binding, etc., only when necessary.

It is recommended to require user authorization only when strictly necessary (for example, reading an article can be done anonymously, while posting a comment requires a username).

5. We do not index any content within the web-view.

We are unable to do this at the moment, and it is likely that we will remain unable to do so in the long run.

6. Set a Clear Title and Page Thumbnail.

The page title and thumbnail play a crucial role in helping users understand the page and improving exposure conversion. Configure the page title and thumbnail using wx.setNavigationBarTitle or custom forwarding content onShareAppMessage. Additionally, the poster / poster-for-crawler attributes have been supplemented for the video and audio components.