How to Deploy a Website: From Local Build to Live Domain

Learn how to deploy a website from local files to a live domain, compare deployment tools, fix common errors, and launch securely for free, step by step.

by Audrey at Enter

The home-service website had reached a public address. Its Contact page loaded, the navigation appeared, and the enquiry form accepted typed details. That was useful progress. What I still wanted to see was the result after someone pressed Send enquiry: a saved request, a clear response, and a way to recover if the release went wrong.

That distinction matters when you learn how to deploy a website. Uploading files is one stage; getting the right build, configuration, domain, and customer workflow working together takes a few more checks. A successful hosting job can coexist with a broken form or a route that disappears on refresh.

We will use a five-page home-service website throughout this guide, with Home, Services, Pricing, About, and Contact routes. You will follow its conventional deployment path, compare hosting options, and see what our Enter Pro captures demonstrate. The same acceptance conditions apply to both routes.

What Website Deployment Actually Means

Website deployment moves a particular version of your project into an environment where people can use it. The website deployment process usually involves preparing a build, configuring hosting, publishing a URL, connecting a domain, and checking the result. Projects with databases or server functions add more moving parts.

The image illustrates the website deployment process from source files to a live website

Figure 1. Source, build, and live release are separate stages with different evidence.

Deployment, Hosting, and Publishing Are Different

I separate these terms because each has a different success signal. Paying for hosting does not prove your latest code is running. Likewise, a completed build tells you little about whether customers can reach the intended address.

Term What it does Evidence you can inspect
Hosting Serves files or runs application code Reachable infrastructure and a compatible runtime
Production build Converts source into deployable output Completed build and output directory
Deployment Installs one version in an environment Deployment ID, commit, timestamp, and logs
Publishing Makes a version accessible to visitors Working public URL
Release Approves a version for real use Passed checks and an available recovery path

Local, Preview, and Production Serve Different Purposes

Local is your development workspace. Preview gives reviewers a hosted version to inspect, and production serves the public website. You can use the same application code across them while keeping different API endpoints, credentials, and data.

For this home-service project, I want preview enquiries kept separate from real customer leads. You should be able to test a rejected submission without contacting customers or polluting the production database. A preview URL alone does not guarantee that separation; its configuration must provide it.

Identify the Website Type Before Choosing a Deployment Method

Before choosing a host, find out what happens when someone requests a page. Does the server return finished files, render HTML dynamically, execute PHP, or call a database? That answer narrows the infrastructure you need far more effectively than a list of popular platforms.

Match the Architecture to Its Runtime

Website type What you need Suitable direction Frequent mistake
Static HTML, CSS, and JavaScript File serving and HTTPS Static host or CDN Buying an unnecessary application server
Vite frontend Build command and static output Git-connected static hosting Publishing editable source instead of the build
Server-rendered application Supported runtime and protected configuration Application hosting Expecting a static host to execute server code
WordPress or another database-backed CMS Runtime, database, storage, and backups Compatible CMS hosting Moving files without migrating content
Containerized application Container runtime, health checks, and persistent services Container platform or VPS Forgetting process recovery and monitoring

I also check the enquiry destination. A static page can send a form to an external endpoint. If your own application validates and saves enquiries, the backend needs somewhere to run, appropriate permissions, and a production connection.

Define What the Home-Service Website Must Prove

Our example has five routes, a mobile menu, an enquiry form, and a useful missing-page experience. The form needs field validation, a loading state, a success response, and a recoverable failure state. These are observable requirements, rather than a general request to make the site “production-ready.”

You can write the acceptance conditions in one short release record: the intended routes work directly, an old contact address redirects correctly, a valid enquiry produces one saved record, and a failed submission retains the visitor's input. Add the canonical domain, conversion event, and previous working version before launch.

Prepare a Reproducible Production Build

When explaining how to deploy a website, I start with the version being published. Record the Git commit, runtime version, dependency lockfile, build command, and output directory. Otherwise, a teammate may rebuild the same source with different dependencies and get a different result.

Turn Source Code into a Deployable Artifact

For a conventional Vite project with a valid lockfile, the basic sequence is:

npm ci

npm run build

npm run preview

The production build normally goes into dist/. The preview command lets you inspect that output locally; it is not intended to serve production traffic. If your configuration changes the output directory, update the hosting setting to match it.

The image shows a webpage section titled

Figure 2. Vite documents the dist output directory and separates build previews from production hosting.

Your editable project includes components, source styles, and development configuration. The generated artifact contains the HTML, scripts, styles, and assets that the browser needs. I check the artifact itself for missing images and incorrect paths, rather than assuming the development server has already proved everything.

Keep Private Values Out of the Repository

Put production credentials in the host's protected configuration. Keep local secret files out of version control, and use an .env.example file for variable names and harmless examples. If a secret has already entered Git history, removing the latest file does not remove the exposure; rotate the credential.

There is another trap: frontend environment variables can be compiled into public JavaScript. In Vite, client-exposed variables such as those prefixed with VITE_ must not contain private credentials. You can inspect browser-delivered files, so treat anything bundled into them as public.

Preserve the Last Working Version

I keep the previous deployment identifier beside the new commit. You also need its compatible configuration and a usable backup if the release changes stored data. Redeploying older code cannot automatically reverse a database migration or restore deleted records.

For this project, the recovery note identifies the earlier public version, the enquiry schema, and the person who can restore service. That small record makes the next stage of the website deployment process easier to review.

Compare Website Deployment Tools by What the Project Needs

The right website deployment tools depend on your runtime, update frequency, and operational responsibility. I would choose differently for a static brochure, a database-backed booking system, and a custom container. The convenient option is the one that fits the actual project.

Method Best fit Input you publish Trade-off to consider
File upload or drag and drop Small static sites Finished files or build directory Updates and version history may be manual
Git-connected hosting Frequently updated frontend projects Repository and build configuration Automatic releases need suitable checks
GitHub Pages Documentation and eligible static projects Repository or Actions artifact Static capability and usage restrictions
SFTP or hosting panel Traditional HTML or PHP hosting Files and server paths Partial uploads can leave mixed versions
Container or VPS Custom runtimes Image, ports, and service configuration You manage more infrastructure
Enter Pro Building, refining, and publishing in one workspace Requirements and generated application The business workflow still needs acceptance testing

You can compare website deployment tools using a practical question: where will a submitted enquiry go, and how will you inspect a failure? An attractive hosting dashboard is less useful if it cannot run your backend or expose the logs needed to diagnose it.

The image shows a Vercel deployment page

Figure 3. Vercel separates creating a deployment from verifying its preview and releasing it to production.

Move the Website from Git to a Public Preview

Once the build is ready, connect the source version to its hosted result. For a Git-based route, the commit SHA ties together the repository, build log, preview, and eventual release. I want that traceability before inviting someone else to review the website.

Connect the Project to a Traceable Git Revision

Review .gitignore, commit the intended files, and push them to your chosen repository. Connect that repository through the hosting platform's import workflow. Confirm the project root, especially if the repository contains several applications.

You should be able to identify which branch triggers production and which changes create previews. Vercel's current deployment environments documentation also notes that a new project's first deployment is production. Do not assume the first hosted URL is an isolated staging environment.

The image shows the

Figure 4. Vercel documents Local, Preview, and Production as distinct deployment environments.

Configure the Build Environment

Setting Example value What to confirm
Production branch main Only approved changes reach this branch
Install command npm ci A valid dependency lockfile exists
Build command npm run build The command succeeds on the host
Output directory dist It matches the generated artifact
Runtime Project's tested Node version Local and hosted builds agree
API configuration Environment-specific endpoint Preview does not accidentally use live data

For an SPA, configure appropriate route handling so /contact works when opened directly. Then distinguish valid application routes from missing addresses. A fallback to index.html can display a client-side 404 screen while still returning HTTP 200, which is different from a genuine server-side 404 response.

Test the Preview on an Independent Device

If you are learning how to deploy a website, this is the point to leave your development machine. Open the preview on another device or in a fresh browser session. Try a direct Contact-page visit, a refresh, an invalid email, and two quick presses of the submit button.

I also check the Console and Network panels for failed imports, asset 404s, and rejected API calls. A page can look correct because your browser has cached an older asset. An independent session helps expose that dependency.

The image, titled

Figure 5. Review the hosted preview before approving the production release.

Connect the Domain, DNS, and HTTPS

The hosting URL proves that the deployment is reachable at that address. Connecting your domain adds DNS, hostname routing, and certificate checks. Make those changes only after confirming the host's current instructions for your project.

Point the Correct Hostname to the Deployment

An A record points a hostname to an IPv4 address; AAAA uses IPv6; CNAME points to another hostname. Providers may handle apex domains differently, so avoid copying another project's records. Use the values supplied by your own host.

Cloudflare's custom-domain configuration illustrates an important detail: associate the domain with the Pages project before adding a standalone CNAME. The domain also needs application-level recognition, not just a DNS destination. I check both settings when an apparently correct record still fails.

The image shows the Cloudflare dashboard interface for custom domains configuration

Figure 6. Cloudflare shows the project-level steps for adding a custom domain to a Pages site.

Keep One Canonical HTTPS Address

Choose the intended apex or www address and redirect the other version consistently. Confirm that HTTP redirects to HTTPS and that the certificate covers the hostname visitors actually use. Check the whole redirect chain; conflicting application and platform rules can create loops.

You can also find mixed content in image URLs, scripts, fonts, or API requests. A valid certificate on the main page does not make an HTTP form endpoint secure. Test the actual resources used by the Contact page.

The image, titled

Figure 7. A public domain depends on working DNS and HTTPS configuration.

Test the Production Website Beyond Its Homepage

When I assess website deployment, I start with the visitor's main task. On our example, that is sending an enquiry. The production release needs to demonstrate what happens before submission, while waiting, after success, and after failure.

Verify Routes, Forms, and Error States

Check Expected behavior Failure worth investigating
Direct route visit Intended page loads Blank page or missing asset
Old contact address Correct permanent redirect Loop or wrong destination
Unknown address Useful missing-page response Misleading success response
Valid enquiry One saved request and clear feedback Duplicate record or silent failure
Invalid input Relevant explanation and retained values Generic error or erased form
Backend failure Recoverable error and safe retry Endless spinner or duplicate retry
Mobile navigation Usable touch and keyboard controls Hidden links or trapped focus

You should inspect the backend record as well as the success message. If analytics tracks enquiry completion, the event should follow verified success rather than a button click. Otherwise, failed attempts may appear as conversions.

The image, titled

Figure 8. Check routes, forms, mobile behavior, and search visibility on the live site.

Confirm Search Visibility

Review the title, meta description, canonical URL, sitemap, and indexing directives on the live domain. Preview settings can survive into production: a staging noindex, test-domain canonical, or outdated sitemap can affect discovery even when the website works for visitors.

I treat robots.txt and noindex as different controls. Blocking crawling can prevent a search engine from reading a page's noindex instruction. Inspect the intended behavior through the relevant search tools instead of assuming that a single robots rule handles every indexing requirement.

The image shows a webpage titled

Figure 9. Google Search Central explains what robots.txt can and cannot control.

Measure Performance and Accessibility

Google's Core Web Vitals guidance defines good thresholds of LCP ≤ 2.5 seconds, INP ≤ 200 milliseconds, and CLS ≤ 0.1. These thresholds are assessed at the 75th percentile of visits. A single laboratory run cannot establish how real visitors experience the site.

The image shows a webpage titled

Figure 10. Google’s Web Vitals documentation introduces Core Web Vitals; its sidebar identifies LCP, INP, and CLS.

For a new website, start with laboratory diagnostics and add field monitoring as traffic arrives. You should also test keyboard navigation, visible focus, form labels, contrast, zoom, and error announcements. I pay particular attention to whether a customer can find and correct an invalid email without losing the rest of the enquiry.

Diagnose Deployment Failures from the First Broken Layer

Troubleshooting how to deploy a website becomes easier when you identify the earliest failing layer. Check DNS, HTTPS, the server response, assets, and API requests in that order when the symptoms justify it. Random styling or code edits can obscure the original fault.

Symptom Evidence to inspect Likely direction
Domain will not resolve Authoritative DNS and resolver result Correct record or nameserver configuration
Certificate warning Certificate hostname and validity Complete the host's certificate setup
Blank page Console error and requested assets Fix base path or runtime error
Scripts return 404 Asset URL and output directory Publish the correct artifact
Contact API fails Response, endpoint, and server log Correct configuration or backend behavior
Form sends twice Request history and saved records Review handlers and deduplication
Old content persists Deployment ID and cache headers Check CDN or service-worker caching
Production returns 500 Application logs and release time Restore configuration or roll back

Roll Back or Fix Forward

I prioritize rollback when a release prevents enquiries, exposes data, or breaks a critical route. A contained text or spacing defect can usually wait for a reviewed fix. Preserve the failed deployment, logs, request identifiers, and reproduction steps before they disappear.

The image shows a webpage about

Figure 11. Vercel’s rollback documentation shows where a previous deployment can be restored.

Rollback is useful only if the earlier version still works with current configuration and stored data. You can restore traffic quickly while investigating, but the underlying migration or integration problem may need separate recovery. Record what changed and why the previous version is safe.

The image shows two cards labeled

Figure 12. Keep an identifiable previous release and recheck the task after recovery.

Deploy a Website for Free Without Ignoring the Limits

Search results for “deploy website for free” are a starting point; the project still needs to fit the provider's technical and usage rules. Free website deployment is useful for learning, eligible personal projects, and modest static workloads. It does not automatically include a paid domain, unrestricted backend usage, or production support.

Option Useful fit Limit or condition to check
GitHub Pages Eligible static documentation and personal projects Commercial-use restrictions and static-only hosting
Cloudflare Pages Static projects with supported platform services Build limits and separately metered services
Netlify Free Small projects within its credit allowance Current credits, usage categories, and hard limit
Vercel Hobby Personal, non-commercial projects Plan terms and resource allowances

GitHub's Pages usage limits restrict using it as free hosting for an online business or a site primarily facilitating commercial transactions. Its published-site limit is 1 GB. I would not choose it for our commercial example merely because the source is static.

The image shows the GitHub Pages limits page

Figure 13. GitHub Pages documents commercial-use restrictions and published-site limits.

Vercel likewise describes Hobby as personal and non-commercial. When comparing free website deployment, read the terms as well as the resource table. A home-service business may need a different plan even when its traffic is low.

The image shows the Hobby billing cycle and a comparison between Hobby and Pro plans

Figure 14. Vercel’s Hobby documentation states that the free plan is restricted to non-commercial personal use.

Netlify's current credit-based Free plan lists 300 credits per month with a hard limit. That makes resource consumption relevant to the decision, rather than just the headline monthly price. The phrase deploy website free should lead you to those usage conditions before you launch.

The image shows a webpage section about Netlify's pricing plans, focusing on the Free plan

Figure 15. Netlify’s current credit-based Free plan lists a 300-credit monthly allowance and hard usage limit.

Build and Deploy the Home-Service Website with Enter Pro

The manual route gives you direct control over the repository, host, and release configuration. If you also need to generate the site, refine its interface, and publish it, Enter Pro brings those tasks into one workspace. I use the same five-page requirements to judge the resulting application.

Convert the Requirements into a Structured Plan

Our input requested Home, Services, Pricing, About, and Contact, mobile navigation, page titles, a custom 404, and an enquiry form with four states. It also requested database storage and publication readiness. You can see that prompt beside the generated home-service design in the capture below.

The image shows a generated home-service website design

Figure 16. The supplied Enter Pro capture shows the home-service brief, generated preview, and Publish control. The red annotations are part of the supplied image.

Enter Pro test capture supplied by the author · 8 October 2026

A structured brief makes missing behavior easier to spot. I would review the proposed routes, field requirements, enquiry destination, and accessibility before accepting the plan. You can also specify which business claims are sample content, so generated prices, phone numbers, reviews, and guarantees do not accidentally become published facts.

Keep the service area and enquiry requirements concrete. You can specify a supported postcode range, the information needed for a quote, and whether a preferred date is merely a request. I would label that distinction in the interface so visitors cannot mistake an enquiry for a confirmed appointment.

Generate and Inspect the Working Result

The captured preview shows a home-service hero, navigation, contact information, and a quote CTA. That confirms a visible interface was generated. It does not establish that every route, saved enquiry, or error path passed testing; those conditions need separate checks.

Enter Pro supports application generation and refinement through its workspace. I would inspect the generated routes and form logic alongside the preview, then check a direct /contact visit. You can ask for a specific behavior change instead of repeatedly requesting that the entire website become “better.”

Make a Measurable Visual Editor Revision

The image shows the AI Visual Editor interface for building and customizing websites

Enter AI Visual Editor interface for building and customizing websites. From the Contact-page preview, I used Enter Pro’s Visual Editor to refine the enquiry form. My instruction focused on colours, text styling, spacing, and alignment, while asking Enter to preserve the existing fields and submission behaviour. I also requested clearer wording for the heading and submit button.

The image shows the Contact page of BrightNest Home Services' website

The original Contact form, with the “Request a free quote” heading, darker field labels, and “Send enquiry” button. The revised form uses teal for the heading and standard field labels. The heading now reads “Tell us what your home needs,” followed by a shorter supporting sentence. The button reads “Request my quote,” and the preferred-date field spans the form’s full width.

The image shows a form interface for the Home-Service website deployment

The revised Contact form, showing updated colours, text styling, heading, button wording, and a full-width date field. The desktop layout retains the enquiry form beside the contact-information panel. Red validation messages remain visible beneath the required fields, allowing readers to compare the visual changes in the same form.

The published capture shows name and email beside each other, optional phone and service fields, a date selector, and a message area. At a narrow viewport, I would inspect the same form at 375px and verify that its columns collapse without clipping labels or the submit action.

Connect Integrations and Test Their Real Behavior

The image shows a user interface related to deploying a website using Ent

A form needs an actual destination. After configuring the project's data connection, submit a uniquely identifiable test enquiry and look for the matching saved record. I would also repeat the test with invalid input, a rejected request, and a rapid second click.

If you add an analytics integration, record the successful enquiry once. Keep credentials in protected settings, and verify the production endpoint after publishing. A generated database instruction or attractive success message is not sufficient evidence that the integration completed its work.

Define the saved record before connecting it: enquiry ID, contact details, service, message, status, and creation time. Use a harmless test marker such as DEPLOY-CHECK to find one submission across the request, database, and notification. You can then distinguish a successful save from a separate notification failure without resubmitting the customer's enquiry.

Deploy, Connect the Domain, and Retain the Code

The second capture shows the Contact page at a prod.enter.pro address. Its enquiry fields are filled and the Send enquiry button is visible. I can confirm the page was open at the published address; the screenshot stops before a completed submission, so I would not report a saved lead from it.

The image shows the published contact page of BrightNest Home Services

Figure 18. The published Contact page has filled enquiry fields. This capture does not show a successful submission or saved lead.

Enter Pro test capture supplied by the author · 8 October 2026

You can use Enter Pro's publishing workflow and then repeat the production checks from the conventional route. If you connect a custom domain, verify DNS, HTTPS, redirects, and the enquiry flow there too. Exporting the source gives you an independent copy for backup, further development, or another hosting route.

For handover, I would keep the exported project with a short configuration inventory, release identifier, and recovery note. You should be able to identify required integrations without exposing their secret values. That makes the generated application easier to maintain after the initial publishing session.

Make Every Future Deployment Safer

Learning how to deploy a website pays off when the next release becomes repeatable. Keep the website deployment process tied to a known revision, the same acceptance conditions, and a clear recovery decision. That reduces uncertainty when another person updates the project.

Automate Repeatable Checks

Add build, lint, and meaningful tests to CI/CD where the project warrants them. For our example, a route smoke test and an enquiry test are more useful than checking only whether the homepage contains a heading. You should also decide which failed checks block production.

Monitor and Record Each Release

Record the deployment ID, commit, configuration changes, and acceptance results. Monitor failed requests, server errors, enquiry completion, and missing routes. I would investigate a sudden drop in saved enquiries even if uptime monitoring still reports a reachable homepage.

Final Check: The Website Is Live Only When Its Evidence Passes

You know how to deploy a website when you can identify the released build, open the intended address, complete the important task, and recover a working version. For the home-service site, the next decisive piece of evidence is a verified enquiry result. Keep that standard whether you publish manually or through Enter Pro.

When documenting how to deploy a website for a client, include the release record and the person responsible for recovery in the handover. You can use Enter Pro to build, refine, and deploy your website from one workspace. After publishing, test your important pages, check the live domain, and confirm that forms actually save customer enquiries. I would also verify mobile responsiveness, HTTPS, and the recovery process before considering the website ready for real visitors.

FAQs About Deploy Website

Can I Deploy a Website Without Buying a Domain?

Yes. Many hosts provide a public subdomain. You can use it for Enter Pro testing or an initial launch, then connect a purchased domain later. Check whether application redirects, cookies, and external integrations need updating when the hostname changes.

Does “Deploy Website for Free” Apply to a Client Business?

Before choosing a host from “deploy website for free” results for a client, confirm commercial-use permission. GitHub Pages and Vercel Hobby have restrictions relevant to business hosting. A free technical allowance does not override the provider's terms.

Does “Deploy Website Free” Include Email and a Custom Domain?

Usually, the query “deploy website free” refers to a hosting allowance. Domain registration, business email, paid APIs, and extra usage may be separate. Build a small cost list before promising a client a permanently free setup.

Which Website Deployment Tools Work Without Git?

Some website deployment tools accept file uploads, folders, or drag-and-drop input. Enter Pro also provides a workspace publishing route. For repeat updates, retain an identifiable source version and an independent backup even if Git is not part of your initial workflow.

Can I Build and Deploy a Website Using Enter Pro Without Coding?

Yes. Enter Pro lets you generate, customize, preview, and publish websites without coding. Its AI Visual Editor helps refine layouts and design elements.

Can I Connect a Custom Domain to a Website Deployed With Enter Pro?

Yes. Enter Pro supports custom domains. After publishing your website, configure DNS settings, enable HTTPS, and verify that your website works correctly.

Why Does a Route Work Locally but Fail After Refresh?

The production server may not recognize an SPA route, or the application may use an incorrect asset base path. Inspect the requested URL and response. Configure supported route handling while keeping the missing-page behavior accurate.

Do I Need to Redeploy After Changing an Environment Variable?

It depends on when the application reads that variable. Build-time values usually require a new build; server runtime configuration follows the host's rules. Check the affected deployment and confirm the new value without printing secrets.

Is Free Website Deployment Enough for a Database-Backed Application?

Free website deployment may cover only the frontend or a limited service allowance. Confirm the database, runtime, storage, connection, and request limits separately. Estimate the full workflow's usage before choosing the plan.

Does Rolling Back Code Restore the Database Too?

Usually, no. A code rollback restores an application version, while database recovery depends on backups and compatible migrations. Plan both before a release changes persistent data.