Redirect domain to Google Site

Time Required

15 Minutes

Difficulty

Low

The Scenario

In this scenario, we're redirecting a domain managed by Cloudflare to a Google Site. Google Site's are great as they are free!

Prerequisites

Domains managed by other providers can be redirected to Google sites but I don't know anything about that. If your domain is managed elsewhere, you may be able to follow some of this guide but I will not be able to assist you with troubleshooting

Configure Google Site

Connect your domain to your Google Site

  1. Click on the settings cog in the top right

  2. In the menu, select Custom Domains

  3. Click on Add

  4. Leave the subdomain as www and input your domain

Domain is not verified message
  1. Click on the "verify domain"

  2. Click Continue on the Domain option

  3. Click on Start Verification

  4. A Cloudflare link will open, click on "Authorize" to add the TXT record

  5. Wait a moment for Google to verify ownership of the domain

  6. Return to the Google Site

You may need to backspace and retype the domain

  1. Click on Next and you will be provided with the below information

Configure Cloudflare DNS

Now that the Google Site is set up to accept your domain, we need to configure the forward in Cloudflare

  1. Navigate to your Cloudflare dashboard and select the relevant domain

  2. On the left hand menu, select DNS

  3. Click on "Add Record", input the below and hit Save

Bonus - Redirect the root to www

I highly recommend following this, as by default going to mydomain.com will not work, but www.mydomain.com will. In this step, we will redirect mydomain.com to www.mydomain.com

  1. Navigate to your Cloudflare dashboard and select the relevant domain

  2. On the left hand menu, select DNS

  3. Click on "Add Record" , input the below and hit Save

  4. On the left, click on Rules > Redirect rules

  5. Create a new rule and input the below (don't forget to change the domain address for your domain, highlighted in yellow)

    concat("https://www.mydomain.com", http.request.uri.path)

  6. Click on Deploy

You will now need to wait some time for the rules to apply, sometimes this is very slow.

Last updated