GitHub Pages
Official site for this host. Start here, then follow the steps below.
Free: Free for public repos. Site up to 1 GB, soft limit of 100 GB bandwidth/month and 10 builds/hour.
Visit GitHub Pages4 step-by-step guides to publish a site from GitHub: sign in, connect the repository, deploy, add environment variables and a custom domain. Each guide has its own colour. Dashboards and free limits change often, so check each provider before you rely on it.
Best for static sites: plain HTML, or a framework that builds to static files. Not allowed for running a shop or paid SaaS.
Official site for this host. Start here, then follow the steps below.
Free: Free for public repos. Site up to 1 GB, soft limit of 100 GB bandwidth/month and 10 builds/hour.
Visit GitHub PagesLog in at github.com, or create a free account.
Open GitHub loginMake a new repository and upload your files. For plain HTML, put index.html in the root of the repo.
New repositoryIn the repository, go to Settings, then Pages in the left menu.
Under Build and deployment, set Source to "Deploy from a branch", pick your branch (usually main) and the folder (root or /docs), then Save. For a framework that needs a build, choose "GitHub Actions" instead.
Your site goes live at https://USERNAME.github.io/REPO/ after a minute or two. A repository named USERNAME.github.io is served at the root address.
GitHub Pages is static and has no server-side environment variables. For build-time values, add them under Settings, Secrets and variables, Actions, and read them in a GitHub Actions workflow. Anything that ends up in your built files is public.
In Settings, Pages, enter your domain under Custom domain and Save. At your DNS provider, add a CNAME record for www pointing to USERNAME.github.io, and for the root domain add A records to 185.199.108.153, 185.199.109.153, 185.199.110.153 and 185.199.111.153. Then tick Enforce HTTPS once it is available.
GitHub custom domain docsGood for static sites and frameworks, with preview deploys on every branch. Cloudflare now also promotes Workers for new projects, and button labels can change, so follow the Pages option if you see both.
Official site for this host. Start here, then follow the steps below.
Free: Free plan: 500 builds/month, 20,000 files per site, 25 MiB max file size, 100 custom domains and 100 projects.
Visit Cloudflare PagesLog in at dash.cloudflare.com, or sign up for a free account.
Open Cloudflare dashboardIn the left menu, open Workers & Pages, then choose Create application and look for the Pages option (Import an existing Git repository).
Choose Connect GitHub, sign in, and let the Cloudflare app access all repositories or only selected ones.
Pick the repo to publish and choose Begin setup.
Give the project a name, choose the production branch, then set the framework preset, build command (for example npm run build) and output directory (for example dist). For plain HTML, leave the build command empty and use / as the output directory.
Open the variables section before you deploy, or later under the project Settings, Variables and Secrets (or Environment variables). You can set different values for Production and Preview. Redeploy after changing them.
Choose Save and Deploy. The site goes live at https://PROJECT.pages.dev.
Open the project, then Custom domains, then Set up a custom domain. If the domain uses Cloudflare DNS, the record is added for you. Otherwise add a CNAME to PROJECT.pages.dev at your DNS provider.
Cloudflare Pages docsGood for static sites and frameworks, with deploy previews, forms and serverless functions.
Official site for this host. Start here, then follow the steps below.
Free: Free plan: 300 credits/month with a hard limit (about 15 GB bandwidth or 20 production deploys), 1 concurrent build.
Visit NetlifyGo to app.netlify.com and sign in with GitHub for the simplest setup.
Open Netlify appChoose Add new project, then Import an existing project.
Choose Deploy with GitHub, authorize Netlify, and give it access to your repositories.
Pick the repo and the branch to deploy.
Check the build command and publish directory. Netlify detects most frameworks. For plain HTML, leave the build command empty and publish the root directory.
Open the advanced section to add variables before the first deploy, or later under Project configuration, Environment variables. Redeploy after changing them.
Choose Deploy. The site goes live at https://SITE-NAME.netlify.app. You can rename it under Project configuration, Domain management.
Under Domain management, choose Add a domain and follow the DNS steps: either switch to Netlify DNS, or add a CNAME for www pointing to SITE-NAME.netlify.app. HTTPS certificates are issued automatically.
Netlify docsBest for Next.js and other frameworks, with preview URLs for every pull request. The free Hobby plan is for personal, non-commercial use, so check Vercel's terms if your site earns money.
Official site for this host. Start here, then follow the steps below.
Free: Hobby plan: 100 GB fast data transfer, 1M CDN requests, 1M function invocations per month, 100 deployments/day, 50 domains per project.
Visit VercelGo to vercel.com/signup and choose Continue with GitHub.
Open Vercel signupOn the dashboard, choose Add New, then Project.
Under Import Git Repository, install the Vercel app on GitHub if asked, choose all or selected repositories, then Import next to your repo.
Vercel detects the framework. Check the root directory, build command and output directory, and change them only if needed.
Expand Environment Variables, add each key and value, and pick which environments they apply to (Production, Preview, Development). Later, edit them under Settings, Environment Variables, then redeploy.
Choose Deploy. The site goes live at https://PROJECT.vercel.app.
Open the project, then Settings, Domains, and add your domain. Vercel shows the exact DNS records to add, usually an A record for the root domain and a CNAME for www.
Vercel docs