Link a Domain Hosted on Cloudflare

4. EC + SC (EN).png

⚠️ Before you begin: This feature is supported in the yearly plan only.

This article will guide you through how to use the Cloudflare platform to manage your domain.

 

Step 1. Log in to Cloudflare

Go to Cloudflare Homepage and log in.

Screenshot 2025-07-23 at 3.16.27 PM.png

 

Step 2. Select "DNS"

Go to [DNS] and click Add record.

mceclip7.png

 

Step 3. Add CNAME records

i. Subdomain

Set the Proxy status to "DNS Only". SHOPLINE will then issue the SSL certificate for you and apply DDoS protection.

Name subdomain
Type CNAME
Target Your complete custom domain.cname.shoplineapp.com
Proxy status DNS only 圖片_1_png__1029×511_.jpeg

 

Example

*Note: This is an example. Please enter your actual domain information when setting up.

For example, if the domain name is "www.shopline.tw", the CNAME record will be as follows:

Name www
Type CNAME
Target www.shopline.tw.cname.shoplineapp.com
Proxy status DNS only 圖片_1_png__1029×511_.jpeg

 

mceclip9.png

 

ii. Root domain

Name root domain
Type CNAME
Target subdomain
Proxy status Proxied 圖片_1_png__1090×564_.jpeg

*Note: You must set this in advance for the 301 redirect below to take effect.

 

Example

*Note: This is an example. Please enter your actual domain information when setting up.

For example, if the domain name is "www.shopline.tw", the CNAME record will be as follows:

Name @
Type CNAME
Target www.shopline.tw
Proxy status Proxied 圖片_1_png__1090×564_.jpeg

 

mceclip10.png

 

Step 4. Create a new page rule

Select [Rules] > [Page Rules] and click Create Page Rule.

mceclip11.png

 

URL: root domain. The settings will be:

Pick a setting Forwarding URL
Select status code 301 - Permanent Redirect
Enter destination URL https://your complete URL

*Note: Please enter "https://" in "Enter destination URL".

 

Example

*Note: This is an example. Please enter your actual domain information when setting up.

For example, if the domain name is "www.shopline.tw", the page rules will be as follows:

URL: shopline.tw. The settings will be:

Pick a setting Forwarding URL
Select status code 301 - Permanent Redirect
URL Enter destination URL https://www.shopline.tw

 

mceclip12.png

Once all the above records are set, you can view them in the DNS records management page.

 

How do I find my subdomain?

Please enter your web store with your browser. Go to your store homepage and check the URL in the address bar. The word in between the [/] & first [.] will be your subdomain (as shown below): 

子網域示意圖(繁中).png

 

Step 5. Wait for propagation

After completing the above settings, please allow some time for the changes to take effect. You can use Google Toolbox: Dig (DNS lookup) to check whether the CNAME record has been successfully applied.

We also recommend contacting our Online Merchant Success Team via the blue chat icon 截圖 2023-08-08 下午2.19.17.png in the SHOPLINE Admin. Let them know that the setup is complete so they can help you verify and confirm the configuration.

 

Optional

Step 6. Enable Cloudflare Proxy

*Note: This step is optional. Please ensure you have completed all steps through Step 5 and confirmed the CNAME record has taken effect and the SSL/TLS certificate has been successfully issued before proceeding.

You can visit an SSL Checker website and enter your store domain to verify whether the SSL/TLS certificate has been successfully issued. 

For example, if your store domain is: "www.shopline.tw", a successfully issued certificate will appear as shown below:

image-20260105-074717.png

After confirming that the SSL/TLS certificate has been successfully issued and is active, you can switch the subdomain from Proxy Disabled () to Proxy Enabled ()

Once the proxy is enabled, store traffic will first pass through Cloudflare's edge network before being forwarded to the origin server (your web store).

 

*Notes:

  • Before enabling the proxy, please ensure the "Cloudflare Encryption mode" is not set to "Flexible" or "Off (not secure)". You can navigate to [SSL/TLS] > [Overview], then click Configure to view or update the Encryption mode settings.
image-20260105-090501.png
  • If the Encryption mode is set to "Flexible" or "Off", visitors may encounter an ERR_TOO_MANY_REDIRECTS error when accessing your store.

 

Example

*Note: This is an example. Please enter your actual domain information when setting up.

Name subdomain
Type CNAME
Target Your complete custom domain.cname.shoplineapp.com
Proxy status

Proxied

image.png

 

 

Read more

Have more questions? Submit a request

Comments