How to Add Your Website on Pages.dev

Pages.dev is a web hosting platform offered by Cloudflare, providing developers with an efficient, serverless environment for deploying static websites. This guide walks you through the step-by-step process of adding your website to Pages.dev, ensuring a smooth setup from start to finish. By the end, your site will be live and ready to serve visitors.




1. Sign Up or Log In to Cloudflare



  • Go to Cloudflare and sign up or log in to your account. Cloudflare Pages is a feature provided by Cloudflare, so you'll need an account to access it.


2. Access Cloudflare Pages



  • Once logged in, navigate to the Pages section from the dashboard. You can find it in the main menu on the left side under Developer Tools.


3. Create a New Project



  • Click on Create a project. This will prompt you to link a GitHub repository where your website's code is stored.

  • Choose Connect to GitHub and grant the necessary permissions for Cloudflare to access your repositories.


4. Select Your Repository



  • After connecting your GitHub account, choose the repository you want to deploy on Pages.dev. Cloudflare Pages will use this repository as the source for your website.


5. Configure Build Settings



  • In the build configuration settings, specify the build command and output directory (e.g., npm run build for a Node.js site). The output directory usually matches the build folder, such as dist or public, depending on your framework.

  • Review any other settings or environment variables you might need for your site to build correctly.


6. Deploy Your Site



  • Click Save and Deploy to start the initial deployment process. Cloudflare will automatically build and deploy your website using the settings provided.

  • Once deployed, you’ll receive a unique Pages.dev URL where you can view your site (e.g., your-project.pages.dev).


7. Set a Custom Domain (Optional)



  • If you have a custom domain and want to use it, go to the Custom Domains section in your Cloudflare Pages settings.

  • Add your domain, and follow the instructions to configure DNS records to point to your Pages.dev project.


8. Review and Publish Updates



  • With the GitHub integration, any future updates pushed to your repository will trigger a new build and deploy automatically on Pages.dev.


By following these steps, you can easily set up and deploy your website on Cloudflare's Pages.dev platform.





Leave a Reply

Your email address will not be published. Required fields are marked *