![Tạo robots.txt blogspot chuẩn seo cập nhật thường xuyên](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_wGKbTZpgGfjBERf4V__J15W7KPu9keGxksStPuOE9CY0lp_vfHgcN5wQ9rGNT6PunUhrYmfPlEDwOk-2b4vyaz_vj5mehVV1jS1P4taXGvjIk56nDuryoSV8VRibVuTCSJXzAACZFYng/s1600/tao-robotstxt-blogspot-chuan-seo.png)
Cấu trúc của tệp robots.txt
User-agent: Tên bot của công cụ tìm kiếmDisallow: Liên kết bị chặn
Allow: Liên kết cho phép
Sitemap:
Ví dụ về tệp robots.txt cho Blogspot
User-agent: Googlebot
User-agent: Bingbot
User-agent: Twitterbot
User-agent: Facebot
Disallow:
User-agent: *
Disallow: /feeds
Disallow: /search
Disallow: /search?*
Disallow: *max-results=*
Disallow: *?showComment=*
Allow: /search/label/template-blogspot-ban-hang
Allow: /search/label/template-blogspot-mien-phi
Allow: /search/label/thiet-ke-blogspot
Allow: /search/label/blogger-templates
Allow: /search/label/blog
User-agent: Mediapartners-Google
Allow: /
Sitemap: https://www.layout.vn/sitemap.xml
Hướng dẫn chặn link bài viết, trang hoặc chặn tất cả
- Chặn trang (page)+ Ví dụ 1: chặn tất cả các trang
User-agent: Googlebot
User-agent: Twitterbot
User-agent: Facebot
Disallow: /p
Allow: /
User-agent: Mediapartners-Google
Allow: /
Sitemap: https://www.domain.com/sitemap.xml
Nếu chặn tất cả page thì có thể thêm các page ấn định như: Allow: /p/about-us.html
+ Ví dụ 2: chặn 1 trang chỉ định bởi người chặn
User-agent: Googlebot
User-agent: Twitterbot
User-agent: Facebot
Disallow: /p/code.html
Allow: /
User-agent: Mediapartners-Google
Allow: /
Sitemap: https://www.domain.com/sitemap.xml
- Chặn 1 bài viết (post)
Disallow: /2019/09/post-title.html
- Chặn tất cả
Disallow: *?showComment=*
Disallow: *?spref=fb
Disallow: *?spref=tw
Disallow: *?spref=gp
Disallow: *?spref=pi
Disallow: *?utm_source=*
Với quy tắc thêm (*) này, không cần biết liên kết nào cứ liên kết có các giá trị đằng sau dấu (*) đều sẽ bị chặn.
Tổng hợp