We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content
Cloudflare Pages custom domain setup showing a website with personalized URL
Home Blog Cloudflare

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:
Clock Time to complete: 10 minutes

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.

  • Check Circle

    Brand consistency: Reinforce your brand identity across all digital touchpoints

  • Check Circle

    Improved credibility: Professional domains build trust with visitors and customers

  • Check Circle

    Better SEO: Custom domains typically perform better in search engine rankings

  • Check Circle

    Memorability: Visitors can easily remember and return to your site

  • Check Circle

    Marketing simplicity: Cleaner URLs are easier to share in marketing materials

  • 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 illustration showing code editor with type hints

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!
  1. Navigate to the Cloudflare dashboard and select the Workers & Pages tab from the sidebar menu.
Cloudflare homepage showing the Workers & Pages navigation option in the sidebar
  1. 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.
Cloudflare workers page with the Custom Domains tab highlighted
  1. 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.
Cloudflare custom domains setup screen with domain input field
  1. Cloudflare will verify that the domain is eligible for connection. Review that the domain is correct and click Activate Domain to proceed.
Cloudflare add DNS record confirmation screen
  1. In the final confirmation dialog, click the Add button to confirm and create the necessary DNS records.
Cloudflare DNS record final confirmation dialog

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.

If you want .pages.dev to redirect to your custom domain, check out our guide below.

Cloudflare Pages Redirect .pages.dev to Your Domain illustration

Cloudflare Pages Redirect .pages.dev to Your Domain

Learn how to redirect .pages.dev to your domain with this step-by-step guide

  • 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.
  • 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

Read more Cloudflare articles
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes