就 Google 而言,重定向到我网站的移动友好版本是否使其成为响应式网站?

Does redirecting to a mobile-friendly version of my site make it a responsive website, as far as Google is concerned?

假设我的网站目前没有响应。我可以修改 CSS 和 HTML 使其响应(通过使用宽度技术甚至 CSS 中的媒体功能)现在这将 100% 工作并使我的网站移动友好。

另一种解决方案是创建一个全新的移动模板并将其加载到几乎不同的站点下,因此当用户从移动设备访问该站点时,它会将他们重定向到一个新站点 "mobile.websitename.com"。

从 Google 的角度来看,这会使初始站点(域中没有 "mobile" 的无响应站点)响应吗?还是 Google 不够聪明,无法识别移动用户将被重定向到网站的移动版本?

Google 强烈希望 您创建一个真正的响应式设计。然而,他们也明白这并非对所有人或预算都可行,因此愿意使用不太彻底的解决方案。

假设您有 main 站点 www.example.com,并且您希望在 [=] 上创建一个单独的 mobile 站点13=].

在主站点的每个页面上,您需要在header中添加以下内容:

<link rel="alternate" media="only screen and (max-width: 320px)"
      href="http://m.example.com/****" >

**** 替换为移动站点上相应页面的路径,并将 media= 中的部分调整为您希望该页面用于的适当 media-query .如果您愿意,您可以拥有多个以满足多种屏幕尺寸。

N.B.: This doesn't actually redirect users -- it is only for Google or other search engines (I know, that they still exist is shocking, right?) or features on phones browsers where users can explicitly request the mobile/desktop sites. You'll need to handle the redirection based on user-agent strings

然后,在您的移动网站的每个页面上,您需要一个类似 link:

<link rel="canonical" href="http://www.example.com/****" >

同样,将 **** 替换为适当的对应页面。

您可以通过查看 their web pages on the subject 了解有关响应式设计以及 Google 喜欢的内容的更多信息。 只是在没有此标记的情况下重定向移动用户可能会阻碍Google意识到您向移动设备提供well-formatted内容用户,并导致您的网站受到移动搜索的惩罚。