大网数据广告活动
网站运营与故障问答

I bought a domain to do a 301 Redirect - do I need to host that domain?

· 52CE 我爱测

I'm competent with setting up records for domains, things like CNAME, A Records, etc - but what about if I just want to redirect it? Do I "have to" do this using a .htaccess file on a host? Or better said, what's the "cheapest" a…

问题原文

原帖链接 · Henry · CC BY-SA 4.0

I'm competent with setting up records for domains, things like CNAME, A Records, etc - but what about if I just want to redirect it?

Do I "have to" do this using a .htaccess file on a host?

Or better said, what's the "cheapest" and most effective way of doing this? Thanks

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

Some sort of hosting is required

For a domain to redirect to another domain, it needs to have some sort of web hosting. Only a web server for the domain can issue the redirect that you need.

You have several options

  1. The biggest domain registrars such as GoDaddy and NameCheap offer free redirect services for any domain you register through them. However those services often don't work very well. GoDaddy has long term known issues where redirects don't work consistently for all clients. I've also never seen a registrar offer redirects that support HTTPS.
  2. Point the domain name to your existing hosting account. Your host may or may not allow additional domains. They are usually called "add-on domains". You can usually configure additional domains to redirect. It may involve .htaccess or it may not, depending on your host. Depending on your host, you may or may not be able to get a HTTPS certificate for the redirecting domain.
  3. Use a third party service to do the redirects.

I usually recommend Cloudflare

The best third party service for redirecting domains that I have been able to find is Cloudflare.

  • It is free. They offer a free-tier of service for every domain you add. You can redirect the domain under the free service tier.
  • Their redirects are reliable.
  • They support HTTPS. They automatically generate an SSL certificate for your redirecting domain. They keep that certificate up to date without any intervention for you.
  • The down side is that it is a bit difficult to set up.

To use Cloudflare, follow the instructions I created for setting up domain redirects using their free-tier service.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2021-02-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。