Welcome to Bear2's Secret Garden 💬🐻💬
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

4.收录你的网站

1 什么是Sitemap

在博客上发布文章之后,怎么从搜索引擎找到他们呢?

Sitemap的定义

Sitemap,站点地图是一种文件,您可以在其中提供与您网站中的网页、视频或其他文件有关的信息,还可以说明这些内容之间的关系。Google 等搜索引擎会读取此文件,以便更高效地抓取您的网站。站点地图会告诉 Google 您认为网站中的哪些网页和文件比较重要,还会提供与这些文件有关的重要信息。例如,网页上次更新的时间和网页是否有任何备用的语言版本

简而言之,Sitemap 可以将网站内容的组织结构提交给搜索引擎,告知你的网站上有哪些可供抓取的网页,从而提高网站的曝光率

2 收录网站

Hugo 构建静态页后会生成Sitemap文件,路径为./public/sitemap.xml,文件包含网站主体里的所有链接,点击Expand查看具体内容


 xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  
    https://opsbear2.com/mydocs/4.sitemap/
    2022-08-05T18:25:13+08:00
  
    https://opsbear2.com/mydocs/
    2022-08-05T18:25:13+08:00
  
    https://opsbear2.com/
    2022-08-05T18:25:13+08:00
  
    https://opsbear2.com/prometheus/1.foreword/
    2022-08-05T16:46:51+08:00
  
    https://opsbear2.com/prometheus/
    2022-08-05T16:46:51+08:00
  
    https://opsbear2.com/mydocs/3.favicon/
    2022-08-03T18:26:38+08:00
  
    https://opsbear2.com/kubernetes/2.containerconcept/
    2022-08-03T15:56:45+08:00
  
    https://opsbear2.com/kubernetes/
    2022-08-03T15:56:45+08:00
  
    https://opsbear2.com/windows/1.foreword/
    2022-08-02T11:02:43+08:00
  
    https://opsbear2.com/windows/
    2022-08-02T11:02:43+08:00
  
    https://opsbear2.com/mydocs/2.imagesbed/
    2022-08-01T22:01:36+08:00
  
    https://opsbear2.com/mydocs/1.blogquickstart/
    2022-08-01T17:36:58+08:00
  
    https://opsbear2.com/openvpn/1.quickstart/
    2022-07-31T14:29:33+08:00
  
    https://opsbear2.com/openvpn/
    2022-07-31T14:29:33+08:00
  
    https://opsbear2.com/frontpage/8.images/
    2022-07-29T16:20:07+08:00
  
    https://opsbear2.com/frontpage/
    2022-07-29T16:20:07+08:00
  
    https://opsbear2.com/frontpage/7.icons/
    2022-07-29T16:11:01+08:00
  
    https://opsbear2.com/frontpage/6.buttons/
    2022-07-29T15:58:30+08:00
  
    https://opsbear2.com/frontpage/5.columns/
    2022-07-29T15:52:56+08:00
  
    https://opsbear2.com/frontpage/4.expand/
    2022-07-29T15:38:18+08:00
  
    https://opsbear2.com/frontpage/3.hints/
    2022-07-29T15:22:07+08:00
  
    https://opsbear2.com/frontpage/2.tags/
    2022-07-29T15:12:02+08:00
  
    https://opsbear2.com/golang/1.foreword/
    2022-07-29T10:39:27+08:00
  
    https://opsbear2.com/kubernetes/1.beginning/
    2022-07-29T10:39:27+08:00
  
    https://opsbear2.com/golang/
    2022-07-29T10:39:27+08:00
  
    https://opsbear2.com/python/1.foreword/
    2022-07-29T10:39:26+08:00
  
    https://opsbear2.com/python/
    2022-07-29T10:39:26+08:00
  
    https://opsbear2.com/frontpage/1.toc/
    2022-07-28T23:28:30+08:00
  
    https://opsbear2.com/tags/
  

接下来需要将站点内容提交给搜索引擎收录,例如谷歌、百度等等

谷歌收录入口 百度收录入口

以谷歌为例提交收录

1.添加站点和txt认证

image-20220808110944758

image-20220808111637757

2.新增Sitemap地址,提交

地址:https://opsbear2.com/sitemap.xml

image-20220808112205457

3.验证收录结果

浏览器输入site:yourwebsite,一般提交后n个自然日后会看到提交进度

image-20220808113044850