浅谈Meta Keywords

前言

Meta Keywords 是一个 HTML 页面中的元素,它包含了关于页面内容的关键字。它帮助搜索引擎了解页面的内容,并对搜索结果进行分类。Meta Keywords 在网页的 head 部分,可以通过的方式添加,关键字的内容通常为页面的主题或内容相关的词语。然而,许多搜索引擎已经忽略了 Meta Keywords 元素,因为其内容可以被滥用。

因此,通过 Meta Keywords 实现非常大的 SEO 作用,显然是假象,应该落在重点关注其他搜索引擎优化技巧,注意不要被骗了。

百度 - 非关键衡量指标

作为中文地区一言堂的百度,显然通过广告躺着赚钱不香吗?个人觉得百度仍是将 Meta Keywords 作为评定标准之一,不过 2018 年,一名来自中国的中文 SEO 专家写了一篇博客,援引 2013 年时一名百度搜索工程师公开发表的观点。

Meta Keywords 早就进了历史的垃圾堆了,我们会直接忽略。

Why You shouldn’t Use Meta Keywords Tag for Baidu SEO Anymore - Jinray China SEO Diary, 2018 年 7 月 4 日

Google - 完全忽略

谷歌公司自 2009 年以来就不再使用 Meta Keywords 标签作为衡量 Ranking 的因素;Google 还会对滥用 Meta Keywords 的网站进行降权惩罚。

Our web search (the well-known search at Google.com that hundreds of millions of people use each day) disregards keyword metatags completely. They simply don’t have any effect in our search ranking at present.

Google does not use the keywords meta tag in web ranking - Google Search Central Blog, 2009 年 9 月 21 日

Unsupported tags and attributes - Google Search Central Documentation

Bing - 完全忽略

Microsoft Bing 于 2014 年正式公开宣布,Meta Keywords 对于 Bing SEO 来说毫无价值:

Today, it’s pretty clear the meta keyword tag is dead in terms of SEO value. Sure, it might have value for contextual ad systems or serve as a signal to ‘bots plying the web looking for topics to target, but as far as search goes, that tag flat lined years ago as a booster.

2020 年,Microsoft Bing 时任 CEO 在 Twitter 上回推时再次表示,Bing 会无视、忽略、排除 Meta Keywords。

Blame The Meta Keyword Tag - Microsoft Bing Blog, 2014 年 10 月 4 日

The meta keyword tag is dead in terms of SEO value for @BingWMC. We exclude it and ignore it - ChristiJOlson, Head of Paid Search at Microsoft, 2020 年 5 月 29 日

Yahoo - 几乎不用

在 2009 年 Search Marketing Expo 大会上,Yahoo 时任搜索部门负责人 Cris Pierry 在问答环节上表示,Yahoo 其实早就不再将 Meta Keywords 作为一个指标。Search Engine Land 于是进行了一项测试,发现 Yahoo 仍然会索引 Meta Keywords 的信息。

Yahoo 官方对此的回复是,当 Yahoo 无法从网页的标题、description、链接、媒体文件等获取有关网页的信息时,Yahoo 仍然会使用 Meta Keywords 作为最后的稻草。

Yahoo Search No Longer Uses Meta Keywords Tag, 2009 年 10 月 6 日 The news came during the Ask The Search Engines session atSMX East in New York today. The search engines were all asked about their support of the tag. Moderator Danny Sullivan noted that only Yahoo provided support of the tag — prompting Cris Pierry, senior director of search at Yahoo, to announce that support actually had been ended unannounced “several” months ago.

Sorry, Yahoo, You DO Index The Meta Keywords Tag, 2009 年 10 月 14 日 What changed with Yahoo’s ranking algorithms is that while we still index the meta keyword tag, the ranking importance given to meta keyword tags receives the lowest ranking signal in our system.
Words that appear in any other part of documents, including the body, title, description, anchor text etc., will take priority in ranking the document – the re-occurrence of these words in the meta keyword tag will not help in boosting the signal for these words. Therefore, keyword stuffing in the keyword tag will not help a page’s recall or ranking, it will actually have less effect than introducing those same words in the body of the document, or any other section.

Yandex - 非关键衡量指标

俄罗斯最大的搜索引擎 Yandex 也是为数不多仍然使用 Meta Keywords 作为衡量指标之一的搜索引擎,但是许多来自俄罗斯的 SEO 专家都曾表示过 Meta Keywords 对改善 Yandex SEO 收效甚微。

Meta tags that Yandex takes into account

“Officially” they say they still do, but I think this is a very low weight factor, even for яндекс. This is the consensus among most of us who have done SEO in Russian :) - orun bhuiyan on Twitter, 2020 年 5 月 30 日

各云厂商密钥配置教程

阿里云密钥获取

打开阿里云官网 获取密钥页面 获取密钥信息 :

云账号 AccessKey 是您访问阿里云 API 的密钥,具有该账户完全的权限,请您务必妥善保管!不要通过任何方式(e.g. Github)将 AccessKey 公开到外部渠道,以避免被他人利用而造成 [安全威胁](https://help.aliyun.com/knowledge_detail/54059.html?spm=5176.2020520153.0.0.57f1336a8PQ1KR) 。

强烈建议您遵循 阿里云安全最佳实践 ,使用 RAM 子用户 AccessKey 来进行 API 调用。

百度云密钥获取

打开 百度云官网 进行登录,登录后选择右上角安全认证 :

点击 Access Key ID 右侧的“显示”,可查看其对应的 Secret Access Key,点击“隐藏”可隐藏对应的 Secret Access Key:

亚马逊 AWS 密钥获取

打开 AWS 官网 进行登录,登录后选择右上角【我的凭证】:

点击【访问密钥】,并且【创建新的访问密钥】:

完成之后即可看到密钥详情:

微软 Azure 密钥获取

通过 微软 Azure 进入所创建的 Azure Web App 的管理界面之后进入 Identity 管理界面

在 Azure 网站最上方的搜索栏里搜索 Key Vault 关键字并进入 Key Vault 管理总界面

点击进入创建好的 Azure Key Vault 实例之后进入 Access Policies 管理界面

击添加访问策略按钮,为需要授权的 principal 添加权限后点击保存按钮即可

Google Cloud 密钥获取

打开 Google Cloud 官网 进行登录,选择对应项目,进入到项目中:

点击左侧的【服务账号】:

再点击上面的【创建服务账号】:

创建完成会下载对应文件】:

将该文件存储到本地,并将存储的绝对路径配置到 s 工具所需的 PrivateKeyData 中

当您在应用中使用 API 密钥时,请确保其在存储和传输期间均安全无虞。公开泄露凭据可能会导致您的帐号遭盗用,这可能会使您的帐号产生预料之外的费用。为帮助确保 API 密钥的安全,请遵循以下最佳做法:

不要直接在代码中嵌入 API 密钥。嵌入代码中的 API 密钥可能会被意外泄露给公众。例如,您可能忘记从共享的代码中移除密钥。您可以将 API 密钥存储在环境变量或应用的源代码树之外的文件中,而不是将 API 密钥嵌入应用中。

不要将 API 密钥存储在应用的源代码树内的文件中。如果将 API 密钥存储在文件中,请将文件保留在应用的源代码树之外,这有助于确保密钥最终不会进入源代码控制系统。 如果您使用公共源代码管理系统(如 GitHub),这种做法尤为重要。

设置应用和 API 密钥限制 。 通过添加限制,您可以降低 API 密钥被盗用时造成的影响。

删除不需要的 API 密钥以最大限度地减少遭到攻击的风险。

定期重新生成 API 密钥。您可以在“凭据”页面 中,针对每个密钥点击重新生成密钥,从而重新生成 API 密钥。然后,更新您的应用以使用新生成的密钥。生成替换密钥后,旧密钥将在 24 小时后失效。

公开发布代码前,先检查您的代码,确保您的代码不包含 API 密钥或任何其他私密信息,然后再公开代码。

华为云密钥获取

打开 华为云官网 进行登录,登录后选择右上角【我的凭证】再选择左侧的 【访问密钥】:

点击新增访问密钥,会弹出提示框进行相关安全验证,通过之后可以看到:

下载之后可以看到自己的密钥信息:

如果访问密钥泄露,会带来数据泄露风险,且每个访问密钥仅能下载一次,为了账号安全性,建议您定期更换并妥善保存访问密钥。

腾讯云密钥获取

打开腾讯云官网 获取密钥页面 获取密钥 :

使用主账号密钥可以无限制地访问您的腾讯云资源,主账号密钥泄露可能造成您的云上资产损失!强烈建议您参照 [最佳实践](https://cloud.tencent.com/document/product/598/10592) 停止使用主账号登录控制台或者使用主账号密钥访问云API,请使用子账号进行相关资源操作。 [如何创建子用户](https://cloud.tencent.com/document/product/598/13674)

nginx报错问题汇总

Q:No input file specified. nginx 报错解决

“No input file specified.”原因在于使用的 PHP5.6 是 fast_cgi 模式,而在某些情况下,不能正确识别 path_info 所造成的错误。

Q:在 nginx 上启用 http2,开启 ssl,开启 HSTS

1.1 检查 OpenSSL

如果系统的 openssl 版本较低,比如低于 1.0.2 ,先升级下

wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz
tar -zxvf openssl-1.0.2k.tar.gz
进入目录编译安装 ./config
make && make install

移除旧版本 OpenSSL

mv /usr/bin/openssl /tmp/
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

检查是否为新版本了 openssl version

OpenSSL 1.0.2k  25 May 2017

1.2 检查 nginx

这里使用的是 v1.22.0 通过 yum 安装的 nginx 版本虽然支持 http2 了,但由于使用的 openssl 版本还是低版本,所以要重新编译安装下,准备必要工具

yum -y install libxml2 libxml2-devel libxslt-devel gd-devel perl-devel perl-ExtUtils-Embed GeoIP GeoIP-devel GeoIP-data gperftools-devel
下载解压

wget https://nginx.org/download/nginx-1.22.0.tar.gz
tar zxvf nginx-1.22.0.tar.gz

1.3 配置编译 nginx

1
./configure --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-openssl=../openssl-1.0.2k

编译安装 make && make install
查看下是否是新版本了nginx -V
关键配置文件如下,注意替换下相应的参数

1
2
3
4
5
6
7
8
9
10
11
12
13
server {
#开启HSTS
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
listen 443 ssl http2 default_server;
server_name xiaoxiaoguo.cn www.xiaoxiaoguo.cn; #这里替换成实际的域名
ssl on;
ssl_certificate cert/214212024460825.pem; #注意证书名称
ssl_certificate_key cert/214212024460825.key;#注意证书名称
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
}

启用新配置,并验证systemctl reload nginx即可

Q:如何把 Apache htaccess 伪静态规则转换成 nginx

可以使用工具进行转换

Q:缺少 lua-nginx-module

安装 LuaJIT2,为 Nginx 添加 Lua 模块的前提需要安装 LuaJIT,这里使用的是 openresty 的 luajit2

1
2
3
4
git clone https://github.com/openresty/luajit2
cd luajit2
make
make install PREFIX=/usr/local/src/LuaJIT

看到 Successfully built LuaJIT 即成功部署,开始配置环境

1
2
3
4
5
export LUAJIT_LIB=/usr/local/LuaJIT/lib
export LUAJIT_INC=/usr/local/LuaJIT/include/luajit-2.1

source /etc/profile
ln -s /usr/local/LuaJIT/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2

nginx: [alert] detected a LuaJIT version which is not OpenResty’s; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty’s LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html))

部分查阅 nginx error 信息反馈 luajit 问题的一般都是安装错了过期版本,并不是 luajit2

现在开始安装 2 个 Nginx Module,分别是ngx_devel_kit: NDK(nginx development kit)模块和lua-nginx-module模块。

编译 Nginx

1
2
3
cd /home/nginx-1.22.0
./configure --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-http_v2_module --with-pcre --with-ld-opt=-Wl,-rpath,/usr/local/src/LuaJIT/lib --add-module=../ngx_devel_kit-0.3.1 --add-module=../lua-nginx-module-0.10.21
make && make install

参考:

1、Nginx 官方说明文档
2、Nginx_dynamic_module

3、Nginx 添加 Lua 模块

4、Nginx 安装 lua-nginx-module

5、Nginx 编译安装 lua-nginx-module