Using Cloudflare with Shopify

Shopify is a service for building and operating your own ecommerce websites on a dedicated hosting platform. Cloudflare can be used with Shopify stores if you have your own custom domain (example: Below are instructions for setting up Cloudflare and Shopify.

What do you need to get started?


To configure Shopify with Cloudflare, follow these steps:

1. Log in to your Shopify account.

2. Go to the admin panel and click on “Settings”.

3. Click on “Domains”, then on the next page click “Add an existing domain”.

4. On the popup select “Add a domain name I already own” and type in your domain name.

5. Create an A record within your Cloudflare DNS settings page that is named after your domain name. Then point that record to the IP address provides.

Note: Shopify might assign a different IP address to your account. A points to Shopify IP 

Alternatively, you can run Shopify under a subdomain (e.g. using the same IP by repeating step 3 and add as an existing domain. In your Cloudflare DNS settings add the following A record and point it at the Shopify IP we got earlier. A points to Shopify IP

Once this is done you may remove the root domain from shopify which gives you the ability to point your root domain ( to a separate website.


Using Cloudflare's SSL with Shopify

In order to use SSL with Shopify, you have two options:

  • If your online store is not eligible for SSL certificates - use the Full SSL setting on Cloudflare.
  • If your online store is eligible for SSL certificates and you have activated SSL on Shopify - use the Full(strict) SSL setting on Cloudflare.

What Cloudflare features work with Shopify?

  • The Cloudflare CDN will cache static resources that are hosted within your Cloudflare enabled domain (any/all subdomains included), but resources loaded through domain and subdomains will not go through Cloudflare.
  • DDoS protection and Web Application Firewall (WAF) services work seamlessly with Shopify to ensure your site is always online and protected from hackers. Please note that your site must be “orange clouded” (active on Cloudflare) to receive this protection, and that your admin and checkout pages are still on Shopify’s domain, and, therefore, not protected by Cloudflare.
  • Hotlink protection is incompatible with Shopify because most of the resources are loaded from Only resources that are hosted within your Cloudflare-enabled domain can benefit from this feature.
  • Rocket Loader works on standard Shopify pages, but may interfere with third-party scripts.
  • HTML Minifying works, but JS and CSS minifying will only work for resources that are hosted within your Cloudflare-enabled domain.
  • Cloudflare Page Rules may be used for additional caching, forwarding, and customization.
Not finding what you need?

95% of questions can be answered using the search tool. This is the quickest way to get a response.

Powered by Zendesk