Kev ua haujlwm ntawm SEO-zoo tshaj plaws yog qhov loj heev. Beginners raug qhia kom sau cov optimization algorithm kom tsis txhob nco ib kauj ruam. Txwv tsis pub, kev nce qib yuav tsis tshua hu ua kev vam meej, txij li lub vev xaib yuav ua tsis tiav thiab ua yuam kev uas yuav tsum tau kho kom ntev.
Ib qho ntawm kev ua kom zoo dua yog ua haujlwm nrog cov ntaub ntawv robots.txt. Txhua qhov peev txheej yuav tsum muaj cov ntaub ntawv no, vim tias tsis muaj nws yuav nyuaj dua los tiv thaiv kev ua kom zoo dua. Nws ua haujlwm ntau yam uas koj yuav tsum nkag siab.
Robot Assistant
Cov ntaub ntawv robots.txt yog cov ntawv sau yooj yim uas tuaj yeem pom hauv tus qauv Notepad ntawm lub kaw lus. Thaum tsim nws, koj yuav tsum teeb lub encoding rau UTF-8 kom nws thiaj li nyeem tau raug. Cov ntaub ntawv ua haujlwm nrog http, https thiab FTP raws tu qauv.
Daim ntawv no yog tus pab tshawb nrhiav neeg hlau. Nyob rau hauv rooj plaub uas koj tsis paub, txhua lub kaw lus siv "kab laug sab" uas nrawm nrawm rau lub Ntiaj Teb Wide Web kom rov qab tau cov chaw cuam tshuam rau cov lus nug.cov neeg siv. Cov neeg hlau no yuav tsum muaj kev nkag mus rau cov ntaub ntawv siv, robots.txt ua haujlwm rau qhov no.
Yuav kom cov kab laug sab nrhiav lawv txoj hauv kev, koj yuav tsum xa cov ntaub ntawv robots.txt mus rau hauv paus directory. Txhawm rau xyuas seb lub xaib puas muaj cov ntaub ntawv no, nkag mus rau "https://site.com.ua/robots.txt" rau hauv qhov chaw nyob ntawm qhov browser. Hloov chaw "site.com.ua" koj yuav tsum nkag mus rau cov peev txheej koj xav tau.
Cov ntaub ntawv muaj nuj nqi
Cov ntaub ntawv robots.txt muab cov ntaub ntawv nkag nrog ntau hom ntaub ntawv. Nws tuaj yeem muab kev nkag mus ib nrab kom "kab laug sab" txheeb xyuas cov ntsiab lus tshwj xeeb ntawm cov peev txheej. Kev nkag mus tas li tso cai rau koj los txheeb xyuas txhua nplooj ntawv muaj. Kev txwv tag nrho txwv tsis pub neeg hlau los ntawm kev pib tshawb xyuas, thiab lawv tawm ntawm qhov chaw.
Tom qab mus saib cov peev txheej, "kab laug sab" tau txais cov lus teb tsim nyog rau qhov kev thov. Tej zaum yuav muaj ob peb ntawm lawv, nws tag nrho yog nyob ntawm cov ntaub ntawv hauv robots.txt. Piv txwv li, yog tias qhov scan ua tiav, tus neeg hlau yuav tau txais tus lej 2xx.
Tej zaum lub xaib tau raug xa rov qab los ntawm ib nplooj ntawv mus rau lwm qhov. Hauv qhov no, tus neeg hlau tau txais tus lej 3xx. Yog tias qhov chaws no tshwm sim ntau zaus, kab laug sab yuav ua raws nws kom txog thaum nws tau txais lwm cov lus teb. Txawm hais tias, raws li txoj cai, nws tsuas yog siv 5 zaug xwb. Txwv tsis pub, qhov yuam kev 404 nrov tshwm.
Yog lo lus teb yog 4xx, ces tus neeg hlau raug tso cai nkag mus rau tag nrho cov ntsiab lus ntawm qhov chaw. Tab sis nyob rau hauv cov ntaub ntawv ntawm 5xx code, daim tshev yuav tsum nres kiag li, vim qhov no feem ntau qhia ib ntus neeg rau zaub mov yuam kev.
rau dab tsixav tau robots.txt?
Raws li koj tau twv, cov ntaub ntawv no yog cov neeg hlau 'cov lus qhia rau lub hauv paus ntawm qhov chaw. Tam sim no nws yog siv los txwv qee qhov kev nkag mus rau cov ntsiab lus tsis tsim nyog:
- nplooj ntawv nrog cov ntaub ntawv tus kheej ntawm cov neeg siv;
- iav qhov chaw;
- search results;
- cov ntaub ntawv xa tawm, thiab lwm yam.
Yog tias tsis muaj cov ntaub ntawv robots.txt hauv qhov chaw hauv paus, tus neeg hlau yuav nkag mus rau tag nrho cov ntsiab lus. Raws li, cov ntaub ntawv tsis xav tau tuaj yeem tshwm sim hauv cov txiaj ntsig tshawb fawb, uas txhais tau tias koj thiab lub xaib yuav raug kev txom nyem. Yog tias muaj cov lus qhia tshwj xeeb hauv cov ntaub ntawv robots.txt, ces "kab laug sab" yuav ua raws li lawv thiab muab cov ntaub ntawv xav tau los ntawm tus tswv ntawm cov peev txheej.
Ua haujlwm nrog cov ntaub ntawv
Yuav siv robots.txt los thaiv lub vev xaib los ntawm indexing, koj yuav tsum paub seb yuav tsim cov ntaub ntawv no li cas. Txhawm rau ua qhov no, ua raws cov lus qhia:
- Tsim ib daim ntawv hauv Notepad lossis Notepad ++.
- Set the file extension ".txt".
- Nkag mus rau cov ntaub ntawv xav tau thiab cov lus txib.
- Txuag cov ntaub ntawv thiab xa mus rau qhov chaw hauv paus.
Raws li koj tuaj yeem pom, ntawm ib theem nws yog qhov tsim nyog los teeb tsa cov lus txib rau cov neeg hlau. Lawv muaj ob hom: tso cai (Allow) thiab txwv tsis pub (Disallow). Tsis tas li ntawd, qee qhov optimizers tuaj yeem hais qhia qhov nrawm nrawm, tus tswv tsev, thiab txuas mus rau cov peev txheej nplooj ntawv qhia.
Txhawm rau pib ua haujlwm nrog robots.txt thiab thaiv lub vev xaib tag nrho los ntawm kev ntsuas, koj yuav tsum nkag siab cov cim siv. Piv txwv li, hauv ib daim ntawvsiv "/", uas qhia tias tag nrho lub xaib raug xaiv. Yog tias siv "", ces yuav tsum muaj ib ntu ntawm cov cim. Ua li no, nws yuav ua tau kom qhia meej ib daim nplaub tshev uas tuaj yeem luam tawm lossis tsis tau.
Txoj kev ntawm bots
"Spiders" rau kev tshawb fawb xyaw yog qhov sib txawv, yog li yog tias koj ua haujlwm rau ntau lub tshuab tshawb fawb ib zaug, koj yuav tsum coj lub sijhawm no mus rau hauv tus account. Lawv cov npe txawv, uas txhais tau hais tias yog tias koj xav tiv tauj ib tus neeg hlau tshwj xeeb, koj yuav tsum tau qhia nws lub npe: "Tus Neeg Siv Khoom: Yandex" (tsis muaj cov lus qhia).
Yog tias koj xav teeb tsa cov lus qhia rau txhua lub tshuab tshawb nrhiav, tom qab ntawd koj yuav tsum siv cov lus txib: "Tus Neeg Siv Khoom: " (tsis muaj nqe lus). Txhawm rau txhawm rau thaiv lub vev xaib kom zoo los ntawm kev txheeb xyuas siv robots.txt, koj yuav tsum paub qhov tshwj xeeb ntawm cov tshuab tshawb fawb nrov.
Qhov tseeb yog qhov nrov tshaj plaws tshawb fawb xyaw Yandex thiab Google muaj ob peb bots. Txhua tus ntawm lawv muaj nws txoj haujlwm. Piv txwv li, Yandex Bot thiab Googlebot yog lub ntsiab "kab laug sab" uas nkag mus rau qhov chaw. Paub tag nrho cov bots, nws yuav yooj yim dua los kho qhov ntsuas ntawm koj cov peev txheej.
Examples
Yog li, nrog kev pab ntawm robots.txt, koj tuaj yeem kaw lub xaib los ntawm kev ntsuas nrog cov lus txib yooj yim, qhov tseem ceeb yog kom nkag siab yam koj xav tau tshwj xeeb. Piv txwv li, yog tias koj xav kom Googlebot tsis mus cuag koj cov peev txheej, koj yuav tsum muab nws cov lus txib tsim nyog. Nws yuav zoo li: "Tus neeg siv-tus neeg saib xyuas: Googlebot Disallow: /" (tsis muaj nqe lus)
Tam sim no peb yuav tsum nkag siab tias yog dab tsi hauv cov lus txib no thiab nws ua haujlwm li cas. Yog li "User-Agent"yog siv nyob rau hauv thiaj li yuav siv ib tug ncaj qha hu mus rau ib tug ntawm cov bots. Tom ntej no, peb qhia rau qhov twg, hauv peb rooj plaub nws yog Google. Cov lus txib "Disallow" yuav tsum pib ntawm kab tshiab thiab txwv tsis pub tus neeg hlau nkag mus rau hauv qhov chaw. Lub cim slash nyob rau hauv cov ntaub ntawv no qhia tias tag nrho cov nplooj ntawv ntawm cov peev txheej raug xaiv rau kev ua tiav.
Hauv robots.txt, koj tuaj yeem lov tes taw indexing rau tag nrho cov kev tshawb fawb xyaw nrog cov lus txib yooj yim: "Tus neeg siv-tus neeg sawv cev:Disallow: /" (tsis muaj quotes). Lub cim hnub qub nyob rau hauv rooj plaub no qhia txog tag nrho cov kev tshawb nrhiav neeg hlau. Feem ntau, xws li cov lus txib yuav tsum tau txhawm rau txhawm rau ncua qhov kev ntsuas ntawm lub xaib thiab pib ua haujlwm rau nws, uas txwv tsis pub tuaj yeem cuam tshuam rau kev ua kom zoo.
Yog tias cov peev txheej loj thiab muaj ntau nplooj ntawv, nws feem ntau muaj cov ntaub ntawv ntiag tug uas tsis xav tau tshaj tawm, lossis nws tuaj yeem cuam tshuam tsis zoo rau kev nce qib. Hauv qhov no, koj yuav tsum nkag siab yuav ua li cas kaw nplooj ntawv los ntawm indexing hauv robots.txt.
Koj tuaj yeem nkaum ib daim nplaub tshev lossis cov ntaub ntawv. Hauv thawj kis, koj yuav tsum rov pib dua los ntawm kev tiv tauj ib tus bot tshwj xeeb lossis txhua tus, yog li peb siv "User-tus neeg sawv cev" hais kom ua, thiab hauv qab no peb qhia meej qhov "Disallow" hais kom ua rau ib daim nplaub tshev tshwj xeeb. Nws yuav zoo li no: "Disallow: / folder /" (tsis muaj quotes). Txoj kev no koj nkaum tag nrho cov folders. Yog tias nws muaj qee cov ntaub ntawv tseem ceeb uas koj xav qhia, ces koj yuav tsum sau cov lus txib hauv qab no: "Allow: /folder/file.php" (tsis muaj quotes).
Cuaj ntaub ntawv
Yog siv robots.txt kaw lub xaib los ntawmKoj ua tiav hauv kev txheeb xyuas, tab sis koj tsis paub yog tias tag nrho koj cov lus qhia ua haujlwm raug, koj tuaj yeem tshawb xyuas qhov tseeb ntawm kev ua haujlwm.
Ua ntej, koj yuav tsum tau tshuaj xyuas qhov chaw tso ntawm cov ntaub ntawv dua. Nco ntsoov tias nws yuav tsum tsuas yog nyob rau hauv lub hauv paus nplaub tshev. Yog hais tias nws yog nyob rau hauv lub hauv paus nplaub tshev, ces nws yuav tsis ua hauj lwm. Tom ntej no, qhib qhov browser thiab nkag mus rau qhov chaw nyob hauv qab no: “https://yoursite. com/robots.txt (tsis muaj quotes). Yog tias koj tau txais qhov yuam kev hauv koj lub web browser, ces cov ntaub ntawv tsis yog qhov uas nws yuav tsum nyob.
Cov lus qhia tuaj yeem tshawb xyuas hauv cov cuab yeej tshwj xeeb uas siv los ntawm yuav luag txhua tus webmasters. Peb tab tom tham txog Google thiab Yandex cov khoom lag luam. Piv txwv li, hauv Google Search Console muaj ib lub cuab yeej uas koj yuav tsum qhib "Crawl", thiab tom qab ntawd khiav "Robots.txt Cov Ntaub Ntawv Tshawb Fawb". Koj yuav tsum luam tag nrho cov ntaub ntawv los ntawm cov ntaub ntawv mus rau hauv lub qhov rais thiab pib scanning. Raws nraim tib daim tshev tuaj yeem ua tiav hauv Yandex. Webmaster.