Articles on: Domains & Certificates
This article is also available in:

How to set up your own domain (CNAME/DNS)

1. Prerequisites


Before starting the process, make sure you meet the following requirements:


  • Standard Plan or higher: Square Cloud allows custom domain configuration only for users on the Standard plan or above.
  • A registered domain: You must own a domain purchased from providers such as Registro.br, Namecheap, GoDaddy, Cloudflare Registrar, Squarespace Domains, or another registrar.
  • Cloudflare account (recommended, optional): managing your DNS on Cloudflare (free) is recommended, but the records shown in the dashboard work with any DNS provider.



2. What are Nameservers?


Before configuring your website, you need to understand the concept of Nameservers.


Definition: Nameservers act as the internet's "phonebook". They indicate which service is responsible for managing your domain's records. When you change your Nameservers to Cloudflare, you are telling the internet: "Cloudflare is now in charge of directing traffic to my website."


Transferring management to Cloudflare


If your domain was purchased from Registro.br, GoDaddy, or another provider, you will need to point it to Cloudflare by following these steps:


  1. Create a free account on Cloudflare.
  2. Click on "Add a Site" and type in your domain (e.g., mywebsite.com).
  3. Cloudflare will provide two Nameserver addresses (e.g., nina⁠.ns⁠.cloudflare⁠.com and tom.ns.cloudflare.com).
  4. Access the control panel of your provider (where you bought the domain).
  5. Look for the Change Nameservers or DNS option.
  6. Replace the current addresses with the ones provided by Cloudflare and save.
  7. Wait: the nameserver change can take 24 to 48 hours. Check on dnschecker.org (type NS) that the Cloudflare nameservers show up before attaching the domain on Square Cloud.



3. Configuration on Square Cloud


With DNS management now on Cloudflare, let's prepare your application on Square Cloud.


  1. Access the Square Cloud Dashboard.
  2. Select the application you want to link to the domain.
  3. In the menu, click on the Settings tab and select the Network sub-tab.
  4. In the text field, type your domain or subdomain (e.g., mywebsite⁠.com or api.mywebsite.com).
  5. Click Save.
  6. The system will display the required records:
    • CNAME: <domain> pointing to cname⁠.squareweb⁠.app.
    • TXT: _cf-custom-hostname.<domain> and one or two _acme-challenge.<domain> (create both when two appear; a CNAME _acme-challenge marked as an alternative replaces those TXT records, never together). Create all the records shown, with each exact name. Each record has its own status (pending, pending_validation, active).



4. Configuring Records on Cloudflare


Now, you need to copy the information from Square Cloud over to the Cloudflare dashboard.


  1. In the Cloudflare dashboard, select your domain and go to the DNS > Records tab.
  2. Click on Add Record.


CNAME Record (Required)

  • Type: CNAME
  • Name: @ (if it is the root domain) or your subdomain name (e.g., www or app).
  • Target: cname⁠.squareweb⁠.app.
  • Proxy Status: Keep it as Proxied (Orange cloud) to ensure SSL protection and security.


TXT Records (Required)

  • Type: TXT
  • Name: exactly the name shown in the dashboard (_cf-custom-hostname.<domain> or _acme-challenge.<domain>), never @.
  • Content: Paste the generated verification code.



5. Final Validation


After saving the records on Cloudflare, return to the Network tab on Square Cloud.


  • The system will check the records automatically. Once everything is correct, the domain status will change to Active. A domain still pending 24 hours after you attached it is removed automatically: add it again in the Network tab.



Redirecting www to your domain

  • To redirect www to your domain, create a record named www, type A, Proxied (orange cloud), pointing to 192.0.2.1, a reserved dummy IP that only works with the proxy enabled.
  • Next, in Cloudflare, go to Rules > Redirect Rules and create a rule:
    • Redirect: requests to w⁠ww.
    • Status code: 301 Permanent Redirect
    • Destination: your domain (e.g., mywebsite⁠.com), keeping the path.


Troubleshooting Tips

  • Propagation: If the website does not open, verify if the CNAME is correct using tools like DNS Checker.
  • Cache: If you updated the records but do not see any changes, try clearing your browser cache or purging Cloudflare's cache under the Caching > Configuration > Purge Everything tab.

Updated on: 10/04/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!