不知大家有否留意網站的 site analytics,有時他們搜尋的關鍵字和網站內容完全無關,可能只是一些 Archive, Categories, Tags 等等頁面。
反而有關文章不知在那個位置,難以搜尋。
所以如果要做好 SEO,就需要禁止 Google 等 search engine 接觸 archive, categories 等等頁面。
方法 1:
利用 robots.txt 限制 Google spider
User-agent: Mediapartners-Google #令 Google Adsense 等不受此限
Disallow:
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/themes/
Disallow: /trackback/
Disallow: /feed/
Disallow: /archives/
Disallow: /*?
Disallow: /*.php$
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$
Disallow: */feed/
Disallow: */trackback/
Disallow: /page/*/*
Disallow: /tag/*/*
Disallow: /category/*/*
Disallow: /sitemap/*/*
Disallow: /author/enterpr1se/*/* #請自行更改閣下名稱
Allow: /wp-content/uploads/
這段 code 就是將 wp-admin, archives, tag, category 等等不被 Google 搜尋到,這樣就可以令 Google 可以專注於文章內容。
方法 2:
利用 WordPress SEO by Yoast,這是一個全方位 SEO 用的 plugin,很好用。



