User-agent: * # 1. 封鎖系統與敏感目錄 (與原本相同,保留) Disallow: /includes/ Disallow: /config/ Disallow: /admin/ Disallow: /backend/ Disallow: /api/ # 2. [新增] 封鎖使用者私人頁面 (如果有這些頁面的話) # 避免 Google 索引購物車、結帳或會員後台,這些頁面對於 SEO 沒有幫助 Disallow: /cart.php Disallow: /checkout.php Disallow: /my_account.php # 3. [新增] 封鎖站內搜尋結果 # 如果你有 search.php?q=... 的功能,一定要封鎖,避免產生無限重複內容 Disallow: /*?q= Disallow: /*?search= # 4. [新增] 安全防護:封鎖敏感檔案類型 # 避免不小心上傳的備份檔被 Google 搜尋到 Disallow: /*.sql$ Disallow: /*.bak$ Disallow: /*.log$ Disallow: /*.git$ # 5. Sitemap # sitemap.xml 是索引檔,指向動態產生的 sitemap.php(公開頁面、商品、新聞、供應商) Sitemap: https://emetals.tw/sitemap.xml