【免費註冊】 【會員登入】 【個人資料】 【會員列表】 【論壇幫助】 【論壇搜尋】 【登出論壇】

∮Ω奧米加空間∮
∮Ω奧米加空間∮»技術文件區»【原創】在 URL 中刪除 WWW 前綴 from plesk

訂覽該主題更新消息 | 將該主題推薦給朋友 發表新主題 發起投票  回覆
作者 主題    
dc
管理員



性別:男
來自:瓦肯星
發表總數:11559
註冊時間:2002-05-07 16:32
(第 1 篇) 【原創】在 URL 中刪除 WWW 前綴 from plesk

參考資料
Add or Remove WWW Prefix in URLs
https://www.atakdomain.com/en/knowledge-base/how-to-add-or-remove-the-www-prefix


今天接到 plesk 平台的用戶回報 www.xxx.com 出現 SSL 憑證錯誤,但 xxx.com 正常
SSL 是免費的 Let's Encrypt
登入 plesk 平台查看 -> Websites & Domains -> xxx.com -> Dashboard -> Security -> SSL/TLS Certificates
出現 WWW domain not secured 點下去

可以看到
Domain with the "www" preflx       Not Secured
www.xxx.com

左下角的
Run SSL Labs Test
https://www.ssllabs.com/ssltest/analyze.html?d=xxx.com&latest
改成你自己的網域可以檢測

回到 Websites & Domains -> xxx.com -> Hosting & DNS -> Hosting


Hosting Settings -> Hosting type -> Preferred domain -> www.xxx.com

改成 xxx.com -> Save

這樣輸入 www.xxx.com 會跳轉 xxx.com 就沒有 SSL 憑證錯誤的問題了。




本帖由dc最後編輯於2025-09-17 13:33

Your mind to my mind,

your thought to my thought
發表時間:2025-09-17 12:19
dc的個人資料 傳送郵件給dc dc的個人首頁 dc發表的所有文章 送出悄悄話給dc IP:118.*.*.* 編輯  引言回覆 
dc
管理員



性別:男
來自:瓦肯星
發表總數:11559
註冊時間:2002-05-07 16:32
(第 2 篇)

今天使用者說 之前跳轉的設定失敗了,會停在 www.xxx.com SSL 失敗

1. 將 CNAME 改為 A 紀錄
https://管理介面/smb/dns-zone/records-list/id/432/type/domain
Websites & Domains -> Hosting & DNS -> DNS
www.xxx.com. CNAME xxx.com.
修改為
www.xxx.com. A xxx.xxx.xxx.xxx

2.重新建立 SSL
https://管理介面/modules/sslit/index.php/index/certificate/id/432
Websites & Domains -> Dashboard -> Security -> SSL/TLS Certificates
SSL/TLS Certificate for xxx.com -> 按下 Reissue Certificate
Choose a product to issue a certificate
Install a free basic certificate provided by Let's Encrypt
按下 Install
填入 Email address
勾選 Secure the wildcard domain (including www and webmail)
這樣 www.xxx.com 也會一起
勾選 Assign the certificate to the mail domain
勾選 DANE support
按下 Get it free

3.系統提示會自動建立 DNS 紀錄
_acme-challenge.xxx.com. TXT **************************************

Websites & Domains -> Hosting & DNS -> DNS
看到那筆 TXT 已經紀錄後,按下 Continue 繼續
新的 Lets Encrypt 就會建立完畢

4.檢查 ssl
https://管理介面/modules/sslit/index.php/index/certificate/id/432
Websites & Domains -> Security -> SSL/TLS Certificates -> Secured Components ->
Domain with the "www" prefix
www.xxx.com
狀態已經是 Secured

5.修改自動跳轉
https://管理介面/smb/web/view/432/hosting-settings
Websites & Domains -> Hosting & DNS -> Hosting -> Hosting type -> Preferred domain
可以改回 www.xxx.com

測試連線 www.xxx.com 與 xxx.com 不再出現問題。




本帖由dc最後編輯於2025-09-24 10:15

Your mind to my mind,

your thought to my thought
發表時間:2025-09-24 10:14
dc的個人資料 傳送郵件給dc dc的個人首頁 dc發表的所有文章 送出悄悄話給dc IP:118.*.*.* 編輯  引言回覆 
所有時間均為GMT+8, 現在是2025-09-26 11:36    
訂覽該主題更新消息 | 將該主題推薦給朋友 發表新主題 發起投票  回覆

快速回覆
主題 ( 回覆文章可以不輸入標題 )
URLs自動分析
有回覆時郵件通知
禁用表情符號
使用簽名

<聯絡我們 - OMEGA - 控制面板>

Powered by Centaur & Joksky & DC, ver 2003.08.14
Copyright ©2002-2008 PHPY.COM


頁面生成時間:0.027808904647827