Html 我必须在我的网站中放置哪些重要的元标记?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1092329/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are the important meta tags I must put in my website?
提问by Johnno Nolan
There seems to be huge number of meta tagsyou can set. I'm guessing that some of them are more important than others.
您似乎可以设置大量元标记。我猜其中一些比其他的更重要。
What are the most important metatags to supply and why?
要提供的最重要的元标签是什么?为什么?
Do I even need meta tags? (looking at the stackoverflow homepage there are none)
我什至需要元标记吗?(查看stackoverflow主页,没有)
回答by Alden
I realize this question is old, but it's still a top google hit, so I thought I would give an updated answer that includes popular social media sites.
我意识到这个问题很老,但它仍然是谷歌热门话题,所以我想我会给出一个更新的答案,其中包括流行的社交媒体网站。
I generally have four groups of meta info:
我通常有四组元信息:
Regular Meta Info- used by search engines and browsers
常规元信息- 由搜索引擎和浏览器使用
<title>{{pageTitle}}</title>
<meta charset="utf-8"><!-- html5 version of http-equiv="Content-Type"... -->
<meta name="description" content="{{description}}">
<meta name="keywords" content="{{keywords}}">
<link rel="author" href="https://plus.google.com/{{googlePlusId}}" />
<link rel="canonical" href="{{pageUrl}}" />
Facebook Meta Info- used by Facebook when someone shares your url
Facebook 元信息- 当有人分享您的网址时由 Facebook 使用
<meta property="og:url" content="{{pageUrl}}">
<meta property="og:image" content="{{imageUrl}}">
<meta property="og:description" content="{{description}}">
<meta property="og:title" content="{{pageTitle}}">
<meta property="og:site_name" content="{{siteTitle}}">
<meta property="og:see_also" content="{{homepageUrl}}">
Google+ Meta Info- used by Google+ when someone shares your url
Google+ 元信息- 当有人分享您的网址时由 Google+ 使用
<meta itemprop="name" content="{{pageTitle}}">
<meta itemprop="description" content="{{description}}">
<meta itemprop="image" content="{{imageUrl}}">
Note: you don't really need these, Google+ will fall back to the Open Graph tags that Facebook uses.
注意:您实际上并不需要这些,Google+ 将退回到 Facebook 使用的 Open Graph 标签。
Twitter Meta Info- used by Twitter when someone shares your url
Twitter 元信息- 当有人分享您的网址时由 Twitter 使用
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="{{pageUrl}}">
<meta name="twitter:title" content="{{pageTitle}}">
<meta name="twitter:description" content="{{description}}">
<meta name="twitter:image" content="{{imageUrl}}">
回答by Travis
I'll use my same answer from this question:
我将使用与这个问题相同的答案:
A few years back, meta tags were important to search engine optimization. However, they've been abused and are generally ignored by almost all search engines (including Google, Yahoo and Live search. Excuse me: Bing).
几年前,元标签对搜索引擎优化很重要。然而,它们已经被滥用并且几乎被所有搜索引擎(包括谷歌、雅虎和实时搜索。对不起:必应)忽略。
The most important tags for SEO that you can include in your (X)HTML are the <title>
and <meta name="description"...>
tags.
您可以在 (X)HTML 中包含的最重要的 SEO 标签是<title>
和<meta name="description"...>
标签。
<title>
should generally be what you'd want the search engine to name your page in it's listing.<meta name="description"...>
can sometimes give the search engine a basic idea of how to describe your page when indexing it.
<title>
通常应该是您希望搜索引擎在其列表中为您的页面命名的名称。<meta name="description"...>
有时可以让搜索引擎了解如何在索引页面时描述您的页面。
However, using these two tags will not necessarily make a difference in increasing your site's visibility on a search engines listings. For more information on that aspect, Google has a nice section on SEOon their site.
但是,使用这两个标签不一定会提高您网站在搜索引擎列表中的可见度。有关这方面的更多信息,谷歌在他们的网站上有一个很好的SEO 部分。
回答by Nir Levy
Update May 2015: Still being a very popular answer, I recommend you look at @alden's answeras it is much more updated then my own (6 years old now)
2015 年 5 月更新:仍然是一个非常受欢迎的答案,我建议您查看@alden 的答案,因为它比我自己的答案更新得多(现在 6 岁了)
Original answer follows:
原答案如下:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
To tell the browser what the content type and encoding is
告诉浏览器内容类型和编码是什么
<meta NAME="ROBOTS" CONTENT="NOODP">
See http://www.mattcutts.com/blog/google-supports-meta-noodp-tag/for why
请参阅http://www.mattcutts.com/blog/google-supports-meta-noodp-tag/了解原因
<meta name="description"...>
Obvious
明显的
<meta name="keywords"...>
Google do not use this, but other search engines may
谷歌不使用这个,但其他搜索引擎可能
<meta HTTP-EQUIV="Expires" CONTENT="Tue, 20 Jun 1995 04:13:09 GMT">
If you know when you like this page to be expired from cache
如果您知道何时希望此页面从缓存中过期
回答by Bobby Hyman
Themost important meta tag you should use is:
您应该使用的最重要的元标记是:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
adjusted to suit. This ensures that, if you ever need to transmit that HTML document via something other than a web server (e.g. working on it locally, sending as an attachment), the user-agent is aware of its mime-type and character set. Just make sure your server headers agree.
调整以适应。这确保,如果您需要通过 Web 服务器以外的其他方式传输该 HTML 文档(例如在本地处理它,作为附件发送),则用户代理知道其 MIME 类型和字符集。只要确保您的服务器标头同意即可。
回答by Bodasactra
The best SEO is a website that meets the needs of its target users effectively. To do that you need to have a site that has something in it that people can use, want, or need. This is value and its the most important thing. It can be anything from good articles to entertaining video or a useful download. Tags support good content but cant replace it for SEO. If the content is good enough no tags are needed. Trust me when I say, if your site has something, anything people want or need, that they can't get just anywhere, your site will do well in all regards, tags or no tags. If your site is boring and has no value it will fail, tags or no tags.
最好的 SEO 是一个能有效满足目标用户需求的网站。为此,您需要有一个网站,其中包含人们可以使用、想要或需要的内容。这是价值,也是最重要的事情。它可以是任何东西,从好文章到有趣的视频或有用的下载。标签支持好的内容,但不能代替 SEO。如果内容足够好,则不需要标签。相信我,如果您的网站有一些东西,人们想要或需要的任何东西,他们在任何地方都无法获得,那么您的网站在所有方面都会做得很好,有标签或没有标签。如果您的网站很无聊并且没有价值,它将失败,标记或没有标记。
回答by luc
the description metatag will be used by google as description of your site. I think it's the most important.
谷歌将使用描述元标记作为您网站的描述。我认为这是最重要的。
I think that the verify-v1 meta is important. It makes possible to use Google Webmaster tool
我认为 verify-v1 元很重要。可以使用 Google 网站管理员工具
回答by User
GoogleBot ignores meta information only trusting the page content itself rather than content descriptors. So, the usefulness of certain tags may be limited.
GoogleBot 忽略元信息,仅信任页面内容本身而不是内容描述符。因此,某些标签的用处可能会受到限制。
回答by Jona
I would make sure you have a title, description, keyword, and revisit-after tag in your web pages. Although Google doesn't weigh keyword tag as much, it may still be used by smaller search engines.
我会确保您的网页中有标题、描述、关键字和 revisit-after 标签。尽管 Google 对关键字标签的权重不那么高,但它仍可能被较小的搜索引擎使用。