You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

domain.com平台下域名重定向时保留路径的问题

domain.com平台下域名重定向时保留路径的问题

Hey there! Let’s figure out how to fix your path-preserving redirect issue on domain.com.

First, let’s clear up why your previous attempts didn’t work: CNAME records and pointer (PTR) records are just for domain resolution—they point your first domain to the second one’s IP, but they don’t handle the actual redirect logic that carries over the URL path. That’s why you only ended up at the base URL of second-domain.com.

Here’s exactly what you need to do in domain.com’s settings:

  • Log into your domain.com account and navigate to the management dashboard for first-domain.com.
  • Look for the URL Forwarding or Redirect section—this is usually under "DNS & Nameservers" or "Advanced Settings" depending on the interface.
  • Choose the redirect type: pick 301 Permanent Redirect if this is a long-term alias (great for SEO), or 302 Temporary Redirect if you might change this later.
  • Enter your target URL as https://second-domain.com (make sure to include the https:// part to avoid redirect errors).
  • The critical step: Find and check the box labeled "Forward with Path" or "Preserve Path"—this is what tells the system to append whatever comes after first-domain.com/ to the end of second-domain.com/.
  • Save your settings, then wait for DNS propagation (this can take anywhere from a few minutes to 24 hours, but usually kicks in quickly).

Once it’s active, test it out: visit first-domain.com/example-path and it should automatically send you to second-domain.com/example-path—same with any other path you use.

备注:内容来源于stack exchange,提问作者Ritush

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 10:12:57