Hướng dẫn Hướng dẫn tạo và sử dụng tập tin Robots.txt

PVS

Super Moderator
Thành viên BQT
Hướng dẫn tạo và sử dụng tập tin Robots.txt

Tập tin Robots.txt được sử dụng để hướng dẫn công cụ tìm kiếm tự động đến những trang nào mà bạn muốn nó tìm kiếm và sau đó thì index trang đó. Hầu hết trang web nào cũng có những thư mục và files không cần đến robot của công cụ tìm kiếm ghé thăm. Do vậy tạo ra tập tin robots.txt có thể giúp bạn trong SEO.

Tập tin robots.txt là một dạng tập tin rất đơn giản có thể được tảo bởi công cụ Notepad. Nếu bạn sử dụng Xenforo, một tập tin robots.txt sẽ có dạng như sau
Mã:
User-agent: *
Disallow: /test/
Disallow: /account/
Disallow: /admin.php
Disallow: /attachments/
Disallow: /conversations/
Disallow: /events/birthdays/
Disallow: /events/monthly
Disallow: /events/weekly
Disallow: /find-new/
Disallow: /goto/
Disallow: /help/
Disallow: /login/
Disallow: /lost-password/
Disallow: /members/
Disallow: /misc/style?*
Disallow: /misc/quick-navigation-menu?*
Disallow: /online/
Disallow: /posts/
Disallow: /recent-activity/
Disallow: /register/
Disallow: /search/
Allow: /

“User-agent”:* có nghĩa là tất cả những robot tìm kiếm từ Google, Yahoo và MSN nên sử dụng hướng dẫn này của bạn để tìm kiếm trang web.

“Disallow: /account/“: dòng code này báo cho công cụ tìm kiếm biết nó không nên “lục lọi” các tập tin ở thư mục account của Xenforo.

Nếu bạn không sử dụng Xenforo, bạn chỉ việc thay thế dòng Disallow với files và folders mà bạn không muốn nó “dòm ngó”, ví dụ:
Mã:
User-agent: *
Disallow: /images/
Disallow: /cgi-bin/

Tự động tạo robots.txt
Nếu bạn có sử dụng Google Webmaster thì họ cũng cho phép bạn tạo robots.txt hoặc bạn có thể sử dụng Robots.txt Generator để tự động tạo file robots.txt cho mình

Sau khi bạn đã tạo xong file robots.txt (đừng quên chữ S), bạn chỉ việc upload lên thư mục gốc là hoàn thành.

Chúc các bạn thành công.


Nguồn: izwebz.com​
 
Mã:
User-agent: *
Disallow: /test/
Disallow: /account/
Disallow: /qu4ntr1.php
Disallow: /ajax/
Disallow: /conversations/
Disallow: /events/birthdays/
Disallow: /events/monthly
Disallow: /events/weekly
Disallow: /find-new/
Disallow: /forums/-/
Disallow: /forums/tweets/
Disallow: /goto/
Disallow: /help/
Disallow: /login/
Disallow: /lost-password/
Disallow: /media/category/
Disallow: /media/keyword/
Disallow: /media/user/
Disallow: /media/service/
Disallow: /media/submit/
Disallow: /misc/style?*
Disallow: /misc/quick-navigation-menu?*
Disallow: /online/
Disallow: /pages/conduct/
Disallow: /pages/privacy/
Disallow: /posts/
Disallow: /threads/tera-tweet-from-*
Disallow: /wiki/special/

User-agent: Baiduspider
Disallow: /

User-agent: YandexBot
Disallow: /

User-Agent: Wada.vn Vietnamese Search
Disallow: /

User-Agent: coccoc
Crawl-delay: 1

User-Agent: itim
Disallow: /

User-agent: bingbot
Crawl-delay: 1

Đây là file đã tối ưu seo và chặn spam bot của mình các bạn tham khảo nhé
 
Mã:
User-agent: *
Disallow: /test/
Disallow: /account/
Disallow: /qu4ntr1.php
Disallow: /ajax/
Disallow: /conversations/
Disallow: /events/birthdays/
Disallow: /events/monthly
Disallow: /events/weekly
Disallow: /find-new/
Disallow: /forums/-/
Disallow: /forums/tweets/
Disallow: /goto/
Disallow: /help/
Disallow: /login/
Disallow: /lost-password/
Disallow: /media/category/
Disallow: /media/keyword/
Disallow: /media/user/
Disallow: /media/service/
Disallow: /media/submit/
Disallow: /misc/style?*
Disallow: /misc/quick-navigation-menu?*
Disallow: /online/
Disallow: /pages/conduct/
Disallow: /pages/privacy/
Disallow: /posts/
Disallow: /threads/tera-tweet-from-*
Disallow: /wiki/special/

User-agent: Baiduspider
Disallow: /

User-agent: YandexBot
Disallow: /

User-Agent: Wada.vn Vietnamese Search
Disallow: /

User-Agent: coccoc
Crawl-delay: 1

User-Agent: itim
Disallow: /

User-agent: bingbot
Crawl-delay: 1

Đây là file đã tối ưu seo và chặn spam bot của mình các bạn tham khảo nhé
crawl-delay nghĩa là gì vậy bác :)
 

Dịch vụ XenForo của VNXF

anhanhxf     0906081284
silzedt_1207          Inbox   PVS

Hướng dẫn sử dụng

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Back
Top