
Custom Domain Name For Cloudflare Pages
Connect your own domain to your Cloudflare Pages site with this simple step-by-step guide. Make your project more professional and memorable with a custom domain in just minutes.
Published on:Why Custom Domains Are Essential for Cloudflare Pages Sites
Adding a custom domain to your Cloudflare Pages site takes your project to the next level. Instead of using the default .pages.dev
subdomain, visitors can access your site through a professional, branded URL that matches your business or project name. When you connect a custom domain through Cloudflare, you also benefit from their DDOS protection and global CDN network, ensuring your site loads quickly for visitors anywhere in the world.
5 Key Benefits of Using a Custom Domain for Your Website
-
Brand consistency: Reinforce your brand identity across all digital touchpoints
-
Improved credibility: Professional domains build trust with visitors and customers
-
Better SEO: Custom domains typically perform better in search engine rankings
-
Memorability: Visitors can easily remember and return to your site
-
Marketing simplicity: Cleaner URLs are easier to share in marketing materials
What You’ll Need Before Setting Up Your Custom Domain
- A site already deployed to Cloudflare Pages. If you haven’t done this yet, check out our deploying an astro site to cloudflare pages guide below.
- A domain registered with Cloudflare. You can register one here if needed.

Deploy Your AstroJS Site To Cloudflare Pages
Learn how to deploy your AstroJS site to Cloudflare Pages.
If your domain is registered with another provider, you’ll need to either transfer it to Cloudflare or point your domain’s nameservers to Cloudflare. This process varies by registrar but typically involves updating DNS settings in your domain registrar’s dashboard.
Limited Time Launch Sale
Skip the setup hassle with our AstroJS starter template that includes pre-configured Cloudflare deployment settings. Save hours of configuration time and get your custom domain running in minutes!
GET 60% OFF!Step-by-Step Guide: Connecting a Custom Domain to Cloudflare Pages
1. Accessing Your Cloudflare Dashboard
- Navigate to the Cloudflare dashboard and select the Workers & Pages tab from the sidebar menu.

2. Locating Your Pages Project
- Find and select your page deployment from the list of projects. Once on the project page, click the Custom Domains tab in the top navigation bar.

3. Setting Up Your Custom Domain
- In the custom domains section, click the “Set up a custom domain” button. Type your domain name in the input field (e.g.,
yourdomain.com
) and click Continue.

4. Verifying Domain Eligibility
- Cloudflare will verify that the domain is eligible for connection. Review that the domain is correct and click Activate Domain to proceed.

5. Confirming DNS Record Creation
- In the final confirmation dialog, click the Add button to confirm and create the necessary DNS records.

The system will show a confirmation screen afterward. While activation can take up to 48 hours to fully propagate across the internet, most domains are ready within minutes.
Ensure .pages.dev is rerouted to your custom domain
If you want .pages.dev to redirect to your custom domain, check out our guide below.

Cloudflare Pages Redirect .pages.dev to Your Domain
Learn how to redirect .pages.dev to your domain with this step-by-step guide
Troubleshooting Common Custom Domain Issues
- DNS propagation delays - DNS changes can take time to propagate globally. Wait at least 30 minutes before troubleshooting further.
- HTTPS certificate problems - Cloudflare automatically provisions SSL certificates for your domain. This process usually takes 5-15 minutes.
- Conflicting DNS records - If you have existing records for the same domain, they might conflict. Review your DNS settings in the Cloudflare dashboard.
- Domain verification failures - Ensure your domain is properly verified if you’re using a domain from another registrar.
Advanced Domain Configuration Options for Cloudflare Pages
- Subdomain routing - Direct different subdomains to specific projects
- Apex domain and www - Configure both the root domain and www subdomain
- Custom SSL certificates - Upload your own certificates if needed
- Page rules - Create custom redirection or caching rules
Your site is now accessible through your custom domain! This small change makes your project look more professional and easier for visitors to remember. For more ways to enhance your site, browse our other guides on optimizing Cloudflare Pages performance and security features.
Related Articles

How To Create A Secure Staging Environment For Cloudflare Pages
Testing website changes before they go live is essential for maintaining a professional online presence. Learn how to create a secure, password-protected staging environment for your Cloudflare Pages site.

How To Redirect .pages.dev to Your Domain
Learn how to redirect .pages.dev to your domain with this step-by-step guide

Schedule Cloudflare Pages Builds
Schedule your Cloudflare Pages builds to run at specific times. No external services needed.

Fix Bad Indentation Of A Mapping Entry Error In Astro
Troubleshoot and resolve the common "bad indentation of a mapping entry" error in AstroJS with this practical guide.