Link Cloudflare connected domain to Squarespace
You can add Cloudflare to your Squarespace website for additional features. While most Squarespace websites don’t need Cloudflare services due to Squarespace's provision of free SSL certificates, content backup, and high-traffic ready infrastructure, some may benefit from extra features provided by Cloudflare. Here is a step-by-step guide to using Cloudflare with your Squarespace website.
In this particular use case, we will connect a Cloudflare zone to a Squarespace site as a third-party domain. The domain’s registrar is Namecheap, and Cloudflare has been connected as the DNS manager.
Connect a Cloudflare zone to your site
I dig into these tutorials from both Squarespace and Cloudflare
While Squarespace generally recommends using the DNS-only mode and turning off proxying on Cloudflare (disabling the orange cloud icon) to prevent potential issues, I'm opting to follow Cloudflare's advice. This involves proxying all records except the verify.squarespace.com
CNAME, which should remain DNS-only.
Step 1: Connect domain to Squarespace
From your Squarespace dashboard, open Settings - Domains & Email
Open the Domains panel.
Click Use a Domain I Own.
Enter the domain name you want to connect in the Enter Domain field, then click the arrow, eg: beyondspace.info
Click Connect Domain.
Step-by-step included
Here's an interactive tutorial
** Best experienced in Full Screen (click the icon in the top right corner before you begin) **Step 2 - Review your DNS settings
After pressing Continue on the previous step you will land on the DNS settings page, keep it open for reference, you will need to enter these DNS records into Cloudflare in order to connect domain to the site. At the moment all the DNS records are not found, this is expected
Step 3 - Add DNS records to DNS manager
Open a new tab to login to Cloudflare dashboard, which is your current DNS manager, and start enter the all the DNS records to Cloudflare DNS manager, the details steps are slightly different from what Squarespace suggested, is is proved working on Cloudflare documentations
All
A
records should be ProxiedThe
CNAME
record forwww
should also be Proxied.The
CNAME
record forverify.squarespace.com
should be DNS-only.
3.1 - Add first CNAME records
Alias or Host Name | Type or Record Type | Points to |
---|---|---|
Copy nique code under Host on the first line. | CNAME or CNAME Alias | verify.squarespace.com |
Add new DNS record in Cloudflare
Type: CNAME
Name: Copy the unique code under Host column in Squarespace DNS
Target: verify.squarespace.com
Proxy status: DNS only (by toggle the Proxy status switch)
Alias or Host Name | Type or Record Type | Points to |
---|---|---|
www | CNAME or CNAME Alias | ext-cust.squarespace.com |
Add new DNS record in Cloudflare
Type: CNAME
Name: www
Target: ext-cust.squarespace.com
Proxy status: Proxied (by toggle the Proxy status switch)
Host or Host Name | Records, Record Type, or Type | Points To or Details |
---|---|---|
@ | A | 198.185.159.144 |
@ | A | 198.185.159.145 |
@ | A | 198.49.23.144 |
@ | A | 198.49.23.145 |
Add following A records in Cloudflare
Type: A
Name: @
Target: given IP in target
Proxy status: Proxied (by toggle the Proxy status switch)
Step 4: Wait for the DNS records to propagate
It might take anywhere from 24 to 72 hours for the connection to begin working correctly. In the meantime, you can check on the connection's status and domain settings in the Domain overview panel.
Review domain connection
After some time, my new domain now can connect to Squarespace website, if you check the domain DNS in Squarespace, there will be some error like below, acording to Cloudflare, it is expected and you can use the Cloudflare services now
For this particular use case, the new domain added will be redirected to Squarespace primary domain, which is default Squarespace behavior, to check if the domain has connected to Cloudflare or not I used the tool from Selesti for that matter
Secondary domain check - Cloudflare connect
Primary domain check - Not connect to Cloudflare
What can we do with Cloudflare
Since the secondary domain will be redirect to primary one, I did not have much chance to test all the feature, but some notable info like:
Cloudflare Worker HTMLRewriter does not seem to work with Worker Routes
Redirects rules works: now Cloudflare sit between my domain and the visitors, and I can redirect the traffic to different domain other than the primary domain.
Zone-level Web Application Firewall (WAF) works, I can block visitor from certain IPs or countries
And that all I know for now, next I will migrate my primary domain of this website to Cloudflare and write an article, stay tuned!