You can use Cloudflare to improve the speed and security of your Squarespace site. Cloudflare not only offers a CDN with more than 100 PoPs around the world, but also provides fast DNS propagation, and SSL, to optimize your site experience. Be advised that some of the settings required to use Squarespace SSL will conflict with some of Cloudflare's features. You will need to turn off all CDN and proxy functions for Cloudflare by switching all of your DNS to . By doing this you will then be using Cloudflare only for DNS.
Before getting started
Please check this article from Squarespace about setting DNS records using their service, and select "Other Provider" from the options. After following the Squarespace directions, then please follow the steps below to add the DNS records to your Cloudflare DNS settings.
DNS Configuration within Cloudflare
1. Go to your Cloudflare DNS settings for the domain in question.
2. Squarespace tells you to add two CNAME records to your zone file. The two records will need to be added in the following format in your DNS settings:
- CNAME (the verification code Squarespace tells you to use) is an alias of verify.squarespace.com.
- CNAME www is an alias of ext-cust.squarespace.com.
3. Squarespace then tells you to add multiple A records to your DNS zone file, which would look like the following in your Cloudflare DNS settings:
- A - yourdomain.com - points to - 22.214.171.124
- A - yourdomain.com - points to - 126.96.36.199
- A - yourdomain.com - points to - 188.8.131.52
- A - yourdomain.com - points to - 184.108.40.206
Replace yourdomain.com with your actual domain name (zone name).
You may notice that Squarespace will tell you within Admin Settings that there are issues with the configuration. You should see an error displaying that the "Settings contain problems". If you drill into the errors you will see that some or all of the records may be duplicated, will show "Record not found" or will show a red entry of a Cloudflare IP. THIS IS EXPECTED. It means that Cloudflare's proxy is working as expected.
Refreshing may show changing responses under Current Data, and may sometimes show "Correct" but will not return consistent details. If your domain is not yet verified with Squarespace, you will receive an error page.
Once Squarespace has verified the domain, your URL should take you to your site.
Now that you have your Squarespace site setup on Cloudflare, you can do three quick things to implement SSL, ensure ipv6 connectivity, and make your site safer/faster.
Make sure your Squarespace site requires a secure connection
SSL is enabled by default in the Crypto section of Cloudflare. While this enables your domain to take advantage of SSL, Page Rules allows you to enforce all visitors to connect to your domain securely.
Create a Page Rule for HTTP that includes an asterisk before and after your domain, and select
- If the URL matches - http://*domain.com/*
- CLICK "+ A Setting" and select "Always Use HTTPS"
- Make sure the ORDER is set to FIRST
- CLICK Save and Deploy
More details can be found in this article.
The IPv6 option can be found under the Network tab in your Cloudflare dashboard. For new zones it will be defaulted on, but if your domain was previously registered with Cloudflare you may want to check. To learn more about IPv6 click here.
Make your site faster and safer
Last, but certainly not least, you should consider some additional Page Rules to optimize your site's security, speed, and bandwidth usage. This includes optimizing caching options, configuring your WAF, and more. Please refer to our helpful Page Rules video tutorials for a complete walk through on these settings.