现在国内备案挺严格的,阿里云备案初审的时候,就必须关站,不管用什么方法,网站无法打开,那样才能通过阿里云的初审,但是云测速之前服务器在香港,网站正常做着的,不想关站导致搜索引擎降权。本来云测速备案的时候是打算采用网上的方法,屏蔽本省所有IP的访问的,收集了半天本省的IP地址,然后设置这些IP不给解析,发现解析一会儿生效一会儿不生效,这种方法还是不够靠谱,并不能很好地解决我们的问题。于是云测速用了另一个办法,既可以方便备案,搜索引擎那边也没问题,自己还能正常更新网站。一起来看看吧。
首先,我们想要搜索引擎不降权的话,就必须在域名解析的地方专门做一个A记录解析给搜索引擎,那样让搜索引擎能够正确访问到我们的网站,普通A记录就删掉,以免备案的时候管局发现我们的网站能打开,然后拒绝我们的备案。
上面的准备工作做好以后,就到了重头戏了,对SEO来说,网站每天更新文章是很好的事情,让搜索引擎的蜘蛛养成习惯来抓取我们的网站,定时定量地更新文章有利于我们网站的SEO的,那么我们要怎么做呢?很简单,修改本地host文件,让你的电脑直接解析到境外服务器的IP上,不受域名解析的影响,不过这个方法的前提是你的网站在境外有服务器,并正常运作。
我们先打开电脑的host文件,具体位置是C:\WINDOWS\system32\drivers\etc
打开以后,找到hosts文件并打开
hosts原文件如下
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost
在最后新增如下内容:
127.0.0.1 www.cloud-ping.com
表示域名“www.cloud-ping.com”指向的ip为127.0.0.1,把127.0.0.1改成你境外服务器的IP地址,云测速以我的境外IP地址是99.88.77.66为例。修改后文件内容如下:
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 99.88.77.66 www.cloud-ping.com
修改并保存以后,就可以用www.cloud-ping.com打开你的网站啦,可以用ping工具测试一下,看你的网站是否是解析到99.88.77.66了。
这个方法主要适用于原本境外有服务器,并正常做站,想在国内备案,但是不想关站导致搜索引擎降权的朋友。