B-Cloudflare Root To Www
Metadata
Tags:: #🗂️/🌲
Topics:: DNS Notion BlogNote
前言
工作有一需求,需要將root 導向www,例如: kimx.info to www.kimx.info 。此方式個人知道的解決方式,有2種:
- 在IIS設定Rewrite。
- 在DNS 服務商設定 (本文針對Cloudflare)。ps: 要看是否有支援。
使用方式
如下圖,設定root 並啟用代理,此為給Cloudflare的Page Rule轉發用。

設定Page Rule 將root 轉到www

總結
- 這樣的設定比去IIS設定方便許多,省下Rewrite及Bining等設定,也比較好管理。
相關參考
- https://developers.cloudflare.com/support/page-rules/configuring-url-forwarding-or-redirects-with-page-rules/