I want to redirect domain A
(without hosting space) to domain B
(301), but when I try https://domainA.com or https://www.domainA.com it ends with ERR_CONNECTION_REFUSED
. Is it even possible to use only DNS records?
I'm using OVH.com redirection panel and http:// redirect works fine.
Redirects cannot be done with DNS only.
However, some providers have HTTP redirect services that are configured via same interface as DNS. These support only HTTP. HTTPS support requires valid certificate for the domain.
Therefore if you want to have HTTPS redirects, you need to set up your own server for it.
Thats not possible on DNS Side,
But if you use CloudFlare DNS, you can configure the redirect via CF proxy [ https://support.cloudflare.com/hc/en-us/articles/200172286-Configuring-URL-forwarding-or-redirects-with-Cloudflare-Page-Rules ]
https://i.imgur.com/2QAHebu.png
https://i.imgur.com/E5NCenQ.png
*Just make sure the domain record use proxy feature.
Another option is such as https://forwarddomain.net/ which (kindly) gives a free redirect service using only DNS records. An example below redirects from
sub.example.com
toothersite.com