I bought a domain to do a 301 Redirect - do I need to host that domain?
.htaccess files are extremely useful in many cases for users who either do not have root permissions or for users who simply aren't comfortable in making changes in their web server's configuration file. Trying to debug .htaccess not working isn't always the easiest thing to do, however, hopefully by checking the discuss below mentioned about htaccess, 301-redirect, , , .htaccess common problems as well as the troubleshooting tips, you'll have a better grasp on what you may have to modify to get your .htaccess file running smoothly.Problem :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
A "3xx redirect" is an HTTP request/response so you need to use a service that accepts an HTTP request.
So, either:
Some domain registrars might offer an additional service to HTTP redirect the domain (most don't).
Point the domain you want to redirect, to a web hosting account and configure the redirect there. Either in
.htaccess(on Apache) or using pretty much any server-side scripting language.- This does not necessarily need to be a dedicated hosting account just for the domain you want to redirect. You might have an existing account that you can just "Addon" an additional domain. A "web hosting account" is just a virtual host that accepts requests to this domain.
Point the domain at the same service/host you want to redirect to (and configure the host so they accept requests to this domain) and configure the redirect at the target host. This depends on the features provided by the target host.
Do I "have to" do this using a .htaccess file on a host?
No.
what's the "cheapest" and most effective way of doing this?
It depends on exactly what you are doing. And the capability of the services you are using. If you simply want a website to be accessible from two domains (and redirect one to the other) then you should use a webhost that allows you to add additional "Addon" domains. For some hosts this is standard feature at no additional cost; for others it's not. (The very cheapest shared hosting accounts probably only permit a single domain.)
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.
Comments
Post a Comment