Kuyini rel = canonical futhi Kungani Kufanele Ngisebenzise?

Hinting kuya Izinjini Zokusesha Version Prefered yeDokhumenti

Uma ugijima isayithi eliqhutshelwa kwedatha noma unezinye izizathu zokuthi kungani idokhumenti lingase liphindwe kubalulekile ukutshela izinjini ezikopisha kuyikhophi eyinhloko, noma kwi-jargon, ikhophi "ye-canonical". Lapho injini yokusesha ihlaziya amakhasi akho ingatshela uma okuqukethwe kuphindiwe. Ngaphandle kolwazi olwengeziwe, injini yokusesha izonquma ukuthi yiliphi ikhasi elihlangabezana nezidingo zamakhasimende abo. Lokhu kungase kube kuhle, kodwa kunezimo eziningi zezinjini zokusesha ezinikeza amakhasi amadala futhi aphelelwe yisikhathi ngoba bakhetha idokhumenti engalungile njenge-canonical.

Indlela Yokucacisa Ikhasi Lama-Canonical

Kulula kakhulu ukutshela izinjini i-URL ye-canonical ngemininingwane yedatha kumadokhumenti akho. Beka i-HTML elandelayo eduze kwesici sakho se-HEAD kuzo zonke ikhasi okungezona i- canonical:

Uma ufinyelela emahlokweni e-HTTP (njenge-.htaccess noma i-PHP) ungasetha i-URL ye-canonical kumafayela angenayo i-HEAD ye-HTML, njenge-PDF. Ukuze wenze lokhu, setha izihloko ezingamakhasi angewona ama-canonical afana nalokhu:

Xhumanisa: < URL yekhasi le-canonical >; rel = "ama-canonical"

Indlela iTagical Canonical isebenza ngayo futhi Uma ingenayo

Idatha ye-meta ye-canonical isetshenziselwa ukusikisela kwezinjini ukuthi yiliphi ikhasi eliyinhloko. Izinjini zokusesha zisebenzisa lokhu ukuze zibuyekeze inkomba yazo ukuze zibheke ikhophi yenhloko njengekhophi eyinhloko, futhi uma ziletha imiphumela yosesho ziletha ikhasi elikholelwa ukuthi li-canonical.

Kodwa ikhasi le-canonical osibekayo lingase lingabi yilokha izinjini zokusesha ziletha.

Kunezizathu eziningi ezenza lokhu kwenzeke:

Okushiwo yi-Rel = Tag Canonical

Abantu abaningi bakholelwa ukuthi uma ufaka isixhumanisi se-rel = canonical ekhasini bese lelo khasi lizoqondiswa kabusha kunguqulo ye-canonical, efana ne-HTTP 301 eqondisa kabusha. Lokho akulona iqiniso. Isixhumanisi se-rel = canonical sinikeza ulwazi kumajini asesha, kodwa asithinteki ukuthi ikhasi liboniswa kanjani futhi alenzani noma yikuphi ukuqondiswa kabusha kwezinga leseva .

Isixhumanisi sezingqungquthela, ekugcineni, siyisixwayiso kuphela. Izinjini zokusesha akudingeki zihloniphe. Izinjini eziningi zokusesha zizama kanzima ukuhlonipha izifiso zabanikazi bekhasi, kepha ekupheleni kosuku, imiphumela yosesho yilokho abakwenzayo, futhi uma bengathandi ukukhonza ikhasi lakho le-canonical, ngeke.

Ukusebenzisa nini i-Link Canonical

Njengoba ngishilo ngenhla, kufanele usebenzise isixhumanisi kuzo zonke izimpendulo ekhasini elingeyona i-canonical. Uma unamakhasi afana nawo, kodwa angafani, ngezinye izikhathi enza umqondo wokushintsha omunye wabo abe ohluke kakhulu, kunokuba enze eyodwa ye-canonical.

Kuhle ukuphawula amakhasi amabili angafani ngokuphelele ne-canonical. Kufanele zifanane, kodwa akufanele neze umane ubeke wonke amakhasi ekhasini lakho lasekhaya. I-Canonical itholakala ukuthi leli khasi liyikhophi lenkosi yalolo dokhumenti, hhayi noma yiluphi uhlobo lokuxhumanisa kahle kusayithi lakho.

Ngicabanga ukuthi kubalulekile ukuphinda lokho okwedlule - akufanele neze ukhombe wonke amakhasi akho ekhasini lakho lasekhaya njengekhasi le-canonical kungakhathaliseki ukuthi uzilingwa kanjani ukwenza kanjalo. Ukwenza lokhu, ngengozi, kungabangela wonke ikhasi elingelona i-canonical (okungukuthi wonke ikhasi elingelona ikhasi lakho lasekhaya futhi linesixhumanisi se-rel = canonical kuso) ukuze lisuswe ezinkampanini zenjini yokusesha.

Lokhu akusiwo i-Google (noma i-Bing noma i-Yahoo! noma enye injini yokusesha) enobungozi. Benza lokho owacelile ukuba bakwenze - ukucabangela wonke ikhasi impinda yekhasi lakho lasekhaya bese ubuyisa yonke imiphumela kulelo khasi. Khona-ke njengoba amakhasimende athola ukukhathazeka ekupheleni ekhasini lakho lasekhaya esikhundleni sedokhumenti efanele, lelo khasi ngeke lithandwa kakhulu futhi lizokwehla emiphumeleni yosesho. Ngisho noma ulungisa inkinga, ungakwazi ukubulala imiphumela yakho yosesho izinyanga emva kwalokho futhi akukho isiqinisekiso sokuthi izitifiketi zakho zesayithi zizophola.

Akufanele wenze ikhasi le-canonical eliye lakhishwa ekusesheni ngesizathu esithile (njengamathegi we-noindex noma ngaphandle kwefayela le robots.txt). Ukuze injini yokusesha ibhekisele ikhasi njenge-canonical, kufanele ikwazi ukuyibeka kuqala.

Izindawo ezinhle zokusebenzisa isixhumanisi rel = canonical zihlanganisa:

Lapho Ungasebenzisi Isixhumanisi Se-Canonical

Okukhethwa kwakho kokuqala kumele kube ngu-301 okuqondisa kabusha. Lokhu akusho nje kuphela injini yokusesha ukuthi i-URL yekhasi ishintshile, kodwa futhi ithatha abantu ukuba bafinyelele kakhudlwana (futhi bangabe bengithi, i-canonicol?) Inguqulo yekhasi.

Ungabi nobuvila. Uma ushintsha isakhiwo sakho se-URL, bese usebenzisa uhlobo oluthile lokuhlukunyezwa kwekhanda le-HTTP (njenge-.htaccess noma i-PHP noma enye iskriphthi) ukwengeza uku-301 okuqondisa ngokuzenzakalelayo.

Ngenkathi ungasebenzisa isixhumanisi se-rel = canonical, lokho akuthathi amakhasi amadala phansi. Futhi ngakho-ke noma ubani angafika kubo nganoma yisiphi isikhathi. Eqinisweni, uma ikhasimende linekhasi elibhalwe uphawu futhi uguqule i-URL kodwa kuphela ubuyekeze izinjini zokusesha usebenzisa isixhumanisi se-rel = canonical, lelo khasimende ngeke libone ikhasi elisha.

Isixhumanisi se-rel = canonical iyithuluzi eliwusizo kumasayithi enokuqukethwe okuningi okuphindaphindiwe. Ngokuqonda ukuthi isebenza kanjani, ungayisebenzisa ngokuphumelelayo. Kodwa ekugcineni, kuyithuluzi elakhishwa izinjini zokubasiza ukuba kugcinwe usesho lwazo izinkomba ezisesikhathini. Uma ungagcini amaseva akho ahlanzekile futhi avuselelwe futhi, amakhasimende akho azoba nomthelela futhi isayithi lakho lingalimala. Sebenzisa ngendlela efanele.