SEO 优化配置指南

SEO 优化概述

本文档记录 Dapalm 博客的 SEO 优化配置,包括站点地图、RSS 订阅、搜索引擎提交等。


✅ 已完成配置

1️⃣ 站点地图

生成文件:

  • sitemap.xml - XML 格式站点地图
  • sitemap.txt - 文本格式站点地图

访问地址:

作用:

  • 告诉搜索引擎网站结构
  • 加快页面收录速度
  • 提高爬取效率

安装插件:

1
pnpm add hexo-generator-sitemap

配置:

1
2
3
4
5
6
sitemap:
path: sitemap.xml
template: ./sitemap_template.xml
rel: false
tags: true
categories: true

2️⃣ Robots.txt

访问地址: https://dapalm.com/robots.txt

内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
User-agent: *
Allow: /
Disallow: /js/
Disallow: /css/
Disallow: /img/

Sitemap: https://dapalm.com/sitemap.xml

User-agent: Googlebot
Allow: /

User-agent: Bingbot
Allow: /

User-agent: Baiduspider
Allow: /

作用:

  • 指导搜索引擎爬虫
  • 禁止爬取静态资源
  • 指向站点地图

3️⃣ RSS 订阅

生成文件: atom.xml

访问地址: https://dapalm.com/atom.xml

作用:

  • 用户订阅更新
  • 增加流量入口
  • 提高用户粘性

安装插件:

1
pnpm add hexo-generator-feed

配置:

1
2
3
4
5
6
7
8
feed:
enable: true
type: atom
path: atom.xml
limit: 20
content_limit: 140
order_by: -date
autodiscovery: true

4️⃣ Meta 标签优化

已配置:

1
2
3
4
5
<meta name="author" content="贺武">
<meta name="keywords" content="技术,博客,开发,算法,AI,OpenClaw,Syncthing,PairDrop,Docker">
<meta name="description" content="贺武的个人技术博客,分享技术文章和项目应用">
<meta property="og:title" content="Dapalm">
<meta property="og:description" content="贺武的个人技术博客">

📋 待完成配置

5️⃣ 搜索引擎提交

Google Search Console

步骤:

  1. 访问:https://search.google.com/search-console
  2. 添加网站:https://dapalm.com
  3. 验证方式:HTML 文件验证
  4. 提交站点地图:https://dapalm.com/sitemap.xml

Bing Webmaster Tools

步骤:

  1. 访问:https://www.bing.com/webmasters
  2. 添加网站:https://dapalm.com
  3. 验证方式:HTML 文件验证
  4. 提交站点地图:https://dapalm.com/sitemap.xml

百度搜索资源平台

步骤:

  1. 访问:https://ziyuan.baidu.com
  2. 添加网站:https://dapalm.com
  3. 验证方式:HTML 文件验证
  4. 提交站点地图:https://dapalm.com/sitemap.xml

6️⃣ 结构化数据

待添加:

  • 文章结构化数据
  • 网站结构化数据
  • 作者信息结构化

📊 SEO 检测工具

在线工具

工具 地址 用途
Google PageSpeed https://pagespeed.web.dev/ 性能检测
SEO Analyzer https://www.seobility.net/en/seocheck/ SEO 分析
Site Audit https://neilpatel.com/audits/ 网站审计

命令行工具

1
2
3
4
5
6
7
8
# 检查 robots.txt
curl https://dapalm.com/robots.txt

# 检查 sitemap
curl https://dapalm.com/sitemap.xml

# 检查 RSS
curl https://dapalm.com/atom.xml

📈 SEO 优化效果

预期效果

  • ✅ 搜索引擎收录页面
  • ✅ 用户可通过 RSS 订阅
  • ✅ 搜索结果显示优化
  • ✅ 网站排名提升

监测指标

指标 工具
收录数量 Google/Bing 站长工具
关键词排名 搜索引擎
流量来源 Google Analytics
订阅数量 RSS 统计

🔄 更新流程

发布新文章后

  1. 生成站点地图:
1
2
cd /var/www/dapalm/blog
hexo clean && hexo generate
  1. 提交到搜索引擎(如需立即收录)

📚 相关资源


✅ SEO 优化清单

  • 站点地图
  • Robots.txt
  • RSS 订阅
  • Meta 标签优化
  • URL 结构优化
  • Google Search Console 提交
  • Bing Webmaster Tools 提交
  • 百度搜索资源平台提交
  • 结构化数据配置
  • Google Analytics 集成

配置文件位置:

  • 站点地图模板:/var/www/dapalm/blog/sitemap_template.xml
  • Robots.txt:/var/www/dapalm/blog/source/robots.txt
  • 主配置:/var/www/dapalm/blog/_config.yml

持续优化中…


SEO 优化配置指南
https://dapalm.com/2026/03/01/SEO优化配置指南/
作者
Mars
发布于
2026年3月1日
许可协议