Google Apps is one of the popular suite of cloud computing productivity and collaboration software tools and software which competing with Office 365 and the like. One of its main feature is hosted email solution based on Gmail, where the users send and receive emails for the domain name of their corporations or organizations through hosted Gmail server.

All Google Apps accounts requires a primary domain, for example, techjourney.net. When you change the domain name, you may want to change the primary domain for Google Apps too so that it’s reflecting the new domain name change, especially when you no longer use or control the old domain, or plan to let the old domain expires.

This tutorial guides you on how to change the primary domain on Google Apps by utilizing an official API provided by Google. It works on subscription-based Google Apps for Work (formerly Google Apps for Business) and free grandfathered Google Apps legacy accounts.

Note
Google updated its policy since March 15th, 2016, which disallows changing of primary domain for Google Apps account (including grandfathered free Google Apps account) during trial subscription period. If you attempt to change the primary domain, you will get the following error message:

{
“error”: {
“errors”: [
{
“message”: “Changing primary domain is not allowed in trial subscription period.”
}
],
“code”: 500,
“message”: “Changing primary domain is not allowed in trial subscription period.”
}
}

You should perform the steps outlined in this tutorial with an Administrator account from the Google Apps account which has Super Admin role.

For legacy grandfathered Google Apps Free Edition account, perform the following steps. If you’re using Google Apps for Work with paid subscription, skip to next section.

You MUST downgrade back to Google Apps Free edition while still in your 30 day trial (i.e. before trial ends), after which you will be unable to downgrade, and will lose the free Google Apps account.
If you already have multiple secondary domains added to your grandfathered legacy Google Apps Free Edition account, DO NOT attempt to add any new domain (excluding domain alias which is supported by Google Apps Free Edition), as you won’t be able to downgrade to free account again until you remove and delete all secondary domains. Else, you will get the following message if you attempt to cancel subscription with more than one domain added:

Your subscription to Google Apps for Work will be cancelled immediately, and all user data will be deleted. You cannot undo this process.

  1. Login to the Google Admin for your Google Apps account.
  2. Upgrade to a paid account by select UPGRADE NOW button on the Admin console home page, or by going to Billing and select UPGRADE TO GOOGLE APPS FOR WORK.

    Google Apps Upgrade Now

    Note
    Google provides 30 days enterprise trial for upgrading to Google Apps for Work, which means you can upgrade and enjoy full features without paying for 30 days and without the need to enter credit card.
  3. Fill up the form, tick the check box for “I have read and agree to the Google Apps for Work agreement” and hit I accept! Upgrade my account to proceed.
  4. Once successfully upgraded (which should be done instantly), proceed to next section.

The following steps will guide you on how to add the new domain to your Google Apps account, and then set it as the primary domain.

  1. On Google Admin console, select Domains.
    Note
    If you can’t see “Domains” icon, click or tap on MORE CONTROLS as the bottom of the console.

    Domains in Google Apps Admin Console

    Alternatively, just visit https://admin.google.com/AdminHome#DomainsDetails:.

  2. Click or tap on Add/remove domains, or visit https://admin.google.com/AdminHome#Domains:.
  3. Click or tap on the ADD A DOMAIN OR A DOMAIN ALIAS button.

    Add a Domain in Google Apps

  4. Select the radio button of Add another domain, and then enter the new domain name which you want to use on Google Apps. Hit CONTINUE AND VERIFY DOMAIN OWNERSHIP button when done.

    Add Another Domain in Google Apps

  5. Follow the domain verification wizard provided by Google to verify your domain.
  6. Once the new domain is verified, visit the following URL:

    https://developers.google.com/admin-sdk/directory/v1/reference/customers/update

  7. Click or tap on Try it now to update a customer.

    Google Apps API Try It Now

  8. Enter the following values for 2 text boxes:

    customerKey: my_customer
    fields: customerDomain

  9. click or tap on the box for Request body to reveal the drop down — add a property — selection box). In the drop down list, select customerDomain.
  10. In the customerDomain field of “Request body”, enter the secondary domain (new domain) which you want to make primary domain.

    Note: Domain name should be entered without www (i.e. typically the domain listed in email address after the @).

    Update Google Apps Customer with API

  11. Click or tap on AUTHORIZE and EXECUTE button.
  12. If prompted to select OAuth 2.0 Scopes, make sure https://www.googleapis.com/auth/admin.directory.customer which allows access to view and manage customer related information is selected, and then click or tap on AUTHORIZE and EXECUTE button again.
  13. Hit Allow again to grant Google APIs Explorer access.

    Allow Google APIs Explorer

  14. The new domain, which was initially added as secondary domain, is now the primary domain for the Google Apps Account. You can open or refresh the Domains app in Admin Console to view the change.

For Google Apps for Works paid subscription account, the change of primary domain on Google Apps is basically done. For legacy free Google Apps account, if you want to keep your free Google Apps account after 30 days, it’s IMPORTANT to cancel the Google Apps for Works subscription and downgrade to free account. Follow these steps to do it:

  1. On Google Admin console, select Users.
    Note
    If you can’t see “Users” icon, click or tap on MORE CONTROLS as the bottom of the console.
  2. Select a user, go to Account, click or tap on Edit link below Basic information. Select the new primary domain from the drop down list after the @, and hit UPDATE.

    Edit Google Apps User Domain

    Repeat for all existing users who are using the old domain as their email address.

    Note
    After updating the domain suffix of the users, they will be automatically logged out. Log in again using the new email with new primary domain name and same password.
  3. Go back to Google Admin console Home, select Groups.
    Note
    If you can’t see “Groups” icon, click or tap on MORE CONTROLS as the bottom of the console.

    Alternatively, just visit https://admin.google.com/AdminHome#GroupList:.

  4. Select a group, and click or tap on “Pen” icon to change group info. Select the new primary domain from the drop down list after the @ for group email, and hit SAVE GROUP INFO.

    Edit Google Apps Group Domain

    Repeat for all existing groups which are using the old domain as their email address.

  5. Go back to Google Admin console Home select Domains.
    Note
    If you can’t see “Domains” icon, click or tap on MORE CONTROLS as the bottom of the console.

    Alternatively, just visit https://admin.google.com/AdminHome#DomainsDetails:.

  6. Click or tap on Add/remove domains, or visit https://admin.google.com/AdminHome#Domains:.
  7. At the end of the line of old domain (now becomes secondary domain), click on REMOVE. Click or tap on REMOVE again when asked to confirm removal.

    Note: You are unable to delete a domain if it’s been used by any user, group, alias and etc. Fix all of them in order to be able to remove a domain.

    If you have additional secondary domains, you must remove ALL OF THEM.
  8. Once all secondary domain is deleted (only primary domain and domain aliases are listed), go back to Google Admin console Home, select Billing
  9. Click or tap on three vertical dots at the end of the “Google Apps for Works” listed under “Subscription”, and select Cancel subscription.

    Cancel Google Apps Subscription

  10. Select the radio button of Downgrade to Google Apps, and hit Continue.
  11. Hit I ACCEPT to accept the Google Apps (Free) Agreement.
  12. You’re now back to legacy free Google Apps edition.
Tip
Google Apps automatically assigns the old email address of the users and groups with old domain name as secondary email address (alias of primary email address) when changing the email address. Thus, if you add the old domain name as a domain alias or secondary domain (for paid Google Apps account only), the users can continue to receive email messages at old email address.