Move from Netlify to Naijacloud
Your Netlify site served as a Naijacloud static site on your own domain, deployed from your terminal, with the Netlify site kept as a rollback.
What things are called here
Before you move: what Netlify has that we don't
- Redirect and rewrite rules, and custom response headers, on static sites.
- Netlify Forms and Netlify Identity.
- Edge Functions and a global edge network.
- Deploy previews and branch deploys for static sites.
- Build plugins.
- Split testing.
If your app depends on one of these, stay on Netlify for now.
The cutover, in order
The order is what keeps the site up. Each step below matches one point on this line.
- 01Lower DNS TTL48 hours before. Set the record to 60 seconds.
- 02Deploy here and add the domainTraffic still goes to Netlify.
- 03Certificate issuedWait for it before you touch DNS, where you can.
- 04Check the new siteEvery page, every route, every asset.
- 05Switch DNSPoint the record at Naijacloud.
- 06Keep the old site 7 daysGoing back is one DNS change.
Lower the DNS TTL, 48 hours before
At your DNS provider, set the TTL on your domain’s record to 60 seconds and wait at least as long as the old TTL. If Netlify runs your DNS, make the change in Netlify’s DNS panel and leave the nameservers where they are until this move is done.
Deploy here and add the domain
Read netlify.toml, and the Build settings in Netlify’s UI, for the build command and publish directory. Then pull the build variables, because your build runs on your machine now:
Netlify sets some variables of its own at build time (URL, DEPLOY_PRIME_URL, CONTEXT). If your build reads them, set your own values in that file. Your .env files stay on your machine: the CLI never uploads them.
Install the Naijacloud CLI and deploy the publish directory. --env takes project/environment; add --spa if the site is a single-page app with client-side routes.
It runs your build, uploads the folder and prints the live address, https://my-site.naijacloud.app. Commit the naijacloud.json it writes; from then on naijacloud deploy updates this site.
Then open the site in the dashboard, go to Domains, enter your domain in Custom domain and click Add domain. Add the records it lists that prove ownership and issue the certificate. Don’t change the routing record yet.
Wait for the certificate
Where the Domains table lists ownership and HTTPS records, the certificate is issued while traffic is still on Netlify. Wait until the domain shows Verified · HTTPS ready.
If the table lists only one routing record (an A record, as it does for a root domain), the certificate is issued in the minutes after the record points here. Plan the switch for a quiet hour.
Check the new site
Go through the site on its naijacloud.app address before anyone else does: the home page, a deep link, a page that only exists in your router, a large image, a 404.
If you used Netlify Functions, deploy them as a Web service with the same routes and point the front end at its address before you switch.
Switch DNS
At your DNS provider, replace Netlify’s record with the routing record shown in Domains. With a 60-second TTL, most visitors follow within minutes. Leave the domain attached to the Netlify site.
Keep the old site for 7 days
Netlify keeps every deploy. Lock the last good one so a stray push doesn’t replace it, and leave the site and its domain in place.
- The Netlify site, with its last good deploy locked
- The domain attached to the Netlify site
- netlify.toml in the repo
- The 60-second TTL on your record
To go back: point the record at Netlify again. A static site has no data to reconcile.