Today, by analyzing the code of the hdwiki program, you can search for Seo In the head section.

Source: Internet
Author: User
Today, by analyzing the code of the hdwiki program, you can search for Seo In the head section.

Wiki Knowledge Sharing collaboration address: http://wiki.mygogou.com/doc.php? Action = view & docId = 446

Let's talk about the modification.

<Meta http-equiv = "Content-Type" content = "text/html; charset = {$ Lang. commoncharset}"/>
<! -- Add by clin003 start at 20071028 -->
<Meta name = "Description" content = "{if $ doc_summary! = ''} {$ Doc_summary} {/if}"/>
<Meta name = "keywords" content = "{section name = tag loop = $ tags} {$ tags [tag]}, {/section}"/>
<Meta name = "author" content = "clin003"/>
<Meta name = "generator" content = "mygogou.com"/>
<Meta name = "Copyright" content = "Copyright (c) 2007 clin003. All Rights Reserved."/>
<Meta name = "revisit-after" content = "1 days"/>
<Meta name = "rating" content = "general"/>
<! -- Add by clin003 end at 20071028 -->
<Title> {if $ doc_title! = ''} {$ Doc_title}-{/if} {if $ catname! = ''} {$ Catname}-{/if} {if ($ doctitle! = ''And $ doctitle! = 'Website')} {$ doctitle}-{/if} {if ($ navtitle! = ''And $ navtitle! = 'Browsing item')} {$ navtitle}-{/if} {$ site_name}-mygogou V & nbsp; {$ hdwiki_version} </title>

<! -- Add one title by clin003 at 20071028 -->

The above is part of the modified header. TPL code. You can modify the wiki site as needed.

What are their functions:

1: <! -- Add by clin003 start at 20071028 --> and <! -- Add by clin003 end at 20071028 --> meta completely excerpts the headers in my previous website. This part mainly adds copyright information.
2: Add description as the summary of the called entry page (that is, the Summary section under no entry)
3: add the keywords content as the tag of the entry page for the entry. Each tag is separated by a comma.
4: If you are not browsing the entry page, the description and keywords will be empty. For example, if you are on the hand page, the description and keywords will be empty. (in this case, I will not set them for the moment)
5: The title display part of the browsing Item Page. This time, when browsing the item page, the title of the item will be displayed. (In the past, only one browsing item exists, which is unfriendly to users and searches)
6: In addition, I have removed browsing in the background. This option can be used to select the website style (because I found that I searched my website on Google, and all the text is replaced by those style descriptions !, Weigh the space layout of the header to retain the language selection)
7: You have removed the two titles of the homepage and browsing entries.
--------------------
The leaf area corresponding to the variable:
Viewdoc. TPL
Header. TPL
In addition, if you have a friend who has a better solution or a better way to optimize it, thank you for sharing it with you. Haha

Demo address: http://wiki.mygogou.com/

References Before optimization:
Website Optimization-meta tag
Http://www.seodigg.com/story.php? Title = % E7 % BD % 91% E7 % AB % 99% E4 % BC % 98% E5 % 8C % 96 mdashmeta % E6 % A0 % 87% E7 % ad % Be
Mygogou blog home page source code (considering the use of all in one Seo this plug-in to see) http://wz.mygogou.com/

--------------------
Meta tag:
A: Does meta tags still work in major search engines?

B: I still advocate placing meta tags on webpages. If you do not abuse them, you will be ranked by your website. Benefit.

C: It is good to handle them properly. The keyword tag only contains the main Keywords of the page, and does not need to be repeated multiple times on the page. In this way, you can get twice the result with half the effort. For descriptipn labels, it is better to use 25-30 or fewer labels. Some search engines use this as a description of your website.

D: I think the meta tag will be re-referenced by divisor in Google. My website has only one unique description.

Personal opinion: the use of Meta Tags has nothing to do with harm. If it is too troublesome, you can use the same meta tag for all pages.

Why use HTML meta tags?

1,
Meta Tags are special HTML tags embedded in your webpage. They contain some hidden information about your webpage. The purpose of the meat tag is to explain to the search engine what information is related to your webpage. For high-level search engines, HTML meta tags are nothing new. But in any case, it is indispensable for a good web page. Let's explain it here.

2,
When you plan a search engine optimization policy, Meta Tags are very important. However, adding meta generally does not help you get a better ranking in search engines. There are several meta tags, but the following are important: description tag, keywords tag, and Title Tag (strictly speaking, title is not a tag ). These labels are especially important when you refresh tags from time to time. If you want the search engine to index your website, the HTML Tag redirection (redirect) label and robots tag will be used.
Note: Only 20% of the web pages in the questionnaire use the "keyword" and "Description" tags (that is, keyword, description)
The following is an example of the two labels:
<Meta content = "your description" name = "Description">
<Meta content = "key word 1, key word 2, ---" name = "keyword">

Separate multiple keywords with commas.

3. Title Tag

The title tag may be the most important tag on your web page. It is the most visible part on your web page. Put it before description and keyword. It is best to add the keyword of your website to this tag. The title tag plays an important role in search engines. It is best to put it in front of other meta tags, which is more conducive to your website ranking. (Note: Some search engines rank by the letter priority of the title tag, and try to use the start letter in your title) the title tag is the first one that people see about your website in the search engine, so try to make it simple and clear. Let people know what your website is about at a glance.

4. description tag

The description tag is behind the title. It can be a short sentence (one or two sentences ). Describe your website. Like the title tag, this is also a click that people link to your website in the search engine list. These descriptions will encourage people to browse your website rather than your competitors. (The description cannot be too exaggerated. Otherwise, when a visitor finds that the content is not what you say on your website, he will return soon .) Many search engines can describe about 150 words, so make sure that your description is less than 150 words, otherwise, the search engine will automatically cut out the excess parts, resulting in incomplete descriptions of your website. Search engines think that the keywords in the description are far more important than the content in the web page (as if this is not so obvious now ). As mentioned above, it provides very important information: Make sure that your description correctly reflects the topic of your website, and try to add your main keywords to the description, the more META keywords, the greater the meaning. This will highlight your keywords.

Most search engines (except Google) now support descriptin tags. If you do not use it, you will lose the possibility of ranking first.

5. keyword tag

Compared with the description and title tags, the keyword tag is not that important. Some search engines ignore it completely, but using the correct keyword tag is still effective for improving the ranking.

In addition to search engines, it is generally invisible to people. A keyword tag is a hidden tag that provides search engines with a list of keywords or key phrases related to your page. You can use corresponding tools to find a series of keywords that apply to your website. (Note: A keyword tag can only contain a list of keywords related to the content on your page. All keywords here must be associated with the content of the page .)

Tip: organize related keywords on each page. Each page must focus on different products or content. Listing full keywords in tags is not good for improving your website rankings. Use commas (,) to separate multiple keywords. A space indicates the logical "and ". This is required to formally describe keywords in the keyword tag. Even so, many search engines separate keywords with spaces to search for more relevant results. In this way, the search engine combines the keywords separated by spaces in a certain way. You can try two methods to see which one is more suitable for you.
Keyword should not be repeated 3-6 times in the same form. Generally, this is regarded as the largest number of keyword duplicates (as if it has changed again ). Therefore, try to avoid repeating your keywords again and again. This is spam (keyword spam) for every search engine, and you will be punished accordingly. Most search engines allow you to use up to 1000 characters in a keyword tag. Generally, using related keywords for each page will increase your website ranking. An important factor is keyword redundancy. If one keyword is a character and your keyword tag contains 100 characters, the keyword redundancy is 1%. Search engines will use relevant algorithms to calculate your keyword redundancy for every important word or phrase on your web page. Removing unnecessary keywords helps increase the ranking of your website.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.