How to Connect a Custom Domain to Shopify
Option 1: Buy a Domain Through Shopify
Go to Settings, then Domains, then click "Buy new domain." Search for your desired domain name. If the .com is available, Shopify charges $14/year with automatic renewal. After purchase, the domain is automatically connected, SSL is provisioned, and it becomes your primary domain within minutes. No DNS configuration required.
Buying through Shopify is the fastest path from zero to a connected domain. The domain registration includes WHOIS privacy (your personal contact information is hidden from public domain lookups), automatic renewal, and email forwarding (you can forward info@yourdomain.com to your personal email). The pricing is competitive with major registrars: GoDaddy charges $12 to $20/year for .com, Namecheap charges $9 to $13/year, and Cloudflare Registrar charges $9 to $10/year at cost.
The tradeoff is that domains purchased through Shopify are managed within Shopify's admin. If you ever leave Shopify, you would need to transfer the domain to another registrar (which Shopify supports but adds a step to your migration). If you plan to use the same domain for non-Shopify services (email hosting, subdomains for other projects, or a future platform migration), buying from an independent registrar gives you more control.
Option 2: Connect a Domain You Already Own
If you already have a domain at GoDaddy, Namecheap, Google Domains, Cloudflare, or any other registrar, you connect it to Shopify by changing two DNS records. The process is the same regardless of your registrar, though the interface for editing DNS records differs.
Step 1: Find Your DNS Settings
The DNS settings go by different names at different registrars: "DNS Management" at GoDaddy, "Advanced DNS" at Namecheap, "DNS" at Cloudflare, and "DNS" at Google Domains. Look for a section where you can see and edit A records, CNAME records, and other DNS record types.
Step 2: Update the A Record
Find the existing A record for your root domain (often shown as "@" or "yourdomain.com" in the host field). Change its value to 23.227.38.65. If no A record exists, create a new one with host "@" (or your domain name) and value 23.227.38.65. Set the TTL (Time to Live) to the lowest available option, commonly 600 seconds or "Automatic."
The A record tells the internet's DNS system that when someone types yourdomain.com into their browser, the request should go to Shopify's server at IP address 23.227.38.65. If you have multiple A records for the root domain (pointing to a previous hosting provider), delete the old ones and keep only the Shopify record. Having multiple A records causes unpredictable behavior where some visitors reach Shopify and others reach the old server.
Step 3: Update the CNAME Record
Find the existing CNAME record for "www" and change its value to shops.myshopify.com. If no CNAME record exists for www, create one with host "www" and value "shops.myshopify.com" (the trailing period is optional and depends on your registrar).
The CNAME record handles the www version of your domain. When someone types www.yourdomain.com, the CNAME record redirects the request to Shopify's servers. Shopify then redirects either www to non-www or non-www to www based on your primary domain setting, ensuring all visitors reach the same URL regardless of which version they type.
Step 4: Add the Domain in Shopify
Go to Settings, then Domains. Click "Connect existing domain." Enter your domain name (e.g., yourdomain.com) and click "Next." Shopify verifies that your DNS records point to the correct addresses. If the DNS changes have not propagated yet, Shopify will show a pending status. Click "Verify connection" to check again later.
After adding the domain, Shopify automatically provisions a free SSL certificate through Let's Encrypt. SSL provisioning takes a few minutes to a few hours after DNS propagation is complete. Until the SSL certificate is active, visitors may see a browser security warning when visiting your domain over HTTPS. Do not remove the store password protection until the SSL certificate is confirmed active (you will see a green "SSL pending" or "Connected" status in the Domains settings).
Step 5: Set as Primary Domain
In Settings, then Domains, click "Change primary domain" and select your custom domain from the list. This ensures that all traffic, including visits to your myshopify.com URL, redirects to your custom domain. Consistent domain usage is important for SEO, because search engines treat yourdomain.com and yourstore.myshopify.com as separate websites.
Registrar-Specific Instructions
GoDaddy
Log in to your GoDaddy account. Click "My Products," then "DNS" next to your domain. In the records table, find the A record with "@" in the Name column and click the pencil icon to edit it. Change the Value to 23.227.38.65 and save. Find the CNAME record with "www" in the Name column, edit it, change the Value to shops.myshopify.com, and save. If you have a "Forwarding" or "Masking" setting enabled for your domain, disable it, because it conflicts with the DNS records.
Namecheap
Log in to Namecheap, go to "Domain List," and click "Manage" next to your domain. Click the "Advanced DNS" tab. Edit the A Record for "@" to point to 23.227.38.65. Edit the CNAME Record for "www" to point to shops.myshopify.com. If Namecheap's parking page or redirect is active, delete the URL Redirect Record that may exist in the host records. Save all changes.
Cloudflare
Log in to Cloudflare and select your domain. Click "DNS" in the left sidebar. Edit the A record for your root domain (shown as the domain name or "@") to point to 23.227.38.65. Edit the CNAME record for "www" to point to shops.myshopify.com. Important: for each record, click the orange cloud icon to toggle it to gray (DNS only). Cloudflare's proxy (orange cloud) can interfere with Shopify's SSL provisioning and CDN. Once your domain is connected and SSL is active, you can re-enable Cloudflare's proxy if you want Cloudflare's additional security features, but start with it disabled.
Google Domains (now Squarespace Domains)
Google Domains transferred to Squarespace in 2023. Log in to domains.squarespace.com, click on your domain, then click "DNS" in the left menu. Under "Custom records," add or edit the A record for "@" to 23.227.38.65 and the CNAME record for "www" to shops.myshopify.com. Save changes.
Troubleshooting Common Issues
DNS not propagating after 48 hours: Use a DNS lookup tool like whatsmydns.net to check if your A and CNAME records are returning the correct values globally. If some regions show the old values, your registrar may have a long TTL setting. Lower the TTL to 300 seconds (5 minutes) and wait for the previous TTL period to expire. If records look correct globally but Shopify still shows "pending," click "Verify connection" in Shopify's domain settings to force a recheck.
SSL certificate not provisioning: Shopify's SSL provisioning requires DNS records to be correctly configured and propagated. If SSL shows as pending for more than 24 hours after DNS propagation, check that you do not have conflicting DNS records (multiple A records, a proxy like Cloudflare's orange cloud enabled, or a CAA record that restricts certificate issuance to a specific authority). Remove conflicts and the SSL certificate should provision within hours.
"This connection is not private" error: This appears when the SSL certificate is not yet active. Wait for Shopify to provision the certificate (check the status in Settings, then Domains). If the error persists after 48 hours and the domain shows as "Connected" in Shopify, contact Shopify support, as there may be a certificate provisioning issue on their end.
Email stopped working after connecting domain: If you were using email on this domain (e.g., yourname@yourdomain.com through Google Workspace, Microsoft 365, or your registrar's email), check that your MX records were not deleted or overwritten during the DNS changes. The A and CNAME changes for Shopify should not affect MX records, but some registrars reset all records when you modify the zone. Verify your MX records are intact and re-add them if they were removed.
Subdomains: If you want to use a subdomain (e.g., shop.yourdomain.com) instead of the root domain, create a CNAME record for "shop" (instead of "www") pointing to shops.myshopify.com. Then add shop.yourdomain.com as a domain in Shopify settings. This is useful if your main domain hosts a separate website (like a WordPress blog) and you want the Shopify store on a subdomain.
