如何在cyberpanel部署的网站更换域名?

在CyberPanel部署的网站更换域名,需要经过以下步骤,以确保更换过程对网站流量和搜索引擎收录的影响最小化:

1. 更换DNS绑定域名

  • 解绑旧域名,换绑新域名1

2. 301重定向(非常重要!)

  • 将旧域名的链接通过301重定向跳转到新链接1
    • URL规则: 强烈建议网站改版的链接按照规则来更新,最理想的规则是a.com/1.html => b.com/1.html,即网站内容不变,仅仅是更换域名15.
  • 在CyberPanel上设置301重定向47
    • 找到网站的设置,添加重定向规则6
    • 将不带www的域名重定向到www域名:
    textRewriteEngine On RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

*目的:*将通过HTTP访问example.com的请求重定向到https://www.example.com4
* 将www.example.com/folder替换为你想要强制启用SSL的实际域名和文件夹4

    • 避免302跳转: 确保重定向是301永久重定向7

3. 在搜索引擎平台提交网站改版

  • 去百度站长平台反映你要换域名了1
  • 去Google Search Console来提交网站改版1

4. 网站统计代码重置

  • 重置网站统计代码,例如谷歌Analytics、百度统计、360站长、cnzz1

5. 网站地图重新提交

  • 在各大平台重新提交XML网站地图文件,例如百度统计(+robot.txt)、360站长、谷歌console1

6. 新页面中替换旧URL链接

  • 将新页面中指向老域名(旧URL)的链接替换成新域名25

7. 检查死链并提交

  • 借助第三方软件全站爬取所有链接,寻找和收集死链,并将死链放在一个文本文档,上传服务器,并且文件地址添加到站长工具的死链提交中2

其他注意事项

    • URL规则: 新旧页面URL要有规则可循,这对后期的301跳转,及站长工具提交改版规则都是有好处的25
  • 新旧URL301跳转关系:换域名后,一定要将老页面301跳转到对应的新页面,而不是将老域名所有页面全部跳转到新域名首页25。301跳转前后两个页面的内容主体一定要保持一致25
  • 在站长工具中提交改版规则25。只要新旧页面有规则可循,即可在站长工具中提交改版规则25
  • 改版跳转关系请保持至少三个月,直到新站流量完全稳定3
  • 对于使用WordPress或typecho的网站,需要在网站后台的设置中更改网站域名6
  • 建议等域名快到期或者搜索引擎收录稳定后在注销备案6
  • 避免网站停止访问时间过长3

更换域名会对网站排名和收录造成影响,不推荐更换域名3。如果必须更换域名,按照上述步骤操作,将影响降到最低3.

Citations:

  1. https://www.cxmoe.com/article/3328.html
  2. https://www.xinnet.com/knowledge/2142342371.html
  3. https://ziyuan.baidu.com/college/articleinfo?id=1273
  4. https://www.xcbtmw.com/29963.html
  5. https://ziyuan.baidu.com/college/articleinfo?id=1277
  6. https://www.misterma.com/archives/799/
  7. https://www.xiapilu.com/web/web-tutorial/openlitespeed-cyberpanel-301-302.html
  8. https://www.miliol.org/18171.html
  9. https://www.idcspy.com/63473.html
  10. https://www.idcfavourites.com/archives/1017.html
  11. https://www.advertcn.com/thread-114961-1-1.html
  12. https://www.moerats.com/archives/253/
  13. https://www.996host.com/archives/9742
  14. https://www.jb51.net/cms/68406.html
  15. https://onmyodev.com/2024/02/cyberpanel%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/
  16. https://www.banzhuti.com/cyberpanel-self-signed-certificate-issue.html
  17. https://www.vpsss.net/28148.html
  18. https://www.bandwagonhost.net/4475.html
  19. https://www.xiapilu.com/web/web-tutorial/cyberpanel-settings.html
  20. https://www.xcbtmw.com/29567.html/comment-page-3
  21. https://www.xcbtmw.com/29567.html
  22. https://blog.littlefox.me/archives/548
  23. https://wpjian.com/wordpress-seo/2021103150374.html
  24. https://www.jb51.net/cms/486880.html
  25. https://www.moerats.com/archives/322/
  26. https://support.huaweicloud.com/topic/281363-1-W
  27. https://www.50gw.com/archives/13668
  28. https://zhuji.gd/4987.html
  29. https://www.vedfolnir.com/technology/webmaster/cyberpanel-litespeed-server-ip-change/
  30. https://www.vpsdx.cn/4034.html
  31. https://wzfou.com/cyberpanel/
  32. https://wzfou.com/cyberpanel-lsc/
  33. https://www.jb51.net/server/cyberpanel.htm
  34. https://www.996host.com/archives/9731

留下评论