How to Redirect a Root Domain or Subdomain with SSL for Free Using Google Firebase

Websites and Domains • Ryder Cragie • 1st May 2022


If you'd like to redirect your domain somewhere else using SSL (https), follow these steps to do so. In this example, I will be redirecting "" to "".

Setting Up The Redirect in Google Firebase

  1. Go to

  2. Click "Create a project".

  3. Give your project a name.

  4. Accept the Firebase terms and click "Continue".

  5. On the next screen, disable the Google Analytics switch and choose "Create Project".

  6. On the left, click on "Build" and then "Hosting".

  7. On the right, click "Get started".

  8. Click "Next" twice and then "Continue to the console".

  9. Once you're on the hosting screen, click the blue "Add custom domain" button on the right.

  10. Here you will be asked to enter the domain you wish to redirect. In this example, I will enter "".

  11. Below this, you'll see a box which says "Redirect to an existing website". You must tick this so that you can redirect the domain/subdomain.

  12. Another box will appear. In the 2nd box, you need to enter the new domain that you want to redirect the old domain to. In this case, I will enter "".

  13. Once complete, click "Continue".

Verifying and Connecting Your Domain

  1. You will then be given a TXT record which you need to add to your old domain so that you can redirect it to the new domain. The "Host" and "Value" of the TXT record is given to you, so all you need to do is add it to your domain. If you are unsure how to manage the DNS settings of your domain, click here to learn more.

  2. Once you have added this DNS record to your domain, click "Verify" in Firebase.

  3. On the next screen, you will be asked to add another record to your domain. This time it is an A record.

  4. Once you have added this 2nd DNS record to your domain, click "Finish" in Firebase.


After approximately half an hour, your redirect will start working with SSL (https).

If you found this article and video helpful, please consider subscribing to my YouTube channel for more content. Thanks!