In this guide, you will get started with Cloudflare Pages, and deploy your first website to the Pages platform.
Connecting your GitHub account
Sign in to Cloudflare Pages
Connect to GitHub
Configuration and deployment
Selecting a GitHub repository
You can select a GitHub project from your personal account or an organization you have given Pages access to. This allows you to choose a GitHub repository to deploy using Pages. Both private and public repositories are supported.
Configuring your deployment
Once you have selected a repository, select Install & Authorize and Begin setup. You can then customize your deployment in the Set up builds and deployments page.
Your project name will be used to generate your project's hostname. By default, this matches your GitHub project name.
Production branch indicates the branch that Cloudflare Pages should use to deploy the production version of your site. For most projects, this is the
master branch. All other branches that are not your production branch will be used for .
Depending on the framework, tool, or project you are deploying to Cloudflare Pages, you will need to specify the site's build command and publish directory to tell Cloudflare Pages how to deploy your site.
Our deployment dashboard provides a number of presets, which are pre-filling values for many common deployment scenarios. If you are unsure what the correct values are for this section, refer to our documentation on .
Environment variables are a common way of providing configuration to your build workflow. While setting up your project, you can specify a number of key-value pairs as environment variables. These can be further customized once your project has finished building for the first time.
After you have chosen your Framework preset, configured Root directory (optional), and customized your Environment variables (optional), you are ready to deploy.
Your first deploy
Once you have finished setting your build configuration, select Save and Deploy. Your project build logs will output as Cloudflare Pages installs your project dependencies, builds the project, and deploys it to Cloudflare's global network.
When your project has finished deploying, you will receive a unique URL to view your deployed site.
Managing your site
After your first deploy, select Continue to project to see see your project's configuration in the Cloudflare Pages dashboard. On this page, you can see your project's current deployment status, the production URL and associated commit, and all past deployments.
Adding a custom domain
While every Cloudflare Pages site receives a custom subdomain during deployment, you may also wish to point custom domains (or subdomains) to your site. To do this, select the Custom domains section in your site dashboard.
Select Set up a domain, provide the domain that you would like to serve your Cloudflare Pages site on and select Continue. Depending on the domain, you will need to configure nameservers or add a custom CNAME record to point the domain to your Cloudflare Pages site.
Configure your nameservers to point to Cloudflare's name servers. If your nameservers are successfully pointed to Cloudflare, Cloudflare will proceed by creating a CNAME record for you.
Add a custom CNAME record
If you do not want to point your nameservers to Cloudflare, you can still use a custom CNAME record to use a single domain with Cloudflare Pages. You can configure your DNS settings in the DNS section of the Cloudflare dashboard.
Advanced project settings
In the Settings section, you can configure advanced settings, such as changing your project name, updating your GitHub configuration, or updating your build command or build directory.
You can use to manage access to your deployment previews. By default, these deployment URLs are public. Enabling the access policy will restrict viewing project deployments to your Cloudflare account.