หัวข้อ: [ถาม] ถ้าจะเขียนไฟล์ robots.txt ให้ index หน้าแรกหน้าเดียวทำไงครับ เริ่มหัวข้อโดย: zo501 ที่ 01 กันยายน 2008, 17:48:52 รบกวนสอบถามเซียนๆทั้งหลาย ถ้าจะเขียนไฟล์ robots.txt ให้ index หน้าแรกหน้าเดียวทำไงครับ :-*
หัวข้อ: Re: [ถาม] ถ้าจะเขียนไฟล์ robots.txt ให้ index หน้าแรกหน้าเดียวทำไงครับ เริ่มหัวข้อโดย: คนหลงทาง ที่ 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. หัวข้อ: Re: [ถาม] ถ้าจะเขียนไฟล์ robots.txt ให้ index หน้าแรกหน้าเดียวทำไงครับ เริ่มหัวข้อโดย: zo501 ที่ 01 กันยายน 2008, 21:15:25 ขอบคุณครับ :-*
|