Published on

Redirecting one HTTPS domain to another without a web server

A few years ago, I created a small website that was picked up by a major local media outlet.

The domain had since expired, but seeing that it was still available for purchase, I decided to reclaim it to set up a redirect to my current website and gain an additional high-quality backlink.

"A DNS-level redirect, and that's it," I thought.

Everything seemed fine until I tested the redirect and realized it didn't work when accessing the HTTPS version of the original site.

Makes sense—the SSL certificate was missing, so the browser determined that the connection wasn't secure and didn't allow access.

Not wanting to pay for an additional web server just to generate an SSL certificate for a single redirect, I turned to Netlify once again to solve this issue.

I simply had to configure it as the DNS server for my domain, then deploy a repository to its address containing just a _redirects file with the following content:

https://www.monsuperdomaine.com https://www.julienverneaut.com 301!
https://monsuperdomaine.com https://www.julienverneaut.com 301!

And that's it—the redirect now works correctly, and a few days later, the new backlink was successfully identified by my SEO analysis tool without having to spend an extra cent.