How to Set up Subdomain Forwarding for Google Domains

At Mobile First we frequently purchase and configure custom domains. More specifically we prefer Google Domains because of ease of use and automatic identity protection that is included in the price.

Now, there are times when you have successfully configured your custom domain and everything is working fine, but for one reason or another, you now need to move your traffic from beta.mywebsite.comwww.mynewshinydomain.com. No worries, we have done this before and will show you the steps.

For the rest of this tutorial, let us use the following placeholders:

  1. old.domain.com - the address where your site is currently hosted
  2. www.somenewdomain.com - the address you want to use going forward

Prerequisites

i.e. what you need to make the required changes

  • Be owner/admin of a custom Google domain, domain.com
  • Your website is deployed to www.somenewdomain.com

What to Expect

Your site will be temporarily down for a few minutes or up to 24 hours depending on your configuration choices. Prepare to make this change at a time where the impact on your audience is minimal.

Steps

  1. Go to https://domains.google.com/m/registrar
  2. Choose the domain name you want to edit. Then use the menu on left to navigate to DNS settings, as shown below.

  3. Find section called Synthetic records. Note that “Synthetic records are a concept unique to Google Domains”. If you are working with a different domain name provider, this options does not exist.


    synthetic records

  4. In the subdomain field, enter the subdomain where your website is currently hosted. For example, for old.domain.com the subdomain is old.
  5. In the destination URL enter the new address where you want to redirect. This may be a differnt subdomain or a completely new domain, for example: www.somenewdomain.com. At this point you should have a setup similar to this:


    synthetic record configuration

  6. Choose other configuration options.

    • Temporary redirect vs permanent redirect - This selection determines how routers and browsers store your subdomain forwarding information. If you’re not sure which to use, choose Temporary (302).

      A temporary (HTTP 302) redirect allows changes to occur to your forwarding address quickly. When you use a temporary redirect, you can force a lookup to the routing table or DNS server every time.

      A permanent (HTTP 301) redirect allows browsers to cache the forwarding address. When you cache the forwarding address, you may help resolve the address faster on subsequent visits from the same browser. However, changes made to the forwarding address may take longer to occur.

    • Do not forward path vs Forward path - Path forwarding lets you forward the path after the domain name to the same path at the new domain. Use path forwarding when the domain you’re forwarding to has the same structure as the current domain. If you’re not sure, leave path forwarding off

      With path forwarding on
      old.domain.com/about redirects to www.somenewdomain.com/about

      With path forwarding off
      old.domain.com/about redirects to www.somenewdomain.com

    • Disable SSL vs Enable SSL

      When SSL is disabled, forwarding only works for plain HTTP requests.

      When SSL is enabled, forwarding works for both HTTP and HTTPS requests. However note when you select this option you may see the following warning:

      This synthetic record has an error and will not function correctly: The SSL Certificate for this domain hasn’t been created yet. This process may take up to 24 hours to complete.

  7. When you are ready, click Add button. The record is now configured. However be patient as it will take some time for the changes to propagate. If you chose to disable SSL and temporary 302 redirect, the changes will occur faster than if you chose to enable SSL and permanent redirect. Wait at least 5 minutes and test the redirect in incognito/private mode so you are not affected by your previous browsing history.


If you need assistance for professional web services, do not hesitate to contact us.

If you enjoyed this article please share it with your friends!