Blog Shopify fixes

How to connect a custom domain to Shopify (and fix it when it will not connect)

Step-by-step: point your domain at Shopify with the right DNS records, set the primary domain, and fix the usual reasons a domain will not connect.

Illustration for the post "How to connect a custom domain to Shopify (and fix it when it will not connect)"

Two ways to do it

You can buy a domain through Shopify, which connects it for you, or connect one you already own at another registrar such as GoDaddy or Namecheap. The second way means changing a few records in your registrar’s DNS settings, which is where most problems come from.

Step 1: add the domain in Shopify

In your Shopify admin, go to Settings, then Domains, choose to connect an existing domain and type it in. Shopify shows you the records it needs and will check them for you.

Step 2: set the DNS records at your registrar

Log in where you bought the domain and open its DNS settings. You need to point the bare domain and the www version at Shopify. Delete any other A or CNAME records for those names first, because conflicting records are the top cause of failure.

DNS records for a Shopify store text
Type   Name   Value
A      @      23.227.38.65
CNAME  www    shops.myshopify.com

# Optional, for IPv6:
AAAA   @      2620:0127:f00f:5::

Step 3: wait, then verify

DNS changes can take up to 24 hours to spread, though many finish within an hour. Return to Settings, then Domains in Shopify and choose to verify the connection. Your domain shows as connected once Shopify sees the records. A secure certificate is then issued automatically, which can take a further short while.

Step 4: choose the primary domain

In Settings, then Domains, choose which version is your primary domain, for example www.yourstore.com. Shopify redirects the others to it, which keeps search engines from seeing two copies of your store. Turn on the option to redirect all traffic to the primary domain.

If the domain will not connect

These are the usual causes, in the order to check them.

  • The records are wrong or duplicated. Remove any other A record or www CNAME, and compare yours with the table above.
  • It is too soon. Wait a few hours and verify again, since DNS can be slow.
  • The domain uses nameservers somewhere else. Edit the records where the nameservers point, not at the registrar.
  • A CAA record blocks the certificate. Remove it, or allow the certificate authority Shopify uses.
  • The domain is still connected to another store or platform. Disconnect it there first.

Common questions

What is the A record for Shopify?

The default is 23.227.38.65, with a CNAME for www pointing to shops.myshopify.com. Shopify’s help pages note the address can show a slightly different final number after you connect, which is normal.

How long does it take to connect a domain to Shopify?

DNS changes can take up to 24 hours, though many complete within an hour or two. A secure certificate follows once the domain connects.

Should I buy my domain through Shopify or somewhere else?

Buying through Shopify is simplest because everything is set up for you. Buying elsewhere gives you the same result once connected and lets you keep all your domains in one place.