Applet pages will include sitemap

Micro-channel is now open within the search applet, applet page you will be more likely to show in public micro-channel search and other scenes. When a developer to allow micro-channel index, micro-channel will, index the page content applet in the form of reptile.

If not appropriate for personal information such as user information, trade secrets, and other adult-related content there is a small program, do not want to micro-channel index. Close can be included in the following manner.

There are three ways to turn off the pages will include

  • 1. Configuration applet sitemap.json
  • 2. management background "pages will include settings" page to configure the applet whether to allow micro-channel index
  • 3. applet page login state is set to take

Configuration applet sitemap.json

sitemap.json file in the root directory of the applet used to configure the applet and whether to allow the page to be indexed micro letter, the contents of the file as a JSON object, if not sitemap.json, the default is to allow all pages to be indexed; sitemap.json It has the following properties:

{
  "rules": [
    {
      "action": "allow",   // 是否能被索引 allow,disallow  默认allow
      "page": "path/to/page", //页面的路径,* 表示所有页面, "params": ["a", "b"], //被本规则匹配时可能使用的页面参数名称的列表 "matching": "exact" // 页面在被本规则匹配时,此参数说明 params 匹配方式 "priority": number // 非必填,优先级,值越大则规则越早被匹配 } ] } //matching 取值说明 exact 当小程序页面的参数列表等于 params 时,规则命中 inclusive 当小程序页面的参数列表包含 params 时,规则命中 exclusive 当小程序页面的参数列表与 params 交集为空时,规则命中 partial 当小程序页面的参数列表与 params 交集不为空时,规则命中 
Example 1
{
  "rules": [
    {
      "action": "allow",
      "page": "path/to/page", "params": ["a", "b"], "matching": "exact" }, { "action": "disallow", "page": "path/to/page" } ] } path/to/page?a=1&b=2 => 优先索引 path/to/page => 不被索引 path/to/page?a=1 => 不被索引 path/to/page?a=1&b=2&c=3 => 不被索引 其他页面都会被索引 
Example 2
{
  "rules": [
    {
      "action": "allow",
      "page": "path/to/page", "params": ["a", "b"], "matching": "inclusive" }, { "action": "disallow", "page": "path/to/page" } ] } path/to/page?a=1&b=2 => 优先索引 path/to/page?a=1&b=2&c=3 => 优先索引 path/to/page => 不被索引 path/to/page?a=1 => 不被索引 其他页面都会被索引 
Example 3
{
  "rules": [
    {
      "action": "allow",
      "page": "path/to/page", "params": ["a", "b"], "matching": "exclusive" }, { "action": "disallow", "page": "path/to/page" } ] } path/to/page => 优先索引 path/to/page?c=3 => 优先索引 path/to/page?a=1 => 不被索引 path/to/page?a=1&b=2 => 不被索引 其他页面都会被索引 
Example 4
{
  "rules": [
    {
      "action": "allow",
      "page": "path/to/page", "params": ["a", "b"], "matching": "partial" }, { "action": "disallow", "page": "path/to/page" } ] } path/to/page?a=1 => 优先索引 path/to/page?a=1&b=2 => 优先索引 path/to/page => 不被索引 path/to/page?c=3 => 不被索引 其他页面都会被索引 

No sitemap.json default all pages can be indexed

Pages will include settings

Log applet micro-channel public platform, set up under页面收录设置

 
 

 

This setting is enabled by default, unless the developers take the initiative to shut down or adjusted, otherwise it will continue to be in the "on" state.

Applet page login state is set to take

Within crawler access applet page, you will carry a specific user-agent: mpcrawlerand scene values1129

onLoad(options) {
  // 获取场景值
  var scence = options.scene
  if (scence == 1129) {
    wx.redirectTo({
      url: '/pages/login/login' }) } } 
 


 

 

 

 

 

.

Guess you like

Origin www.cnblogs.com/jianxian/p/11140767.html