To publish a website, choose a host that fits its code and data, prepare a preview and test the visitor’s journey. Domains, permissions, backups and payments each need their own checks.
A working local page solves only part of the task. For a published site, determine where code runs, where data is saved, who has access, and how to restore the last working version.
I choose hosting after answering these questions. A list of "best free services" does not explain differences between static pages, server apps, and systems with persistent background processes.
Where to host the site
| Scenario | What is required | Candidate for review |
|---|---|---|
| Static pages | File distribution, HTTPS, domain | Vercel or Cloudflare Pages |
| Site where part of the code runs on the server | Support for required language and programs, settings and limits | Vercel; suitable option Cloudflare Workers |
| Personal Account with Data | Authorization, database, rights, server operations | App Plus Supabase |
| Bot that must run continuously | Constantly running program, restart after failure, error logging | Server still needs to be chosen and checked |
These are options for comparison. Before choosing, ask Codex to identify which programs the site needs and if the chosen hosting can run them.
Vercel Hobby is allowed for personal noncommercial use. Check the plan terms before using it for a business website. Check payment terms, limit overages, and possible costs separately.Vercel Hobby.
For Next.js, Cloudflare distinguishes static export in Pages and a full app on Workers. The current page recommends vinext for server scenarios. Before migrating an existing project, check compatibility of specific features and the current adapter. Cloudflare: Next.js.
Choose free or paid website hosting
Publish a preview first
Vercel uses three names. Local means working on your computer. Preview means test publishing on a separate link. Production means the live site for visitors.
Publishing, or deployment, creates the address of the selected site version. Open exactly it and test main actions. If Git is connected, code push may automatically update the site. Find out in advance which branch the working version comes from. A branch stores a separate line of project changes. Vercel: deployments.
Before launch, record the site preparation command, app folder, and setting names. These settings are often called environment variables. Do not record secret values in the plan. The test version must use training data and designated accesses. The person opening the preview must not accidentally submit a real order.
The working site may have different settings than the test version: data, post-login return addresses, domain, and variables may differ. Prepare a separate run of the main user path for release.
How to prepare a site for test publication.
The prompt prepares a publication plan. Deploy separately in the selected test account, then check the resulting URL.
Supabase: login and data permissions
Signing in does not by itself determine which records a user can access. Describe the model: what a visitor sees without login, what the owner sees, what is available to staff. For example, Anna should see her requests, Boris his own.
Two levels of rules are needed. The first allows the action itself, e.g., reading a table. In documentation, these are grants. The second defines which records the user sees. This is RLS. Check both levels. Supabase RLS.
For code running in the visitor's browser, a publishable key, a public connection key, is provided. It is allowed only with properly configured access rights. Secret key and old service_role provide extended access and bypass RLS. Such keys must be stored on a server where user rights for actions are separately verified. If the key is in page code, visitors can see it. Supabase: API keys.
Before setup, ask Codex to check the Supabase update log. As of October 8, it describes personal tokens with limited rights. They are needed to manage the service and do not replace the site data access key. Some frameworks' old connections via @supabase/server are already marked as obsolete. Do not copy settings from an old article without verification. Supabase changelog.
How to check user access to application data
Define the data model first. A generic SQL block may expose more data than the app needs, so this book starts with the access model before writing a migration and running checks.
Connect a domain and preserve email
Add the domain in the selected project's settings and use the records shown by its panel. For Vercel, the documentation distinguishes between the main domain and subdomain; specific values do not need to be copied from someone else's screenshot.
DNS links the site name to the server address. If you change the service that stores these records (nameservers), transfer all existing records in advance. Including MX for mail and TXT for confirmations and settings. Otherwise, mail may stop working along with the site.
If you only change the website address at your current DNS provider, the other records do not need to move. Open the site with and without www, check the final URL and confirm that HTTPS works. Vercel: Domain Setup.
Domain purchase, renewal, DNS, and certificate are separate steps. Renewal cost check is separate from initial discount.
Back up data and test recovery
Supabase explicitly states: database backup saves file metadata in Storage, cloud storage. The files themselves are not included in such a backup. After database restoration, a deleted file will not reappear automatically. Plan separate file backups and verify their restoration along with records. Daily backups and point-in-time recovery (PITR) are available depending on the plan. Supabase: backups.
For a release, save the code version, schema and data state, necessary settings, and links to external resources. Keep secret information separately. Local experience in chapter 13 shows the difference between restoring code and data; it does not replace testing cloud database recovery.
Accept payments on your site
First use the test store of the chosen provider. The server creates a payment and stores its ID. A person visiting the "Thank You" page alone does not confirm payment receipt. Check the operation status with the service.
In YooKassa the key for repeatable operation is called Idempotence-KeyIt helps distinguish repeated requests from new payments; conditions and validity periods are described in the API. After an undefined error, first determine the operation's state. YuKassa: Request Format.
Service notification may come again. Verify authenticity and current status, then update order without second access issuance. YuKassa: notifications.
How to build an online store with Codex