从此
📄文章 #️⃣专题 🌐酷站 👨‍💻技术 📺 📱

SEO - 搜索引擎优化


综合

浏览器输入 congci 后按 Ctrl+Enter,等同 www.congci.com 回车,https无法访问则会尝试一次http协议。
Google.com搜索文件语法 filetype:ogv logo  查询网站索引 site:congci.com
据观察:周6周日或节假日访问量较低,上午访问量较低。

中国搜索引擎市场份额

百度统计 百度搜索资源平台

Google搜索控制台 Bing WMT

Google趋势 油管频道分析 域名检测工具


SEO
时刻对照改进:Google搜索中心SEO文档富媒体搜索

robots.txt定义通用URL路径

URL结构:
  首选 - https://example.com/main/x
  次选 - https://example.com/main/x/
  避免 - https://example.com/main/x.html

  常规约定 - 
    产品页(标题位于ID之前,容易被访客看到/或用更宽泛的items) https://x.y/main/core/products/page-title--------------------------_88888888-4444-4444-4444-121212121212
    文章、资讯页 https://x.y/main/core/articles/page-title--------------------------_88888888-4444-4444-4444-121212121212

综述:
  术语 - 搜索引擎结果页面(SERP)。
  URL Slug - 仅比纯标识易读一些,增加用户的点击欲望和站长的日志识别,并不参与搜索匹配行为。

爬虫执行JavaScript:
  经观察,Baiduspider-render、YisouSpider会执行内外部脚本,而Googlebot只会执行内嵌脚本,外部脚本则不执行 - <script defer="defer" src="x.js"></script>

翻译:
  https://info-congci-com.translate.goog/main/infomations/articles/03c2067a-5615-11e9-a30c-418ed863145e?_x_tr_sl=zh-CN&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc

HTML模板 - 搜索引擎爬虫可能不会补齐省略的<body>等标签,故写完整。

  <!DOCTYPE html>
  <html>
    <head>
      <title>搜索引擎结果页标题 - 25至50字</title>
      <meta name="description" content="搜索引擎结果页描述,50字至150字,无上限但会截断,展示时做页面区分用,供访客决定是否点击,跟查询匹配及排名关联不大。" />
      <meta charset='utf-8' /><!-- ... -->
      <meta name='viewport' content='width=device-width' /><!-- 使访问体验更友好 -->
    </head>
    <body>
      <h1>x</h1>
    </body>
  </html>

HTML模板body标签内SEO写法:


描述
网站标题 - 通常取首页title标签或结构化数据指定。
网站站标 - 。。。
网页标题 - 通常取title标签或h1标签
各大搜索引擎SEO
原则
网页标题 - 第一个可见 <h1> 元素。
均不再支持keywords meta标签,但支持description meta标签。
API响应加禁止索引header头 X-Robots-Tag: noindex
Google
  • Google搜索控制台->网页索引编制:“来源”列标为“Google”的网站主无法干预,若主动将网页加入了“已被 robots.txt 屏蔽”,即使被报告也不用理会。
    
    搜索展示网址最上方为网站名称,可通过格式化方式告知搜索引擎。
    第一个可见 <h1> 元素;
    若 div、span 或 section 元素存在 <div data-nosnippet>exclude content...</div> 属性,则该标签内容不会出现在摘要中。
  • ...
Bing
  • 每个网页必须存在,且只存在一个<h1>网页标题</h1>,同时标题字数要达到50个(冗余至55个吧)。
  • ...
Baidu
  • ...
  • 爬虫特点:
      先用PC的UA爬取:Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)
      数秒后手机爬取:Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)
    
    注意事项- 百度站长客服据观察,任何提问均回复“情况合理正常”或“符合预期”!
    百度抓取诊断 - 报“抓取异常信息:socket 读写错误”: 偶发则为网络波动,若过半比例,则可能是海外服务器回程丢包所致(亲测Vultr东京机房丢包率50%),致使等待3秒以上,国内服务器通常下载时长为1秒内。 或Web服务器防火墙未放行80、443、ICMP端口所致;PowerShell亲测HTTP/1正常(curl -v http://congci.com/ads.txt),HTTP/2则响应received -1-byte;

推广、优化

将网址贴至外部后,存在无法修改的可能性,故将其包装为可跳转的链接形式。
网址约定
YouTube主频道跳转 - https://ytone.openle.com/

根据Key跳转网址格式:
https://tsc.openle.com/main/other/go-static/v1/our-webpage/default/openness.openle.com_ad-blocking
https://tsc.openle.com/main/other/go-static/v1/our-webpage/default/passed.app_chinese-converter
https://tsc.openle.com/main/other/go-static/v1/our-webpage/default/passed.app_network-ip-dns
https://tsc.openle.com/main/other/go-static/v1/our-webpage/default/passed.app_json-formatter

YouTube跳转网址格式:
https://tsc.openle.com/main/other/go-static/v1/our/yt/ByD_D4I2xks

YouTube短视频跳转网址格式:
https://tsc.openle.com/main/other/go-static/v1/our/yts/exLFamVaxek

YouTube视频和短视频封面跳转网址格式:
https://tsc.openle.com/main/other/go-static/v1/our-images/yt/c-hrYDuH5ms/standard.webp


搜索引擎爬虫IP地址段

(稍后将推出IP地址反查搜索引擎爬虫功能)

user-agent 备注
百度
Baiduspider-render/2.0(已取代Baiduspider/2.0)
Baiduspider-image

常见百度旗下同类型蜘蛛还有下面这些:Baiduspider-mobile(抓取wap)、Baiduspider-image(抓取图片)、Baiduspider-video(抓取视频)、Baiduspider-news(抓取新闻)

百度蜘蛛IP:
  • 220.181.108.76 ~ 220.181.108.187
  • 123.125.71.92 ~ 123.125.71.113
Bing
bingbot/2.0

HTTP Header -
from: bingbot(at)microsoft.com
Bing蜘蛛IP:
  • 157.55.39.97 ~ 157.55.39.98
  • 40.77.167.36 ~ 40.77.167.87
  • 207.46.13.1 ~ 207.46.13.255
Google
Googlebot/2.1
Google蜘蛛IP:
  • 66.249.74.78 ~ 66.249.74.80
  • 66.249.71.53 ~ 66.249.71.124
  • 66.249.65.93 ~ 66.249.65.99
搜狗sogou
Sogou+web+spider/4.0
搜狗蜘蛛IP:
  • 61.135.189.97 ~ 61.135.189.98
  • 123.126.113.189
神马搜索
Yisouspider

原属一搜蜘蛛。

神马搜索IP:
  • 42.156.137.103
360搜索
360Spider
360搜索蜘蛛IP:
  • 180.153.232.*
  • 180.153.234.*
  • 180.153.236.*
  • 180.163.220.*
  • 42.236.101.*
今日头条
Bytespider
今日头条蜘蛛IP:
  • 111.225.149.2 ~ 111.225.149.249
  • 110.249.202.2 ~ 110.249.202.249
Yahoo
Yahoo!
Yahoo蜘蛛IP:
  • 68.180.230.46、68.180.228.253

Google Search Console流程为先发现再抓取最后索引:【已发现 - 尚未编入索引】、【已抓取 - 尚未编入索引】

【谷歌官方已废弃】Google爬虫遇到twitter.com/#!/username网址时会转向twitter.com/?_escaped_fragment_=/username抓取。