ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comความรู้ทั่วไปSearch Engine Optimization[ถาม] ถ้าจะเขียนไฟล์ robots.txt ให้ index หน้าแรกหน้าเดียวทำไงครับ
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: [ถาม] ถ้าจะเขียนไฟล์ robots.txt ให้ index หน้าแรกหน้าเดียวทำไงครับ  (อ่าน 821 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
zo501
สมุนแก๊งเสียว
*

พลังน้ำใจ: 19
ออฟไลน์ ออฟไลน์

กระทู้: 862



ดูรายละเอียด เว็บไซต์
« เมื่อ: 01 กันยายน 2008, 17:48:52 »

รบกวนสอบถามเซียนๆทั้งหลาย ถ้าจะเขียนไฟล์ robots.txt ให้ index หน้าแรกหน้าเดียวทำไงครับ  Kiss
บันทึกการเข้า

คนหลงทาง
ก๊วนเสียว
*

พลังน้ำใจ: 7
ออฟไลน์ ออฟไลน์

กระทู้: 427



ดูรายละเอียด
« ตอบ #1 เมื่อ: 01 กันยายน 2008, 19:05:00 »

ไม่ใช่เซียน แต่ทะลึ่งมาตอบ

วิธีที่ 1)

หน้าแรกให้ใส่ <META NAME="ROBOTS" CONTENT="INDEX, NOFOLLOW">
ส่วนหน้าอื่นๆ ให้ใส่ <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

วิธีที่ 2)


โค๊ด:
http://www.google.com/support/webmasters/bin/answer.py?answer=35303

Block or remove pages using a robots.txt file

You can use a robots.txt file to block Googlebot from crawling pages on your site.

For example, if you're manually creating a robots.txt file, to block Googlebot from crawling all pages under a particular directory (for example, lemurs), you'd use the following robots.txt entry:

User-agent: Googlebot
Disallow: /lemurs/

To block Googlebot from crawling all files of a specific file type (for example, .gif), you'd use the following robots.txt entry:

User-agent: Googlebot
Disallow: /*.gif$

To block Googlebot from crawling any URL that includes a ? (more specifically, any URL that begins with your domain name, followed by any string, followed by a question mark, followed by any string):

User-agent: Googlebot
Disallow: /*?

While we won't crawl or index the content of pages blocked by robots.txt, we may still index the URLs if we find them on other pages on the web. As a result, the URL of the page and, potentially, other publicly available information such as anchor text in links to the site, or the title from the Open Directory Project (www.dmoz.org ) can appear in Google search results. However, no content from your pages will be crawled, indexed, or displayed.

To entirely prevent a page from being added to the Google index even if other sites link to it, use a noindex meta tag, and ensure that the page does not appear in robots.txt. When Googlebot crawls the page, it will recognize the noindex meta tag and drop the URL from the index.
บันทึกการเข้า

NASA = Nerds Are Searching for Answers

ผู้ที่มีใจบุญ คนไหนที่มีกำลังทรัพย์พอที่จะช่วยเหลือเด็กๆ บ้านแกร์ด้า ที่มีโรคร้ายติดตัวมาตั้งแต่เกิด ช่วยบริจาคให้พวกเขาด้วยนะครับ
kaewdiary.com | ไดอารี่คุณแก้ว | บริจาคได้ที่นี่ครับ
ผมเชื่อว่ายังมีคนไทยที่มีใจบุญอีกเยอะที่สามารถช่วยเหลือพวกเขาได้
zo501
สมุนแก๊งเสียว
*

พลังน้ำใจ: 19
ออฟไลน์ ออฟไลน์

กระทู้: 862



ดูรายละเอียด เว็บไซต์
« ตอบ #2 เมื่อ: 01 กันยายน 2008, 21:15:25 »

ขอบคุณครับ  Kiss
บันทึกการเข้า

หน้า: [1]   ขึ้นบน
พิมพ์