A Gamers Grind / XFGN / LM
Status
  • 🖥️www.agamersgrind.com
  • 🏙️--- Public Files ---
    • 👋Welcome, friends
    • ⛑️I need help!
    • ☕Buy me a Coffee
  • 📚Guides
    • Mini Guides
      • Valheim FPS Boost
      • Redirect domain to Google Site
      • Docker Compose
        • 'All' Compose File
        • Add Health Check to Container
        • Mount NFS Share to Container
        • Map hostname to container
    • Portainer and GitOps
      • Set up GitHub
      • Install Portainer
      • Create your first GipOps Compose file
      • Deploy your first GitOps stack
      • Managing your production compose files
    • Cloudflare
      • Domains
      • Generate an API Key
      • Tunnel
        • Create a Tunnel
        • Create a Proxy (Public Hostname)
        • Access Groups & Authentication
      • Dynamic DNS
    • Pterodactyl
      • Creating a new Panel
      • Creating a new Wings node
      • Join servers via domain
      • Configuring your Node Database
      • Server Best Practices & Suggestions
      • Troubleshooting
  • 🎮Game Servers
    • Valheim Public
    • Valheim Private
    • MultiMC (Minecraft)
    • CreateCraft (Minecraft)
    • Insurgency Sandstorm
  • ⚔️AGG Moderation
    • ❔Creating a new Server
    • Approving Valheim Application
  • 🗄️Internal Documentation
Powered by GitBook
On this page
  • The Scenario
  • Prerequisites
  • Configure Google Site
  • Configure Cloudflare DNS
  • Bonus - Redirect the root to www

Was this helpful?

  1. Guides
  2. Mini Guides

Redirect domain to Google Site

PreviousValheim FPS BoostNextDocker Compose

Last updated 11 months ago

Was this helpful?

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. On the left hand menu, select DNS

  2. 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. On the left hand menu, select DNS

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

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

  4. 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)

  5. Click on Deploy

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

Navigate to your and select the relevant domain

Navigate to your and select the relevant domain

📚
Cloudflare dashboard
Cloudflare dashboard

Time Required

15 Minutes

Difficulty

Low

A Google account
A website built in Google Sites
A domain managed by Cloudflare
Don't forget to leave a comment down the bottom - this information is helpful when you have a lot of DNS records
The IPv4 address does not matter, as we are proxy-ing this data via Cloudflare. The proxy checkbox enables with redirect rule to work. You could use 1.2.3.4 and it will be fine.
It is possible to host multiple websites under the same domain, using but this guide will not cover that
subdomains