wordpress谷歌字体_如何在WordPress中正确禁用Google AMP

wordpress谷歌字体

Do you want to disable Google AMP in WordPress? Many bloggers and websites who jumped on the Google AMP bandwagon are now disabling it for different reasons. The challenge is that disabling Google AMP is not as simple as one would hope for. In this article, we will show you how to properly disable Google AMP in WordPress.

您是否要在WordPress中禁用Google AMP? 许多跳入Google AMP潮流的博客作者和网站现在由于不同的原因而禁用了它。 挑战在于,禁用Google AMP并不像人们希望的那么简单。 在本文中,我们将向您展示如何在WordPress中正确禁用Google AMP。

How to Properly Disable Google AMP
为什么和谁应该在WordPress中禁用Google AMP (Why and Who Should Disable Google AMP in WordPress)

Accelerated Mobile Pages or AMP is an open source initiative with aim to make the web faster for mobile users and improve user experience.

加速的移动页面或AMP是一项开放源代码计划,旨在为移动用户加快网络速度并改善用户体验。

It does so by serving pages with bare minimal HTML and JavaScript. This allows the content to be hosted on Google AMP Cache. Google can then serve this cached version to users instantly when they click on your link in the search results.

它通过提供几乎没有HTML和JavaScript的页面来实现。 这样就可以将内容托管在Google AMP缓存中。 然后,当用户在搜索结果中单击您的链接时,Google可以立即向用户提供此缓存的版本。

AMP pages appearing in Google search results

We shared our concerns and issues raised by other bloggers regarding AMP in our guide on how to set up Google AMP in WordPress.

我们在有关如何在WordPress中设置Google AMP的指南中分享了其他博客作者对AMP的关注和问题。

Since then many website owners, influential bloggers, and online publications have stopped using AMP. Many of them shared the reasons behind their decision.

从那时起,许多网站所有者,有影响力的博客和在线出版物都停止使用AMP。 他们中的许多人分享了做出决定的原因。

For example, Alex Kras wrote in great length about why he decided to disable AMP on his website.

例如, 亚历克斯·克拉斯 ( Alex Kras)写了很长的篇幅,讲述了他为什么决定在其网站上禁用AMP。

He also shared what happened one month after he disabled Google AMP.

他还分享了停用Google AMP一个月后发生的事情。

Traffic rate appears to stay roughly the same and all metrics appear to improve. To be fair, I did publish four new articles since I disabled AMP, so my numbers could have had a nice bump from the new content.

流量速率似乎保持大致相同,并且所有指标似乎都在提高。 公平地说,自从我禁用AMP以来,我确实发布了四篇新文章,因此我的人数可能与新内容相比有了很大的提高。

Here are some of the concerns shared by many influencers, bloggers, and developers.

这是许多影响者,博客作者和开发人员共同关心的一些问题。

Drastic Drop in Conversion Rates

转化率急剧下降

AMP uses a restrictive set of HTML/JS. Site owners cannot do much about encouraging users to subscribe, fill out contact forms, or buy stuff.

AMP使用一组限制性HTML / JS。 网站所有者在鼓励用户订阅 ,填写联系表或购买东西方面无能为力。

Lower Pageviews by Mobile Users

移动用户的较低浏览量

AMP does not show your website’s navigation menus, sidebars, or other content discovery features. This causes significant drop in pageviews by mobile users.

AMP不显示您网站的导航菜单 ,侧边栏或其他内容发现功能。 这会导致移动用户的浏览量大幅下降。

In fact some user experience experts suggest that the close button on top actually encourages users to return back to Google search after reading your article instead of browsing your website.

实际上,一些用户体验专家建议,顶部的关闭按钮实际上会鼓励用户在阅读您的文章后返回Google搜索,而不是浏览您的网站。

Close button in AMP viewer on Android

Lower User Engagement

降低用户参与度

Many websites thrive on user interactions, like click to tweet widgets, user ratings, comments, and so on. Google AMP makes it quite difficult for website owners to keep users engaged and interact with their content.

许多网站都依靠用户互动而蓬勃发展,例如单击推特微件 ,用户评级,评论等。 Google AMP使网站所有者很难保持用户的参与度并与其内容进行交互。

Should You Disable Google AMP?

您应该禁用Google AMP吗?

The answer to this question actually depends on your website. If mobile users make the majority of your audience, then you may still want to use AMP.

这个问题的答案实际上取决于您的网站。 如果移动用户占了您的听众的大多数,那么您可能仍想使用AMP。

On the other hand, if you have tried Google AMP, and it has negatively affected your conversion rates, then you should probably disable Google AMP on your website.

另一方面,如果您尝试过Google AMP,但它对您的转化率产生了负面影响,那么您可能应该在网站上禁用Google AMP。

Contrary to popular belief, Google does not penalize websites for not using AMP. You can still improve your website’s speed and performance on mobile to compete for mobile search audience.

与流行的看法相反,Google不会因不使用AMP而对网站进行处罚。 您仍然可以提高网站在移动设备上的速度和性能 ,从而与移动搜索受众群体竞争。

步骤1.在WordPress中禁用Google AMP (Step 1. Disabling Google AMP in WordPress)

There are a couple of WordPress plugins that allow you to add AMP support to your website. The basic settings remain the same regardless of what plugin you are using.

有几个WordPress插件可让您向网站添加AMP支持。 无论您使用什么插件,基本设置都保持不变。

First thing you need to do is to deactivate the AMP plugin. Simply visit the plugins page and click on the deactivate link below AMP plugin.

您需要做的第一件事是停用AMP插件。 只需访问插件页面,然后单击AMP插件下方的停用链接即可。

Deactivate AMP

Deactivating the plugin will disable the AMP support on your website.

停用插件将禁用您网站上的AMP支持。

第2步:设置重定向 (Step 2. Setting up Redirects)

Disabling the AMP plugin will remove the AMP version of your articles from the website, but that alone is not enough specially if you have AMP turned on for more than a week.

禁用AMP插件会从网站上删除您文章的AMP版本,但是仅当打开AMP一周以上时,仅这还不够。

There is a very good chance that Google already have those pages cached in their index, and it will keep showing those pages in search results.

Google很有可能已经在索引中缓存了这些页面,并且它将继续在搜索结果中显示这些页面。

To fix this problem, you need to redirect users coming to AMP pages to the regular non-AMP pages.

要解决此问题,您需要将进入AMP页面的用户重定向到常规的非AMP页面。

We will show you two different methods to set up redirects for Google AMP. You can choose the one that’s most convenient for you.

我们将向您展示两种不同的方法来设置 Google AMP的重定向 。 您可以选择最方便的一种。

Method 1: Using a Redirect Plugin

方法1:使用重定向插件

First you will need to install and activate the Redirection plugin. For more details, see our step by step guide on how to install a WordPress plugin.

首先,您需要安装并激活重定向插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, go to Tools » Redirection page to set up redirects.

激活后,转到工具»重定向页面以设置重定向。

AMP Redirect

First, add the following code in the source URL field:

首先,在源URL字段中添加以下代码:


/(.*)\/amp

In the target URL field, you need to add your website’s URL in the following format:

在目标网址字段中,您需要以以下格式添加网站的网址:


http://example.com/$1

Don’t forget to replace example.com with your own domain name.

不要忘记用您自己的域名替换example.com。

Now check the Regex checkbox and select Redirections under the Group drop down menu.

现在,选中“正则表达式”复选框,然后在“组”下拉菜单下选择“重定向”。

Finally click on the ‘Add Redirect’ button to save your changes.

最后,点击“添加重定向”按钮以保存您的更改。

You can now visit an AMP page on your website to see if the redirect is working properly.

现在,您可以访问网站上的AMP页面,以查看重定向是否正常运行。

Method 2: Manually Set Redirects in .htaccess

方法2:在.htaccess中手动设置重定向

If you don’t want to use a plugin to setup redirects, then you can setup redirects using the .htaccess file on your WordPress hosting account.

如果您不想使用插件来设置重定向,则可以使用WordPress托管帐户上的.htaccess文件来设置重定向。

First you will need to connect to your website using a FTP client or File Manager in cPanel. Once connected, you need to locate the .htaccess file in your website’s root folder and edit it.

首先,您需要使用cPanel中的FTP客户端或文件管理器连接到您的网站。 连接后,您需要在网站的根文件夹中找到.htaccess文件并进行编辑。

Simply add the following code at the bottom of your .htaccess file:

只需在.htaccess文件底部添加以下代码:


// Redirect AMP to non-AMP 
RewriteEngine On
RewriteCond %{REQUEST_URI} (.+)/amp(.*)$
RewriteRule ^ %1/ [R=301,L]

Don’t forget to save your changes and upload the file back to your server.

不要忘记保存更改并将文件上传回服务器。

You can now visit the AMP version of any post on your website to make sure that redirect is working as intended.

现在,您可以访问网站上任何帖子的AMP版本,以确保重定向按预期进行。

We hope this article helped you properly disable Google AMP in WordPress. You may also want to see our step by step ultimate WordPress SEO guide for beginners.

我们希望本文能帮助您正确禁用WordPress中的Google AMP。 您可能还想看看我们针对初学者的逐步终极WordPress SEO指南

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-properly-disable-google-amp-in-wordpress/

wordpress谷歌字体

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值