Shopify & Ecommerce

Shopify Custom Domain Setup: A Pre‑Launch Guide to Avoid DNS Mistakes

Learn how to connect a custom domain to your Shopify store before you go live. Follow a step‑by‑step checklist, see a realistic example, and avoid common DNS pitfalls.

You're ready to launch your Shopify store, but you still see the default yourstore.myshopify.com URL. The first decision you need to make is whether to connect a custom domain you already own, or buy one through Shopify. This article walks you through the entire Shopify custom domain setup process before you commit to a paid plan, so you can launch with a professional web address and avoid DNS headaches.

Why a Custom Domain Matters Before You Go Live

A custom domain builds trust, improves branding, and helps with SEO. It also prevents you from having to change URLs later, which can break existing links and affect search rankings. Setting it up early means you can test the domain, verify SSL, and make sure all marketing assets point to the right address before any customers arrive.

Prerequisites Checklist

  1. Domain ownership: You must own a domain name (e.g., mybrand.com) registered with a domain registrar such as Namecheap, GoDaddy, or a local provider.
  2. Access to DNS settings: Ability to edit A records, CNAME records, and possibly TXT records for verification.
  3. Shopify trial or free plan: You can add a domain while on a free trial; the store does not need to be paid yet.
  4. Basic understanding of DNS terms: A record (points a domain to an IP address), CNAME (aliases one name to another), TTL (time‑to‑live).

Step‑by‑Step Shopify Custom Domain Setup

1. Choose the domain you want to use

If you already have a domain, skip to step 2. If you need to buy one, consider purchasing directly from Shopify (they act as a registrar) or from your preferred registrar. Buying through Shopify simplifies later steps because Shopify automatically configures the DNS for you, but it may be slightly more expensive than some local registrars.

Referral disclosure: Nextpath Solutions may receive a referral fee if you create a Shopify account through these links.

Start your Shopify store

2. Add the domain in Shopify

  • Log in to your Shopify admin.
  • Navigate to Online Store > Domains.
  • Click Connect existing domain and enter your full domain (e.g., mybrand.com).
  • Shopify will display two DNS records you need to create: an A record pointing to 23.227.38.65 (Shopify’s IP) and a CNAME record for www pointing to shops.myshopify.com.

3. Update DNS records at your registrar

Log in to the registrar’s control panel and locate the DNS management page for your domain.

  1. Root domain (apex) record: Create or edit an A record for @ (or leave the host field blank) and set the value to 23.227.38.65. Set TTL to the lowest allowed (often 300 seconds) for faster propagation during testing.
  2. WWW sub‑domain: Add a CNAME record for www that points to shops.myshopify.com. Again, use a low TTL.
  3. If your registrar supports “ALIAS” or “ANAME” records for the root, you can use those instead of an A record; the target is still shops.myshopify.com.

Save the changes. DNS propagation can take from a few minutes to 48 hours, but with low TTL you’ll usually see the update within an hour.

4. Verify the connection in Shopify

  • Return to the Shopify Domains page and click Verify connection.
  • If verification succeeds, Shopify will show a green check and begin provisioning an SSL certificate. This may take up to 48 hours; you’ll see a status like “SSL pending”.

5. Set the primary domain

Once SSL is active (the lock icon appears), choose which version of the domain you want customers to see. Most store owners set www.mybrand.com as the primary domain and enable automatic redirects from the root (mybrand.com) to www. Shopify provides a toggle for this under the same Domains page.

6. Test the live URL

Open a private/incognito browser window and type both mybrand.com and www.mybrand.com. Verify that:

  • The page loads without security warnings (HTTPS lock is present).
  • Both URLs redirect to the primary domain you selected.
  • No “Page not found” errors appear.
If any of these checks fail, revisit the DNS records and ensure there are no conflicting records (e.g., old CNAMEs or forwarding rules).

Explore Shopify

Realistic Example: From Purchase to Live Domain

Assume you are a Pakistani entrepreneur named Aisha who bought brightkitchen.pk from a local registrar for $12/year. She wants to launch a Shopify store selling kitchen accessories.

  1. Day 1: Aisha logs into Shopify trial, goes to Online Store > Domains, and clicks “Connect existing domain”. She enters brightkitchen.pk.
  2. Day 1 – later: Shopify tells her to add an A record pointing to 23.227.38.65 and a CNAME for www to shops.myshopify.com. She logs into her registrar, adds those records, and sets TTL to 300 seconds.
  3. Day 2: After about 45 minutes, the DNS check in Shopify turns green. Shopify starts issuing an SSL certificate. Aisha sees “SSL pending”.
  4. Day 3: SSL is active. She sets www.brightkitchen.pk as the primary domain and enables the redirect from the root.
  5. Day 3 – evening: Aisha opens brightkitchen.pk and www.brightkitchen.pk in a private window. Both load securely, showing her store’s homepage. She updates her social media bios and email signatures with the new URL.

By completing the domain setup before the first paid Shopify plan, Aisha avoided a situation where customers would see a .myshopify.com address after launch, which could damage brand perception.

Common Mistakes and How to Fix Them

  • Leaving the old “forwarding” rule active: Some registrars automatically forward the root domain to www. This can interfere with Shopify’s redirect settings. Disable any forwarding and rely on Shopify’s built‑in redirect.
  • Adding multiple A records: If the domain already points to a previous host (e.g., a shared web server), remove those extra A records. Having more than one A record can cause “mixed content” warnings.
  • Forgetting to set the CNAME for www: Without the CNAME, www.mybrand.com will not resolve, leading to a “Server not found” error for the primary domain.
  • Not waiting for SSL: Trying to launch the store before the SSL certificate is active will show a “Not secure” warning. Wait until the lock icon appears.
  • Using a domain with unsupported characters: Some country‑code TLDs have restrictions on DNS records. Verify with your registrar that the domain can host CNAME/A records for Shopify.

Practical Checklist Before You Publish

  • Domain purchased and ownership confirmed.
  • Access to DNS management panel.
  • Added Shopify‑provided A record (23.227.38.65) for the root.
  • Added CNAME record for www pointing to shops.myshopify.com.
  • Removed any old forwarding or conflicting records.
  • Verified connection in Shopify and waited for SSL to be active.
  • Set primary domain and enabled automatic redirects.
  • Tested both root and www URLs in a private browser.
  • Updated all marketing assets (social, email, ads) with the new domain.

When to Consider Professional Help

If you encounter any of the following, it may be worth hiring a DNS specialist or a Shopify Expert:

  • Your registrar’s interface is confusing or lacks the required record types.
  • You need to set up advanced DNS features like DNSSEC or custom MX records for email while keeping the domain on Shopify.
  • SSL provisioning fails after 48 hours despite correct DNS settings.

These scenarios often involve time‑sensitive troubleshooting, and a professional can resolve them quickly, keeping your launch schedule on track.

Conclusion

Connecting a custom domain is a straightforward but critical pre‑launch step for any Shopify store. By following the ordered plan above, testing both the root and www versions, and using the checklist, you can launch with a professional URL and avoid common DNS pitfalls. If you get stuck, the official Shopify help article “Connecting a third‑party domain” provides up‑to‑date instructions, and a specialist can help resolve stubborn issues.

Get started with Shopify