# Weixin Mini Program Search Optimization Guide
When the crawler accesses a page within Weixin Mini Program, it carries a user-agent "mpcrawler" and the scene value: 1129
Methods for determining whether a request originates from an official search crawler:
The signature algorithm is consistent with that of the Weixin Mini Program message push interface. Details
The parameters are set in the header of the request and are: X-WXApp-Crawler-Timestamp X-WXApp-Crawler-Nonce X-WXApp-Crawler-Signature
The signature process is as follows:
- willtoken、X-WXApp-Crawler-Timestamp、X-WXApp-Crawler-NonceThree parameters for dictionary sequencing
- Concatenate three argument character strings into a string for sha1 encryption 3.The developer gets an encrypted character string that can be compared to X-WXApp-Crawler-Signature, identifying the request as coming from WeChat.
# 1. Weixin Mini Program The jump page (url) can be opened directly.
Weixin Mini Program The URL within the page is an important source for our crawler to find the page, and the result page (URL) of the search engine must be able to open directly, independent of the context. Special: The parameters required for the suggested page are included in the url
# 2. The navigator component is preferred for page jumps.
Weixin Mini Program provides two types of page routing: A. navigator component B. Routing APIs, including navigateTo / redirectTo / switchTab / navigateBack / reLaunch It is recommended to use the navigator component, and if you must not use the API, you can block the time lock or variable lock set for clicks when the crawler accesses.
# 3. Clear and concise page parameters.
A querystring with clear, concise structure and meaningful parameters is helpful for crawling and subsequent analysis, but using JSON data as parameters is a poor implementation.
# 4. When necessary, the user is requested to authorize, log in, bind a mobile phone number, etc.
It is recommended that user authorization be required only when necessary (for example, to read articles anonymously, and to post comments anonymously).
# 5. We do not include anything in web-view.
We won't be able to do that for the time being, and in the long run, we may not be able.
# 6. Set a clear title and a thumbnail of the page.
Page titles and thumbnail images play an important role in understanding the page and improving exposure conversion. Through wx.setNavigationBarTitle or custom forwarding content onShareAppMessage to the page title and thumbnail settings, also for video, audio components to complement the poster / poster-for-crawler properties.