问题原文
原帖链接 · 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
- 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.
- 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
.htaccessor 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. - 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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
