การปรับแต่ง robots.txt file สำหรับ wordpress

robots.txt เป็น file ที่ใช้สำหรับการปรับแต่งให้ bot ต่างๆ เข้ามาเก็บข้อมูลต่างที่เจ้าของเว็ปต้องการให้ bot นั้นเก็บอะไรออกไปบ้าง สำหรับการที่เราปิดไม่ให้บางอย่างที่ไม่จำเป็นสำหรับ bot เพื่อเข้ามาเก็บข้อมูลนั้น เราควรจะปิดไว้ ทั้งนี้จะช่วยเพื่อความเร็วในการเข้าไปเก็บข้อมูลในเว็ปของเราด้วย

ซึ่งการทำลักษณะนี้จะช่วยเพิ่มอันดับใน search engine ให้กับเว็ปเราด้วย

ขั้นตอนการทำก็คือให้ทำการ copy เนื้อหาข้างล่างไปใส่ไว้ที่ notepad ทำการ save แล้วตั้งชื่อ file ว่า robots.txt และไปใส่ไว้ที่ root folder ที่ฝั่ง host ครับ แต่อย่างลืมไปเปลี่ยนชื่อ website ที่ ข้างล่างสุด ด้วยนะครับ

User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content
Disallow: /tag
Disallow: /author
Disallow: /wget/
Disallow: /httpd/
Disallow: /i/
Disallow: /f/
Disallow: /t/
Disallow: /c/
Disallow: /j/

User-agent: Mediapartners-Google
Allow: /

User-agent: Adsbot-Google
Allow: /

User-agent: Googlebot-Image
Allow: /

User-agent: Googlebot-Mobile
Allow: /

User-agent: ia_archiver-web.archive.org
Disallow: /

Sitemap: http://www.askapache.com/sitemap.xml

thank : http://www.mininoz.com/robots-file-for-wordpres

บทความแนะนำ
  • http://twitter.com/gootooyoo gootooyoo

    ได้ความรู้อีกแล้ว

  • Tanin N

    +1

blog comments powered by Disqus