diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html
index 96293daf..34082c95 100644
--- a/web/html/xui/settings.html
+++ b/web/html/xui/settings.html
@@ -523,6 +523,8 @@
this.loading(true);
await PromiseUtil.sleep(5000);
let { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.allSetting;
+ if (host == this.oldAllSetting.webDomain) host = null;
+ if (port == this.oldAllSetting.webPort) port = null;
const isTLS = webCertFile !== "" || webKeyFile !== "";
const url = buildURL({ host, port, isTLS, base, path: "panel/settings" });
window.location.replace(url);