用于多语言网站的元标记和RSS

时间:2015-10-29 17:56:29

标签: html rss meta-tags meta feedly

我在自己的引擎上有几个多语言网站 - 所有内容和所有文章都由(编辑)翻译成多种语言。因此,很容易通过Google Webmaster answer弄清<head>元标记的外观,但仍然没有什么问题,也无法找到最佳方法。

我将详细说明我是如何做到的,并会询问哪些地方有疑问 - 也许有人已经掌握了这些知识。

让我们考虑一下,当我们有一种主要语言而且很少有其他语言时。 此外,short links对于主要语言可能看起来像https://domain/s/id,对于其他语言可能看起来像https://domain/ua/s/id

Meta&amp;规范链接

基本上,在网址中避免使用主要语言,我将其视为canonicalx-default,(但仍然在GWM控制台中出现错误,我没有某些页面上的反向链接):

<link rel="canonical" href="https://domain/section/item-id/">
<link rel="alternate" hreflang="en" href="https://domain/section/item-id/">
<link rel="alternate" hreflang="x-default" href="https://domain/section/item-id/">
<link rel="alternate" hreflang="uk" href="https://domain/ua/section/item-id/">
<link rel="alternate" hreflang="ru" href="https://domain/ru/section/item-id/">

对于RSS:

<link rel="alternate" hreflang="en" type="application/rss+xml" title="" href="https://domain/rss/">
<link rel="alternate" hreflang="uk" type="application/rss+xml" title="" href="https://domain/ua/rss/">
<link rel="alternate" hreflang="ru" type="application/rss+xml" title="" href="https://domain/ru/rss/">

RSS XML

在这里,我真的不确定某些东西,并非常感谢亲们的建议。所以,得到这样的元,因为不是主要语言:

<guid isPermaLink="true">https://domain/section/item-id/</guid>
<link>https://domain/ua/section/item-id/</link>
<pubDate>Thu, 29 Oct 2015 11:15:00 +0200</pubDate>

所以,当我拥有所有这些元标记时,所有翻译都与GUID获得相同的网址是否正确?

可以/ canonical网址是short link吗? 短链接被共享到社交网络中,因此可能会增加计数。但引擎会在访问时从短链接重定向到完整的URL。

资讯提供ly

这个对我来说有点奇怪,如果你知道如何处理这些部分,我会非常感激:

  1. 帖子受欢迎程度。我看到我的Feed中的很多文章都有类似Facebook喜欢的数字。但对我来说它不起作用(像按钮被设置为主要语言的短链接 - canonical一个)。我已经尝试了Feed中的短链接和完整链接,无论如何都会得到零。
  2. pubDate完全被忽略,当Feedly第一次通过RSS抓取时,文章的日期相同。
  3. 谢谢,非常感谢答案。

1 个答案:

答案 0 :(得分:1)

Seems like I got answers recently, mainly by Feedly team in Google Groups.

hreflang: all is fine, errors I get are for cases when full link has been changed, but old one is somewhere in Internet (and on my side when ID is correct, no redirect headers sent, for now).

RSS XML

Figured out the best way for GUID when article have multiple languages: should include language, as far as translated article has it's own url in this case and aggregators may be confused by same GUID for different links.

<guid isPermaLink="true">https://domain/ua/s/id/</guid>
<link>https://domain/ua/section/item-id/</link>

I will use a short link for GUID, mainly because it is the one is shared over most of social media. Also because full link actually may change (part of it generates from title).

Feedly

As it was answered, all kinds of impressions are updated from time to time, and for new feeds may not even do so.

The pubDate is mostly ignored, because most of feeds somehow mess it up with a format. So, the date shown mainly will be the first fetch date, and then you can hover and see the published date. Lame, I'd say, but we have what we have.

P.S. Also plan to move further with Facebook Instant Articles, but it's another story :)