Skip to main content

Migrating existing clients

This article is for web hosts moving sites they already host onto stillorigin. It isn't a guide for your customers.

If you haven't set up stillorigin yet, follow the Setup guide first and protect a test site. Then come back here when you're ready to move your existing clients.

The idea is simple: move one origin server at a time, not site by site across every server. The origin agent lists the sites it finds on that server. You add them in batches, test through the sentry, then point the website's public DNS at your sentries.

stillorigin never changes DNS. Traffic only moves when you point the public A and AAAA records at your sentries, or at a cluster VIP if stillorigin support has helped you set one up. Adding domains in the portal doesn't change anything for visitors until you test or change DNS.

Before you start​

You should already have:

  • a cluster and at least one sentry showing Online — step 2 of the Setup guide;
  • every sentry's HTTPS key approved, if you plan to turn Website protection on;
  • access to change DNS for the sites you'll move, or a plan for clients who use their own DNS (see below).

Find clients who use their own DNS​

Do this before you start moving a server. Some clients manage DNS themselves, or use a third-party provider such as Cloudflare or Azure DNS. Those records won't change when you update the nameservers or DNS you control, so you need to flag those domains and plan the cutover with the client.

This is your own process. stillorigin doesn't look up who hosts a domain's DNS, and it doesn't change records for you.

Don't rely only on the NS records a resolver returns. Those can be rewritten or aliased by the current DNS provider, so they don't always show who actually controls the domain. Instead, check the registry's official delegation with an RDAP lookup (the registry's public record of the nameservers it has delegated the domain to). Flag any domain whose nameservers aren't yours, so you know who needs to update records at cutover. See Clients on external DNS.

Lower TTLs a day ahead​

A day before you change public DNS, lower the TTL of the A and AAAA records you're about to change, for example to 300 seconds. Then a switch, or a rollback, takes effect quickly. stillorigin doesn't read or change TTLs; you do this at the DNS provider. See Point DNS at your sentries.

Leave mail, FTP and panel hostnames where they are​

Sentries only forward web traffic: TCP ports 80 and 443. They don't proxy SMTP, IMAP, POP, FTP, or control-panel ports to the origin.

If you point a hostname used for mail, FTP, or WHM, cPanel, Plesk or DirectAdmin at a sentry, those services won't work through stillorigin. Keep MX records, and the hostnames used for mail and the control panel, pointed at the origin or at a dedicated mail hostname. Only the website A and AAAA records should move.

Watch for names that follow the website with a CNAME. cPanel's default zone makes mail., ftp., webmail. and other service names CNAMEs of the domain, so they move with the website's A record. Make them A records to the origin first. On cPanel servers, the WHM plugin's Keep mail and cPanel services on this server check does this for you, and can point MX records that follow the website at mail. too.

Certificate checks still reach the origin. ACME HTTP-01 (/.well-known/acme-challenge/) and /.well-known/pki-validation/ are passed through to the origin, and they aren't limited by the per-IP request limit. stillorigin doesn't issue certificates. Keep AutoSSL, Let's Encrypt or your usual renewal running on the origin. The origin agent sends a renewed certificate once it finds it. See Certificate expiry.

Let your sentries through the origin's firewall​

Once sites are behind stillorigin, all web traffic arrives from your sentries. Before you switch DNS, allow every sentry's public IP through the origin's firewall and any auto-ban tools (CSF, Imunify360, Plesk Fail2Ban trusted IPs, and similar) on the origin's HTTP and HTTPS ports. See Let your sentries through the origin's firewall.

Bring one server online at a time​

Finish one origin server (add it, install the origin agent, add its domains, test, then switch DNS) before you start the next. That way a problem is limited to one server, and you can roll that server back without touching the rest.

  1. Add the origin under Origins › Add origin server. See step 3 of the Setup guide.

  2. Allow every sentry's public IP through that origin's firewall, as above.

  3. Install the origin agent on that server. Only an account owner can create the install command, and you must run it as root within one hour. It works once.

    On cPanel, Plesk and DirectAdmin, the agent detects the panel itself. On a server with no panel, it reads site names from nginx or Apache.

    Enhance is not detected automatically. Tick This origin server uses Enhance before you copy the command, and run it once for the whole Enhance install, on a server that can reach the Enhance panel. See Enhance.

    On a cPanel server, the same installer also installs the cPanel plugin. You still need to turn Manage protection on in Feature Manager; it isn't turned on for existing plans automatically.

  4. Wait until the origin page shows the origin agent as Connected. That means the agent has checked in within the last 15 minutes. If it stays Not connected, see Origin agent status.

  5. On the origin page, review Not protected yet: the domains the agent found that you haven't added yet. The Certificate column shows Found or None found. Then add domains in batches, as in the next section.

The origin agent never adds a domain by itself. Nothing is protected until you choose names and add them.

Add domains in batches​

On the origin page, Not protected yet lists domains the origin agent found on that server. You can search the list. It shows Certificate (Found or None found) and First found. Found means the agent has a currently valid certificate whose names cover the domain. This is not a full Website protection check: a self-signed or untrusted certificate, or one with a bad chain, can still fail once you turn Website protection on.

  1. Open Origins and click Edit on the origin you're moving.
  2. Under Not protected yet, tick the domains for this batch.
  3. Under Add to cluster, choose the cluster.
  4. Under Protection, choose Network protection or Website protection (starts in log mode).
  5. Click Add to cluster. You can add up to 500 domains at a time. If you need more, add another batch.

Names already in the account (including the other half of a www pair) are hidden. You can also add a domain by hand if it isn't in the list. Your sentries pick up a new domain within about a minute. See Not protected yet.

Network protection or Website protection​

  • Network protection has no log mode. It's on for every added domain as soon as traffic reaches the sentry: per-IP limits, temporary bans, your deny list and the stillorigin naughty list. HTTPS is passed through unopened. See Network protection vs Website protection.
  • Website protection always starts in log mode. The WAF (if you've turned it on for the cluster) and some Website protection rules record what they would block, but let those requests through. WordPress hardening, rate limits and the admin login lock still block. An account owner later uses Switch to blocking.

A practical path for a migration is to add the batch as Network protection, switch DNS, then turn Website protection on (it starts in log mode) and switch to blocking once you've checked what log mode would have blocked. If you want to confirm HTTPS inspected before you change public DNS, add the batch as Website protection (starts in log mode) instead, after you've approved each sentry's HTTPS key.

If you choose Website protection and you don't have room for every selected domain, nothing in that batch is added. Add a licensed sentry, buy Website protection licences, or add fewer domains. See Not protected yet.

Confirm everything before you change public DNS​

There is no single page in the portal that says a server or domain has passed a migration check. Confirm these yourself for the server you're moving, then test through the sentry, before you change public DNS.

  • The sentry shows Online.
  • The origin agent shows Connected.
  • For sites you'll protect with Website protection, Certificate shows Found on Not protected yet, or Certificate found on Domains. Remember that this is not a promise HTTPS inspection will succeed.
  • If you've already turned Website protection on, the domain shows HTTPS inspected on Domains. Approve each sentry's HTTPS key first, and wait for the certificate to reach a ready sentry. If you're cutting over as Network protection, do this after you turn Website protection on.
  • Test traffic appears in the portal (see below).

Test through the sentry​

Test without changing public DNS, so only your test is affected.

  1. Check that the address you're testing from isn't on the naughty list, at stillorigin.app/check. See Checking an IP address.
  2. Send a request for the domain to the sentry with curl --resolve, for HTTP and HTTPS. The Setup guide has the exact commands. A request with Host: not-my-site.invalid should be 403 Forbidden.
  3. Optionally, map the domain to the sentry in your computer's hosts file and browse the site, including www if you use it, and a login if the site has one. Only your computer is affected.
  4. In the portal, check that test traffic appears: Passthrough HTTPS / hr, Allowed/hr and Blocked/hr on Domains, and the domain's Traffic tab. On Logs › Blocked IPs, the invalid-host test shows with the reason unknown-host. The Getting started card ticks Point your domain's DNS at your sentry once the sentry has counted traffic, and the hosts file test counts too.
  5. For plain HTTP, check the origin's access log shows your address, not the sentry's. See Check the origin sees real visitor addresses. Over HTTPS while Website protection is off, the origin seeing the sentry's address is expected unless you've set up PROXY protocol.

Don't run load tests or open hundreds of connections from your own address to "see it block": you can temp-ban yourself and land on the deny list.

Point DNS at your sentries​

When the tests look right, make the change for everyone. You do this at the DNS provider. stillorigin never creates, updates or deletes DNS records, and it doesn't talk to the registrar or a DNS provider.

  1. If you haven't already, lower the TTL a day ahead.
  2. Replace the domain's A record with one A record per sentry, each pointing at that sentry's public IPv4 address. With one sentry, use a single A record. With several, DNS spreads visitors across them (round-robin DNS).
  3. Do the same for www if it has its own A record.
  4. Remove any AAAA (IPv6) records that point straight at the origin, or IPv6 visitors will bypass the sentry. If your sentries have IPv6 addresses, add one AAAA record per sentry instead.
  5. If stillorigin support has helped you set up a cluster VIP, point the A and AAAA records at that floating IP instead of at each sentry. See VIP.
  6. Remove any hosts-file test lines, then confirm with dig +short that the domain shows only your sentries' addresses (or the VIP).

On Domains, the domain's traffic figures rise as real visitors arrive.

If a sentry goes down: round-robin DNS does not check whether a sentry is healthy, so some visitors keep being sent to the failed sentry. Remove its A record until it is back. A low TTL (such as 300 seconds) makes this take effect quickly.

Once everything works, you can restrict the origin's firewall so web traffic is only accepted from your sentries' addresses. See Let your sentries through the origin's firewall.

Leave MX records and mail, FTP and panel hostnames pointed at the origin, as in Leave mail, FTP and panel hostnames where they are.

Clients on external DNS​

For clients whose DNS is at a third-party provider (for example Cloudflare or Azure DNS), you have two options. Both are your own process. stillorigin doesn't store DNS tokens and doesn't change those records for you.

The simpler option is to ask the client to update the website A and AAAA records at cutover, after they've lowered the TTL. Give them the sentry addresses, or the cluster VIP if you have one, and keep mail, FTP and panel hostnames unchanged.

The alternative is to collect a token from the client so you can make that one-time swap yourself. If you do:

  • use a token scoped to that one zone, with permission to edit DNS only;
  • use it once at cutover, then revoke it;
  • handle it securely: keep it in a password manager, don't put it in email, a ticket or chat, and revoke it as soon as the cutover is done.

After cutover​

  • Watch traffic on Domains and on the domain's Traffic tab as visitors arrive.
  • If you added the sites as Network protection, turn on Website protection and test it when you're ready. New domains with Website protection start in log mode. Wait for HTTPS inspected, then switch to blocking after you've checked what log mode would have blocked.
  • Set up domain owner access if you want customers to see their site's protection, and create sign-in links from the portal, the API or the cPanel plugin.

cPanel​

On a cPanel server, the origin agent installer also installs the cPanel plugin. It adds a Manage protection page that lists the signed-in user's sites that already have Website protection on, and each Manage protection button opens that site's owner area. The plugin doesn't add domains, change DNS, or turn Website protection on or off.

After the plugin is installed, turn Manage protection on in WHM › Packages › Feature Manager for the plans that should have it. It isn't turned on for existing plans automatically.

The IP address cPanel shows​

On cPanel, the IP address shown to your customers is often the origin's shared IP. Once a site is behind stillorigin, the address they should use for the website is a sentry address, or the cluster VIP if you have one. See Show your sentry's IP address in cPanel: you can add a notice on the Tools page, optionally show the sentry address in place of the shared IP, and put the change back after a cPanel update.

If you need to roll back​

stillorigin will not move DNS back. Point the website A and AAAA records at the origin again first, and wait for the old TTL to pass so visitors stop arriving at the sentry. If you lowered the TTL, this takes effect quickly. Don't remove a domain or a sentry that is still receiving visitors.

Then, if you want to undo the stillorigin side as well:

  • Turn Website protection off for a domain on Domains (the Website protection button, or Turn off Website protection). The domain keeps Network protection. Owner settings are kept and apply again if you turn Website protection back on. HTTPS for that domain is passed through unopened again.
  • Remove a domain from its row on Domains. If public DNS still points at the sentry, visitors then get 403 Forbidden (the same unknown-host behaviour as in the pre-DNS test). The name can reappear under Not protected yet if the origin agent still sees it on the origin.
  • Remove an origin only after you've pointed DNS away or assigned the domains another origin. Domains that used it stay in the account but have no origin, so visitors would see the stillorigin offline page if DNS still pointed at the sentry.
  • Uninstall the origin agent if you're taking the agent off that server. In the portal, an account owner clicks Remove agent. To uninstall the software as root:
curl -fsSL https://control.stillorigin.app/downloads/install-agent.sh | sudo bash -s -- --uninstall

On a cPanel server, this also removes the cPanel plugin. Then remove the agent in the portal too, if you haven't already. Network protection (and Website protection for HTTP) continue as long as the domain and DNS still point at the sentries; only HTTPS inspection inspection needs the agent. See Removing the origin agent.

To take a sentry out of service, remove its DNS records first and wait for the TTL, then follow Removing a sentry.