Connecting a custom domain to your VeloCMS blog
Choose your DNS path (Cloudflare, ALIAS/ANAME or a standard registrar), add the records in the safe order, and roll back if needed.
Custom domains are available on the Pro plan and above. With one, your site is served at your own address, such as example.com, instead of yoursite.velocms.org, and the SSL certificate is issued for you. What differs from one setup to the next is where your DNS is hosted, and that decides which of three paths you follow. This guide covers the choice, the exact records, the safe order for replacing a site that is already live, and how to undo it.
Before you start
You need a domain you own, an active Pro or higher plan, and access to the DNS settings of whoever hosts your DNS (often your registrar). Only the site owner can add or remove a domain.
Replacing a site that is already live? Before you change anything, save a copy of every DNS record the domain has today: export the zone, or screenshot every page of the record table, including email records. That copy is your way back. Keep the old site running as well; the safe order below never switches it off.
Pick your path
A subdomain such as blog.example.com is the easy case on every provider: one CNAME record plus the ownership TXT record, and nothing else in this guide applies. A root domain (example.com) is different, because a plain registrar cannot point a bare root domain at another host. Where your DNS is hosted decides the path.
- Path 1, Cloudflare (recommended when the root domain is your main address). Your DNS is on Cloudflare, or you move your nameservers there (the free plan is enough). The root domain is the main address and www redirects to it.
- Path 2, an ALIAS or ANAME provider. Your DNS provider lets you create an ALIAS or ANAME record on the root (check yours). The root domain is the main address and www redirects to it.
- Path 3, a standard registrar. Your provider offers neither. www is the main address and the root domain is forwarded to it.
In Admin → Settings → Branding, in the Custom domain section, typing a root domain reveals a checkbox: "Use the root domain as the main address". Tick it for Paths 1 and 2. Leave it unticked for Path 3, which works on any registrar. Not sure which applies? Path 3 works everywhere. You can change your mind later by disconnecting the domain and adding it again, which restarts verification.
Step 1: Add the domain in Admin
Go to Admin → Settings → Branding and find the Custom domain section (it is also at /admin/setup/custom-domain). Type your domain into "Your Domain" and click "Add Domain". The panel then shows the records for your case: the traffic record (a CNAME or ALIAS pointing at a target that is unique to your domain, something like www-example-com.domains.velocms.org) and an ownership TXT record. Copy both exactly as shown. In root-domain mode the panel offers two tabs, "Cloudflare DNS" and "ALIAS / ANAME provider", each with its own record set.
Path 1: Cloudflare (root domain as the main address)
- Put your DNS on Cloudflare if it is not there yet. Add the domain to a Cloudflare account (the free plan is enough) and recreate every record the domain already has, mail records included, set to DNS only. Compare them with your saved copy, then change the nameservers at your registrar to the two Cloudflare ones. The change can take up to 48 hours to settle, though it is often much faster.
- Add the ownership TXT record first. The panel shows its name (it looks like _railway-verify.<label>) and its value. Create a TXT record with exactly that name and value. It does not change anything visitors see.
- Wait for verification and the certificate (see the safe order below).
- Point the root domain at the target: a CNAME named @ whose value is the target from your panel, with the proxy status set to DNS only (grey cloud). Cloudflare flattens a CNAME on the root automatically. A proxied (orange) record hides the target and verification will not complete. If the root already has an A record, edit that record in place instead of deleting it and adding a new one.
- Handle www: create an A record named www pointing at 192.0.2.1 with the proxy turned on (orange cloud). That address is a reserved placeholder that is never contacted; the record only exists so the redirect rule can run.
- Create the redirect. In Cloudflare open Rules, then Redirect Rules, and create a Single Redirect. Match the request URL with the wildcard pattern https://www.example.com/* and redirect to https://example.com/${1} with status 301, and turn on Preserve query string. Add the same rule for http://www.example.com/* if you expect plain-http links.
Type Name Value Proxy
TXT _railway-verify.<label> (shown in your panel) n/a
CNAME @ (target shown in your panel) DNS only (grey)
A www 192.0.2.1 Proxied (orange)
Rule https://www.example.com/* -> https://example.com/${1} 301, keep query stringPath 2: ALIAS or ANAME provider (root domain as the main address)
- Add the ownership TXT record first, with the exact name and value from the panel.
- Create an ALIAS (or ANAME) record named @ whose value is the target from your panel.
- Send www to the root domain with your provider's URL redirect or forwarding feature: www.example.com to https://example.com, permanent (301), keeping the path and query string.
- Test the redirect over HTTPS. In a private window open https://www.example.com/some-page?a=1. It must land on https://example.com/some-page?a=1 with no certificate warning. If your provider's forwarding cannot do that, move your DNS to Cloudflare and use Path 1 for the redirect.
Path 3: standard registrar (www as the main address)
- Add the domain with the root-domain checkbox left unticked. Add the ownership TXT record first, with the exact name and value from the panel.
- Create a CNAME record named www whose value is the target from your panel.
- Forward the root domain: in your registrar's Forwarding or URL Redirect settings, add a permanent (301) redirect from example.com to https://www.example.com that keeps the path and query string.
- Run the HTTPS check. In a private window open https://example.com/some-page?a=1 (https, not http). It must land on https://www.example.com/some-page?a=1 with no certificate warning. Many forwarding services cannot serve a certificate for the bare root domain, or drop the path. If yours does, move your DNS to Cloudflare and redirect with a rule instead; the panel lists those steps under the check.
The safe order for a site that is already live
Whichever path you follow, replace a live site in this order. Every step has a check, and every step can be undone.
- Save a copy of the current DNS records (see Before you start). A day or more ahead, lower the TTL of the records you will change to 300 seconds, so both the switch and a rollback take effect within minutes.
- Add the domain in Admin and copy the target and the ownership TXT from the panel. Nothing public changes yet.
- Add the ownership TXT record only. Leave the traffic records pointing at the old site.
- Click "Verify Now", and use "Check DNS records" to compare what is live with what the panel expects. Repeat until the panel reports the domain verified and the certificate issued or being issued. If the certificate looks stalled, Verify Now also asks for it to be issued. The panel can keep showing a pending state until the traffic record points at us; that is expected.
- Switch the traffic record in a quiet hour. Edit the existing record in place (for example change the root A record into a CNAME) rather than deleting it and adding a new one, so the name is never empty. Then reload the site in a private window.
- Only once the main address loads, add the sibling redirect (www to the root domain on Paths 1 and 2, the root domain to www on Path 3) and test it with a deep page and a query string.
- Check the result: the panel shows Active, both addresses open with a deep page and a query string, and the browser shows a valid padlock.
If the panel still shows the certificate as pending when you switch the traffic record, visitors may see a certificate warning for the first minutes. Pick a quiet hour, keep the saved records at hand, and roll back (below) if it does not clear.
How to roll back
Until you retire the old site for good, undoing the switch is a DNS edit. Restore the records from your saved copy one at a time, in the reverse order you changed them: the sibling redirect first (disable the rule and put www back), then the main traffic record (edit it back in place to its old type, value and proxy setting). With a 300-second TTL the old site is back within about five minutes. The ownership TXT record is harmless; leave it. Do not click "Disconnect" in Admin while a traffic record still points at the target. Restore DNS first, then disconnect if you want the domain gone. Leaving the domain added makes a retry quick.
Keep the old site live until a real order has gone through
Do not cancel the old shop or host, remove its domain connection, or tell customers it is gone until a real customer order has gone through the new site end to end: the customer paid, the payment shows in your payment provider's dashboard, the order appears in your admin, and the confirmation email reached the customer's inbox rather than spam. A test purchase of your own proves the pipeline, but it does not prove a stranger can find you and buy through the new domain. Export what only the old platform holds (orders, customer lists, gift-card balances, discount codes) before you cancel. As a rule of thumb give it at least two weeks, and if no real order arrives, keep the old site and check again weekly.
Domain status states
- Pending DNS: the ownership TXT or the traffic record has not been seen yet. Add or fix the records, then click Verify Now.
- Verifying: the records are seen and the SSL certificate is being issued. Wait a few minutes and click Verify Now again.
- Active: DNS verified, certificate issued, serving traffic. Nothing left to do.
- Failed: certificate issuance failed. The panel shows the error; see Troubleshooting.
Troubleshooting
Stuck on Pending DNS after 30 minutes
Check the ownership TXT record first: dig TXT with the exact name from your panel must return the value shown there. The domain will not verify with only the traffic record. Then check the traffic record itself (dig CNAME for the name you created). If your DNS is on Cloudflare, make sure the traffic record is DNS only (grey cloud). If an old A record still exists on the same name, edit or remove it. A high TTL on the old record can keep it cached for up to a day. Click Verify Now to force a re-check.
Stuck on Verifying, or a certificate warning in the browser
Check for a CAA record on your domain (dig CAA example.com). A CAA record that does not allow Let's Encrypt blocks the certificate: add letsencrypt.org or remove the restrictive record. On a root domain, confirm the CNAME flattening or ALIAS record is really in place. Certificates usually finish within an hour of the records going live. If still stuck after 24 hours, click Disconnect and add the domain again to start a fresh attempt.
The redirect fails over HTTPS or loses the path
That is a limit of the registrar's forwarding service, not of your records. Use a Cloudflare redirect rule instead (Path 1), and repeat the HTTPS check.
Status shows Failed
Read the error in the panel. A conflicting CAA record is the common cause. Fix it, then click Verify Now. If it fails again, disconnect and re-add the domain, and contact [email protected] with the domain name if it still fails.
Disconnecting a domain
Go to Admin → Settings → Branding, find the Custom domain section, and click "Disconnect". Your site returns to yoursite.velocms.org immediately, and you can then delete the CNAME, ALIAS and TXT records from your DNS. If the domain still serves a live site, restore your old records before you disconnect.