Yoast SEO: Canonical URLs akan Shafin tare da Zaɓin SSL

https

Lokacin da muka matsa shafinmu zuwa Flywheel, ba mu tilasta kowa ya shiga haɗin SSL ba (URL: https: // url wanda ke tabbatar da haɗin haɗi). Har yanzu ba mu yanke shawara a kan wannan ba. Mayila mu tabbatar da cewa gabatarwar fom da kuma ecommerce amintattu ne, amma ba mu da tabbas game da matsakaicin labarin da za a karanta.

Da wannan a zuciya, mun fahimci cewa hanyoyin haɗin kanmu suna nuna aminci da rashin tsaro. Ban karanta abubuwa da yawa a kan batun ba, amma hakan yana iya zama matsala idan Google yana magance kowace hanya daban. Tabbas, a cikin Masu kulla da shafuffukan yanar gizo, dole ne muyi rijistar amintaccen rukunin yanar gizon dabam don haka kawai zan iya tunanin cewa zai haifar da rudani

Menene Canonical Link?

Linkungiyar haɗin yanar gizo shine wani ɓangare a cikin ɓangaren kai tsaye na shafin HTML (ganuwa ga masu amfani) wanda ke jagorantar injunan bincike zuwa fifikon shafin yanar gizon. Wannan wani abu ne mai mahimmanci yayin inganta rukunin yanar gizonku don injunan bincike tunda kuna son tabbatar da duk wani iko da aka bi ta hanyoyin ya shiga URL ɗin da ya dace. Mafi yawan tsarin sarrafa abun ciki suna samar da hanyoyi da yawa zuwa abun ciki iri ɗaya. Ba tare da wata ma'ana don bayyana hanyar da ta dace ba, ana iya rarraba ikonku tsakanin hanyoyi da yawa zuwa abun ciki ɗaya.

A cikin nazarin Yoast WANNAN tushen ilimin ilimin, kayan aikin kawai suna jan linzami ta hanyar daidaitaccen aikin WordPress. Watau, idan kuna kan shafin amintacce, zai jera hanyar https, idan baku ba - zai lissafa hanyar http. Ugh.

A cikin taken mu functions.php fayil, da amfani da matattarar canastis ɗin Yoast ___sanna, mun ƙara aiki mai zuwa don tilasta duk hanyoyin haɗin yanar gizo zuwa amintaccen URL:

aiki mtb_canonical_ssl ($ url) {$ url = preg_replace ("/ ^ http: / i", "https:", $ url); dawo da $ url; } add_filter ('wpseo_canonical', 'mtb_canonical_ssl');

Yanzu, ba tare da la'akari da wace hanyar da mai amfani ke bi ba ko yadda masanin Google ya kama canonical, zai nuna ne kawai azaman shafin amintacce tare da hanyar URL: https: //. Kayan aikin Yoast da yake da zaɓi don bayyana wannan, amma ya bayyana an cire shi daga kayan aikin.

2 Comments

  1. 1
  2. 2

Me kuke tunani?

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.