Connecting a custom subdomain for your customer account pages
By default, your customer accounts pages, such as the sign-in page, the orders page, and the profile page, use a shopify.com URL format as their base domain, similar to shopify.com/1234567890/account with a unique ID number for your store. For example, the sign-in link at the top of your store is something similar to shopify.com/authentication/1234567890/login, and the URL for the main orders page could be similar to shopify.com/1234567890/account/orders.
This also includes the Order status page.
To retain your store's branding, you can create a subdomain for customer accounts that uses your online store's primary domain instead of the default shopify.com URL. The domain name that you create is a subdomain of your primary domain name that you use for your store. The subdomain becomes the primary domain name for all customer account pages, providing a consistent branded experience from sign-in through to account management, and enhancing customer trust in your store.
For example, if your primary domain is your-store.com, then you could create an account subdomain: account.your-store.com. Customers could access the sign-in page at account.your-store.com/authentication/login, and check their order history at account.your-store.com/orders. If you change your primary domain, then your customer account domain updates accordingly. To check or change your primary domain, go to Settings > Domains in your Shopify admin.
On this page
Before you begin
Before you add a subdomain for your customer accounts pages, you need to connect a domain to your online store. The domain can be managed by Shopify, or you can connect a third-party domain to Shopify.
If your domain isn't managed by Shopify, then you also require the following information:
- Your login information for your third-party domain provider account.
- Your domain provider's requirements.
If you're still using legacy customer accounts, then you can set up your subdomain before you upgrade to the latest version of customer accounts. Setting up your subdomain first means that your customer account pages use your own domain as soon as you upgrade, instead of a shopify.com URL.
Your legacy customer account pages, such as the sign-in page, keep their existing URLs until you complete the upgrade. The Order status page is the exception. It uses the new subdomain as soon as you set the subdomain as the primary domain for customer accounts, even if you haven't upgraded your customer accounts yet.
Required steps for accounts with third-party identity providers or social sign-in
If you've configured a third-party identity provider or social sign-in options for your customer accounts, then you must update your provider settings to include the new subdomain before you make the change in Shopify. If you change your customer accounts domain in Shopify before you update your provider settings, then customers won't be able to sign in until you complete the update.
To avoid any period where customers can't sign in, follow this order of operations:
- Decide on your new custom subdomain (for example:
account.your-store.com), but don't change it in Shopify yet. - Add the new domain to your identity provider or social sign-in settings. Don't remove your current domain information; just add the new one alongside it.
- Return to Shopify and follow the steps on this page to change your customer accounts domain to the new custom URL.
- Optional: After confirming sign-in works on the new domain, you can remove the old domain from your provider settings.
| Your current sign-in provider | What you'll need to update: |
|---|---|
| Third-party identity provider (such as Auth0 or Okta) | Redirect URI and sign-out URL. Refer to Updating your identity provider when changing your customer accounts domain. |
| Social sign-in: Google | JavaScript origins, redirect URLs, and deauthorize callback URL. Refer to Updating your social sign-ins when changing your customer accounts domain. |
| Social sign-in: Facebook | Domains, redirect URLs, and deauthorize callback URL. Refer to Updating your social sign-ins when changing your customer accounts domain. |
Create and connect a customer accounts subdomain for your Shopify domain
When you create a subdomain for customer accounts with a Shopify-managed domain, the Target value is Customer Accounts.
Steps:
From your Shopify admin, go to Settings > Customer accounts.
In the Customer accounts section, the URL field displays a preview of the current URL. Click Change domain.
In the Change customer accounts domain dialog, enter a descriptive string in the New domain field that identifies the subdomain name that you want to use for customer accounts. For example, if you enter the string
account, then you create the following URL for your customer accounts pages:account.your-store.com.Click Save.
You're taken to the new subdomain's details in the Domains settings. It might take up to 48 hours for your subdomain to be propagated and verified.
After your customer accounts subdomain is connected, you must set it as the primary domain for customer accounts to display the subdomain to customers. You can then update any hardcoded links to your customer account pages to use your new customer accounts URL.
Create and connect a customer accounts subdomain for your third-party domain
To create a subdomain for your customer accounts using a third-party domain, you need to create the subdomain in Shopify, add a CNAME record in your domain provider's settings, and then verify the connection.
Step 1: Create the subdomain for your customer account pages
From your Shopify admin, go to Settings > Customer accounts.
In the Customer accounts section, the URL field displays a preview of the current URL. Click Change domain.
In the Change customer accounts domain dialog, enter a descriptive string in the New domain field that identifies the subdomain name that you want to use for customer accounts. For example, if you enter the string
account, then you create the following URL for your customer accounts pages:account.your-store.com.Click Continue. You're taken to the page for your domain in the Domains settings.
To change your domain provider account settings, click Follow settings instructions. You're taken to your domain provider's website.
Step 2: Create a new CNAME record in your third-party domain provider account settings
- On your domain provider's website, log in to your account.
- Find the DNS settings or domain management area.
- Do the following.
- Create a new CNAME record.
- Change the Host name to the string that you created for your customer account subdomain name. For example,
account. - Point the CNAME record to
shops.myshopify.com. - Save your changes, and then return to the page for your domain in the Shopify admin.
Step 3: Verify that customer account domain is connected to Shopify
- On the page for your domain in the Domains settings, if the DNS records table isn't displayed, then click Manual setup to expand it. Click I updated DNS records.
- After your customer account domain name is connected and verified, click Back to customer accounts. On the Customer accounts page, a
Connectedlabel is displayed in the Customer accounts field.
It might take up to 48 hours for your subdomain to be verified.
After your customer accounts subdomain is connected, you must set it as the primary domain for customer accounts to display the subdomain to customers. You can then update any hardcoded links to your customer account pages to use your new customer accounts URL.
Update customer account domain links
Complete these steps after your customer accounts subdomain is connected and verified. Setting the subdomain as the primary domain is required. Updating hardcoded links is optional.
Make the subdomain the primary domain for customer accounts
After you connect your customer accounts subdomain, you must set it as the primary domain for customer accounts to make it display live for customers.
Steps:
From your Shopify admin, go to Settings > Domains.
Under Customer Account, click your custom subdomain (for example:
account.your-store.com).In the Domain target and type section, next to Type, click Change.
In the dialog, select Primary domain.
Click Change domain type.
Optional: Update any hardcoded links to the new customer accounts domain
Links that use the previous shopify.com address, such as hardcoded links in your theme or emails, still forward customers to your subdomain. However, if your subdomain doesn't point directly to Shopify, for example because it's routed through a third-party proxy, then customers who use those links might get an unsafe link warning for customer accounts before they're forwarded. To send customers directly to your account pages without the warning, update any hardcoded links to use your new customer accounts URL.
Check the following locations for links that use the shopify.com address:
- Menus and buttons in your online store
- Custom code in your theme
- Emails and marketing messages
- Apps and custom storefronts that link to customer accounts
Steps:
From your Shopify admin, go to Settings > Customer accounts.
In the URL section, copy your customer accounts URL.
In each link that starts with
shopify.com/, your store ID, and/account, replace that part of the link with the URL that you copied. Keep the rest of the link as it is. For example, changeshopify.com/1234567890/account/orderstoaccount.your-store.com/orders.