Use Canonical attribute to strengthen webpage weight again

Will read a paragraph of quoted passage first:

Gu Ge, Yahoo and Live Search announce to support Canonical of a of Link new property, appoint authoritative catenary for the webpage (Authoritative | Canonical URL) , in order to solve duplicate content (Duplicate Content) problem.

Duplicate content or duplicate webpage are the URL that shows the content with ten identical or close split phase has many to differ however, if print the page, URL that perhaps has Sessionid,wait. Website administrator can be in now the head of the webpage of identical content (Head) on add label of a Link, appoint first selection URL, state with this an authoritative webpage the standard version as duplicate webpage, make link and search result are centered to the version of this first selection.

<link Rel=canonical Href=authoritative | Canonical URL/>

* Href can be absolutely address or opposite address; but cannot point to different domain name, meet otherwise by oversight; Allow those who differ to point to child domain name;

*Link Rel=canonical attribute can be delivered, namely B of A page statement is linked for authority, b states C is authoritative webpage, criterion SE can think C is the version of first selection authority with A and joint B.

If * is authoritative what the page points to is a 404 pages, criterion SE still can index the content of this page, try to find page of a standard.

When to suit to use Cononical: Still need to reduce duplicate webpage to perhaps be used in the website that make 301 jump turn standardization network address, if be no good reoccupy Link Rel= Canonical this label. Still see in the rich guest of Google, if appoint authoritative webpage was not indexed, will likely by be indexed instantly, because of this label, in other any methods cannot eliminate duplicate webpage when, point out authoritative webpage, will be best method.

To let dish bird people understand this attribute adequately, I take a simple website to do a specification, it is the forum that a DZ becomes suppose, that should strengthen webpage weight, we can do those things, of course what we say is Rel= Canonical this label:

One, use bogus static state, notice at 3 o’clock:

1. prohibits in Robots.txt all dynamic address Disallow: / *.php;

2. is banned with Archiver, reason is OK the Archiver below GOOGLE is optimized.

3. alters Forumdisplay.php document, $extra = Rawurlencode(page=1$forumdisplayadd); of instead of $extra = Rawurlencode(page=$page$forumdisplayadd);

Explanation: The URL form of the card is Thread-(tid)-(page)-(forumdisplay Page).html, last state this post is in the a fewth page of list page. Become so the card is increasing, this post can arrive by the first page the 2nd page. . . , its URL is met constant change. Settling way is it becomes 1. Be not worth even if should return list page from this card when, can return the first page only.

Form of the link inside such processing stations is onefold, normative and unobstructed, do not affect collect. If do not want to prohibit dynamic form, or others linked non-standard form, also can do the modification below.

2, dynamic URL form, to nonstandard URL page adds Canonical Tag, point to authoritative webpage

It is with Discuz 7.0 exemple

1. adds Link Rel=canonical to Viewthread.php

Modification Viewthread.php file, in $page = Max($page, above 1); (the program is called include a file to end) , add a $extrahead. ='<link Rel=canonical Href=viewthread.php? Tid=’ . $tid. ‘ />';

2. gives the page that print (those who have Printable parameter) add Canonical Tag

Alter document of Templates\default\viewthread_printable.htm of pattern plate of the page that print, $extrahead is added in <head> part.

The page that 3. gives Redirect.php the form child add authoritative link

After this program is handled to parameter actually, those who call is Viewthread.php, have Link Rel=canonical naturally so.

4. adds Link Canonical label for Archiver page

1) writes Archiver/index.php document: In Global $boardurl, $_DCACHE, $charset, $navtitle, $headerbanner, group adds below $headernav; travel: Global $extrahead;

Group adds below travel of <meta Http-equiv=Content-Type Content=text/html; Charset={$charset} /> : $extrahead.

2) repairs surely Archiver\include\ There are two Showheader(); in this file, in the 2nd above add group: $extrahead. ='<link Rel=canonical Href=viewthread.php? Tid=’ . $tid. ‘ />';

So far the URL of type of card place materiality (the dynamic, page that print, Redirect.php, static state and Archiver) have Link Rel=canonical ticket, appoint Viewthread.php? This kind of form is Tid=888 standard version, weight and collect can turn to it.

To list page, because the form is simple, and Archiver list page not as one to one correspondence as normal list, did not do revise.

3, already bogus static state adds Link Canonical to the practice of static address again

1. general all $extrahead in 2 o’clock. ='<link Rel=canonical Href=viewthread.php? Tid=’ . $tid. ‘ />'; changes $extrahead. ='<link Rel=canonical Href=thread-‘ . $tid. ‘-1-1.html />'; changes namely with Thread-3-1-1.html form of this kind of static state is first selection version.

2. is over undermost of Archiver content page form of static state of instead of complete edition link

Modification Archiver/include/, viewthread.php? Tid=$tid is replaced for Thread-{$tid}-1-1.html

3. is done for Redirect.php page 301 jump turn to static form URL

Modification file, use Php code comes true 301 jump turn, require_once DISCUZ_ROOT. ‘ . / Viewthread.php'; is replaced for Header(HTTP/1.1 301 Moved Permanently);Header(Location: Thread-{$tid}-1-1.html);

File the Communist Party of China has 4 places to want to replace, but in of 7 saw Lastpost only downstage this form.

Among them 2.3. Can have Link Canonical actually, but Baidu does not support, receive standard form continuously had better.

Offer draft cure beautiful network