cloudflare-pages.md (2025B)
1 --- 2 order: 1900 3 label: Cloudflare Pages 4 icon: /media/cloudflare.svg 5 tags: guides 6 --- 7 8 # Setting up Cloudflare Pages with an is-a.dev subdomain 9 10 This guide will walk you through the process of setting up a Cloudflare Pages website and pointing your is-a.dev subdomain towards it. 11 12 ## Create a Cloudflare Pages Website 13 14 First, you'll need to create a website on Cloudflare Pages. Follow the instructions in the [Cloudflare Pages Getting Started Guide](https://developers.cloudflare.com/pages/get-started/guide/). 15 16 ### Point your subdomain to your Cloudflare Pages site 17 18 Next, you'll need to point your is-a.dev subdomain to your Cloudflare Pages website. Follow the instructions in the [Cloudflare Pages Custom Domains Guide](https://developers.cloudflare.com/pages/platform/custom-domains/#add-a-custom-domain). Only follow the "Add a custom domain" section, and then return to this guide for the next steps. 19 20 ### Create the Domain File 21 22 In the `domains` directory, create a new JSON file for your subdomain (`domains/subdomain.json`) and submit a pull request. This file should contain the following: 23 24 ```json 25 { 26 "owner": { 27 "username": "your-github-username" 28 }, 29 "records": { 30 "CNAME": "your-sitename.pages.dev" 31 } 32 } 33 ``` 34 35 ### Adding the domain to Cloudflare Pages 36 37 Once your pull request has been merged (or while you're waiting if you want to get over with it), you should add your domain. Before, you could easily do it from the dashboard, but now you can't, due to us being in the [Public Suffix List](https://github.com/publicsuffix/list). Because of this, we have to use Cloudflare's API. There are 2 ways: you can either do it the manual way (like using cURL) like [this](https://developers.cloudflare.com/api/resources/pages/subresources/projects/subresources/domains/methods/create), or you can use our GUI [that we made](https://cf-pages.is-a.dev) to make it easier. 38 39 If you have followed all the steps correctly, then your website should be live after your pull request has been merged.