[Switch] META tag guide: Which meta tags should be used and which should not be used ?, Meta tag
Source: http://lusongsong.com/reed/8766.html
META tag is a key tag in the HEAD area of the webpage code. The information provided by META tag is invisible to users, but it is the most basic metadata of the document. Speaking of meta tags, the first response of many SEOer systems is K and D: keywords and description. These two labels are the most common and talked about in the optimization process. However, in fact, meta Tags are far more than these two tags, and their functions vary with different attributes.
Note that, from the SEO perspective, the code on the pages in various meanings is more streamlined and better. The following are some meta tags and personal opinions on whether they are necessary. In the following article, they will be categorized into three categories: they have a good effect and must be available on each page. on different pages, you should decide whether the page content is helpful or not, and it is best not to use them.
I. useful meta tags
The meta tags here are very useful to ensure that they are available in every page code.
1. "meta content-type" tag
This label defines the text and language used for the page production, and specifies that the language is displayed when the browser displays the page. Make sure that each page has this label. The tag is written in the following example: gb2312 is the Chinese character code, and different languages correspond to different charsets.
When building pages and websites, you must know the language your website uses.
2. Title
This is actually not a meta tag, but it also exists in some, so it is also mentioned below. This attribute can be said to be the most important. Just as every article cannot have no title, a webpage must also have a title, which is unique and unique. This is also the most important reference for Page Participation in search rankings.
3. description label
The most important role of this tag is to add a description of the page in the search result list when a user finds a page in the search engine. Words contained in the description are also recognized by the search engine and can be used as keywords for ranking to some extent. The description content will greatly affect whether the user clicks your page. When writing a description, it is a bit like selling the ad on the corresponding page. You must write attractive clicks and do not exaggerate the facts. The length of description should not exceed 160 bytes.
4. viewport
The ViewPort flag is used to specify whether the user can scale the Web page. If yes, what is the maximum and minimum scaling ratio. If you do not have this tag on your page, the mobile experience on your page may be very poor, and the search and browsing traffic is increasingly skewed to the mobile end, you should be prepared for this.
The meta tag Writing Method of viewport is as follows:
The width and height commands specify the logical width and height of the video area. The width command uses the width = device-width flag to indicate that the area width should be the screen width of the device. Similarly, the height command uses the device-height flag to indicate that the video height is the screen height of the device. The user-scalable command specifies whether the user can scale the view area, that is, the view on the web page. If the value is yes, scaling is allowed. If the value is no, scaling is not allowed.
The initial-scale command is used to set the initial scale of a Web page. The default initial scaling ratio varies depending on the smartphone browser. Generally, the device displays the entire Web page in the browser. If it is set to 1.0, the unscaled Web document is displayed.
The maximum-scale and minimum-scale commands are used to set the user's limit on the scaling ratio of Web pages. The value range is 0.25 to 10.0. Same as initial-scale, the value of these commands is the scale ratio applied to the content of the view area.
Ii. meta tag based on the situation.
These meta tags are very useful on some pages, but may appear redundant on other pages. to streamline the code, make sure that the following meta tags are used correctly.
1. social meta tag
This tag is used to quickly generate a link that can be published on social media after being clicked for sharing and forwarding. These features are very useful for dissemination on content pages, but not all pages in the website need it, make sure you use it in the right place.
2. robots meta tag
The misunderstanding is that you must create a robots tag. In fact, robots specifies the indexing and tracking links. If you do not write the robots tag, the default permission is to allow the search engine to index the page and track the Page Link. Only when you need to change one of the two permissions is necessary. The syntax of robots labels is as follows:
Robotterms is a set of values separated by commas (,). Generally, there are several values: none, noindex, nofollow, all, index, and follow. The specific meanings are as follows:
None
The search engine ignores this webpage, which is equivalent to noindex and nofollow.
Noindex
The search engine does not index this webpage.
Nofollow
The search engine does not continue to search for other web pages through the link index of this web page.
All
The search engine indexes this webpage and the link index that continues to pass this webpage, which is equivalent to index and follow.
Index
Search engines index this webpage.
Follow
The search engine continues to search for other webpages through the link index of this webpage.
The robots after the equal sign after the name can also be changed. Its role is to specify that the robots tag only takes effect for the search engine. For example, Google is "googlebot" and Baidu is "baiduspider ".
3. keywords
Put this old-fashioned tag here because the search engine can identify the keyword of the article by itself. Now, this tag has little effect. Now you don't need to focus on how to write this label, so you can focus more on keyword optimization in the content. If your website background has this function, it is also good to fill it in.
4. refresh
This tag is used to refresh the current page or jump to another page after the specified time. When you want to jump to a page, you 'd better use the 301 code returned by the server instead of this. As for the refresh function, you need to determine whether the refresh function is required or not. You need to know that the search engine is not a loyal fan of you. The refresh tag refresh method is as follows:
The number can be changed to any number, which indicates the number of seconds after which the page is refreshed.
Iii. Useless meta tags
The following labels have little practical effect. to streamline the code, you should try to avoid them from appearing in your code.
1. author/web author
This tag is used to sign the page or website author. This label is useless. Put it aside.
2. revisit after
The purpose of this tag is to notify the search engine spider to return to the page after a specified period of time. Do you really think you can specify how often a search engine spider will come to your page? Each search engine has its own set of rules, which are not recognized by them.
3. Rating
This label is used to grade the page content. For example, it is not suitable for children to watch. In fact, you should use other methods to prompt in the eye-catching position of the page, rather than leaving such information in the code.
4. Expiration/date
This tag defines an expiration/release time for the page. A page is not a product sold in a mall. When you think the page content is about to expire, you need to update the information in time or simply delete it and submit a dead link instead of making it expire. Release date should not be displayed in this mode. Use sitemap and ensure that updates to sitemap are more effective.
5. copyright
This tag is used for the copyright information of the page. As a matter of fact, you should put the copyright information in the footer of the page, as the current website does. Therefore, you do not need to repeat the copyright statement in the code.
6. abstract
This label is used to abstract the content of the page. In fact, you already have the description tag, which is also recognized and used by all search engines. You don't need to write another one.
7. distribution
This label is used to set distribution permissions, but only three values are available: global (global), local (local only), and IU (internal only ). If you really want to restrict the permissions of search engines, use the robots mentioned above.
8. Generator
This tag defines the program used to develop the page. It is of little significance like author.
9. resource type
This label defines the file type of the page. The xml dtd can help you do this.