DEV Community

Cover image for HTTPS Domain Forwarding for Free via Netlify
Alvin Lim
Alvin Lim

Posted on

HTTPS Domain Forwarding for Free via Netlify

This evening GoDaddy reminded me of an unused personal domain,, which is due to expire late next year. Several years ago I had used it for my personal website, and it still appears as a search result on Google. As such I decided to forward this domain to my current website

I had previously done this with another domain via GitHub Pages, but this time I decided to go with Netlify as I suspected doing so would be easier.

So first I created a bare bones index.html file containing a meta refresh tag that would load my target URL:

<!DOCTYPE html>
    <meta http-equiv="refresh" content="0; URL=">
Enter fullscreen mode Exit fullscreen mode

Then in Netlify I deployed this index.html file as a running website. Usually I deploy projects to Netlify by connecting to the appropriate repo on GitHub, but for this I just clicked the Sites tab and dragged and dropped the folder containing the index.html file into the following button:

Folder upload button on Netlify

Once the index.html file was deployed as an active website -- just a few seconds later -- Netlify gave me the option to set up a custom domain for this website. This was my opportunity to connect my old domain to this index.html file which would automatically redirect the user to my current website

To set up this custom domain, Netlify gave me the A and CNAME records that I would need to set up in my domain name registrar, in this case, GoDaddy. In GoDaddy, I set up the Netlify A and CNAME records in my management panel, and almost immediately the URL pointed to the website I had set up in Netlify! Which meant typing in the browser would automatically redirect you to

From my recollection, setting this up on Netlify was much easier than doing the same on GitHub Pages. Having said that, setting up HTTPS domain forwarding on GitHub Pages can't be described as a difficult task either!

Top comments (0)