k-sync
Back to blog

Setting up a custom domain on Shopify after WooCommerce (2026)

How to connect your existing domain to Shopify after migrating from WooCommerce — DNS configuration, SSL, www vs apex, Cloudflare, email records, and zero-downtime cutover.

·By k-sync
6 min read · 1,153 words

Switching your domain from WordPress/WooCommerce hosting to Shopify is one of the riskier steps of any migration — get the DNS wrong and your store disappears from the internet for hours or days. This guide covers every DNS record you need to set, how to preserve your email during the cutover, and how to execute the switch with minimal downtime.

Domain options: Shopify-bought vs bring your own

Two approaches to domains on Shopify:

  1. Buy domain through Shopify: Simplest option — DNS auto-configures, SSL auto-provisions. Only valid if you're registering a brand new domain or transferring registrar to Shopify.
  2. Connect existing domain: Your domain stays at your current registrar (GoDaddy, Namecheap, Google Domains, Cloudflare, etc.). You change DNS records to point to Shopify. This is the standard migration path.

For WooCommerce migrations: always connect existing domain. Your domain has SEO authority, backlinks, and customer recognition that you must not lose by changing to a new domain.

Shopify DNS requirements

Shopify requires two DNS record types to route your domain to their servers:

For www subdomain (www.yourstore.com)

Type:  CNAME
Name:  www
Value: shops.myshopify.com

For apex/root domain (yourstore.com — without www)

The apex (bare) domain cannot use a CNAME record (per DNS standards). You have two options:

Option A: A records (most registrars)
Type:  A
Name:  @ (or leave blank)
Value: 23.227.38.65
(Shopify's IP — this is stable but can change; Shopify's documentation has the current IP)

Option B: ALIAS / ANAME record (Cloudflare, Route 53, DNSimple)
Type:  ALIAS (or ANAME)
Name:  @
Value: shops.myshopify.com
(Preferred — follows CNAME logic at the apex level; auto-updates if Shopify changes IP)

Redirect: apex → www (or www → apex)

Shopify requires www as the primary domain. Set your apex (A record) to redirect to www. In Shopify Admin → Settings → Domains, set www as primary — Shopify will handle the www ↔ apex redirect automatically once both DNS records resolve.

Cloudflare-specific configuration

Many WooCommerce stores use Cloudflare for CDN and DDoS protection. When migrating to Shopify:

Proxy status: orange cloud vs grey cloud

Cloudflare DNS settings for Shopify:
- www  CNAME  shops.myshopify.com  [DNS only — grey cloud]
- @    A      23.227.38.65         [DNS only — grey cloud]

If you need Cloudflare's WAF or additional security features in front of Shopify: this requires Shopify Plus with SSL certificate upload support. For standard Shopify, use grey cloud.

Preserving email (MX records)

This is the most common migration mistake: changing DNS records and accidentally breaking email. Your MX records control where email is delivered. They are separate from your A/CNAME records and must be preserved.

Before changing any DNS records, document your current MX records:

Type:  MX
Name:  @
Value: (your email provider — Google Workspace, Microsoft 365, Zoho, etc.)
Priority: 1, 5, 10 (depends on provider)

Additionally, preserve:

These TXT records are independent of your A/CNAME changes and will survive the DNS update as long as you don't accidentally delete them. Review every record in your DNS zone before making changes.

SSL certificate on Shopify

Shopify provisions SSL certificates automatically via Let's Encrypt once your DNS resolves to their servers. SSL provisioning takes up to 48 hours after DNS propagation (usually much faster — often 15–60 minutes).

During SSL provisioning, your site may show an SSL warning or be inaccessible via HTTPS. Plan your cutover timing accordingly:

Step-by-step domain cutover process

  1. Add domain to Shopify first: Admin → Settings → Domains → Add existing domain. Shopify will show you the required DNS records. Note them down.
  2. Lower TTL: 24–48 hours before cutover, reduce your domain's TTL to 300 seconds (5 minutes). This makes DNS propagation faster when you switch.
  3. Document current DNS: Export a full list of your current DNS records. Screenshot every record. You need this as a safety net.
  4. Update DNS records: Add the CNAME for www and A record for apex in your registrar/DNS provider. Keep all other records (MX, SPF, DKIM, DMARC, TXT) unchanged.
  5. Wait for propagation: Use dig www.yourstore.com or dnschecker.org to monitor propagation globally. With TTL at 300s, most regions should update within 15–30 minutes.
  6. Verify in Shopify: Admin → Settings → Domains — the domain should show as "Connected".
  7. Test HTTPS: Visit your store at https://www.yourstore.com — SSL should be active. If SSL warning appears, wait up to 1 hour and test again.
  8. Set primary domain: In Shopify Admin → Settings → Domains, set www.yourstore.com as primary and enable "redirect all traffic to this domain".
  9. Verify redirects: Test that yourstore.com (apex) redirects to www.yourstore.com. Test that old WooCommerce URL patterns redirect correctly (301 redirects configured earlier).
  10. Remove WooCommerce hosting: Only after store is verified live and SEO is confirmed. Keep WooCommerce hosting live for 2–4 weeks for safety.

Timing the DNS cutover

Verifying the cutover

The 5-minute TTL step is the most important preparation you can make before cutover day. Stores that attempt a domain switch with a 24-hour TTL face the original TTL delay before DNS propagates — meaning some customers see the old WooCommerce site for up to 24 hours. Lowering TTL 48 hours in advance ensures that the vast majority of internet resolvers update within minutes of your DNS change. Restore TTL to 3600 or higher after the cutover is confirmed stable.

Migrate your store with k-sync

Connect your WooCommerce store, validate your products, and push to Shopify in minutes. Free for up to 50 products.

Get started free

Related reading

Browse all migration guides