Publish a website
Publish puts your website online with one click. It uses your own Cloudflare account, so the site and its address are yours, and Cloudflare's free plan is enough. You set it up once, which takes about ten minutes, and after that publishing is one button.
What you need
- A design that is a website. If it isn't one yet, click Convert to website in the top bar (see Make a website).
- A free Cloudflare account.
- An API token from that account, and the account's ID. The steps below make both.
1. Make a Cloudflare account
Skip this if you have one.
- Go to dash.cloudflare.com/sign-up.
- Sign up with your email and a password, and confirm the email Cloudflare sends you.
- You don't need to add a domain or pick a paid plan. The free plan does everything Publish needs.
2. Make an API token
The token lets Make It Pretty publish to your account, and nothing more.
-
Go to dash.cloudflare.com/profile/api-tokens and click Create token.
-
At the bottom, next to Create Custom Token, click Get started.
-
Give it a name you'll recognize, such as
Make It Pretty. -
Under Permissions (or Policies), add:
Type Permission Access Needed for Account Cloudflare Pages Edit Publishing. Always needed. Zone DNS Edit Connecting your own domain. Optional. Zone Zone Read Connecting your own domain. Optional. The two Zone rows are only needed if you'll give a site your own address, such as
www.yourname.com, and that domain is in the same Cloudflare account. For the zones, choose All zones, or just the domain you'll use. -
Click Continue to summary, check it lists what you added, then click Create token.
-
Cloudflare shows the token once. Click Copy. Keep the page open until you've pasted it into Make It Pretty.
You can add the Zone permissions to an existing token later: on the API tokens page, open the token's ... menu, choose Edit, add the permissions, and click Update token. The token itself doesn't change, so you don't need to paste it again.
3. Find your account ID
- In the Cloudflare dashboard, open Workers & Pages from the left menu.
- The Account ID is on the right side of the page: 32 letters and digits. Click it to copy it.
4. Save them in Make It Pretty
- Open Settings > Publishing.
- Paste the token into API token.
- Paste the account ID into Account ID.
- Click Test and save. After a moment it says "It works, and it's saved. Publish is ready."
The token goes into your computer's keychain (Windows Credential Manager or the macOS Keychain), and Make It Pretty reads it only when you publish. Settings shows just its last four characters. Remove deletes it.
5. Publish
- Open your website design and click Publish in the top bar (or File > Publish site...).
- Under Cloudflare Pages project, choose where it goes:
- New project: type a name using lowercase letters, digits and dashes. The site will be at
https://<name>.pages.devif that address is free. - Existing project: pick one from your account. Make It Pretty remembers it, so next time you just click Publish.
- New project: type a name using lowercase letters, digits and dashes. The site will be at
- Click Publish. It builds the site, uploads only the files that changed, and makes it live.
- When it says It's live at, click Open to see your site, or Copy to share the address.
A new address can take a minute to answer. If you see an old version, refresh without the cache: Ctrl + F5 on Windows, Cmd + Shift + R on a Mac.
The dot on Publish
When you've changed the site since it was last published, a dot shows on Publish ("Changes not published yet"). Click Publish again to put the changes online.
6. Use your own domain
Your site always works at its pages.dev address. To have it answer at your own domain as well:
- Open the Site settings tab on the right, and type your address into Site address, for example
www.yourname.com. - Click Publish.
What happens next depends on where your domain is:
-
Your domain is in the same Cloudflare account (you bought it from Cloudflare, or moved its DNS there): Make It Pretty adds the domain to the project and creates the DNS record that points it at your site. The result says your domain "is almost ready". Cloudflare checks it and issues its security certificate, which usually takes a few minutes. Publish again later and it shows as live.
-
Your domain is somewhere else, such as GoDaddy or Namecheap: Make It Pretty adds the domain to the project and shows the one record to add at your domain company, with Copy buttons:
Type Name Target CNAME www.yourname.comyour-project.pages.devSign in at your domain company, open the DNS settings for your domain, and add that record. Then publish again to check.
Make It Pretty never changes a DNS record it didn't make. If your domain already has a record for that name, the result says so and shows the record to replace it with when you're ready.
A bare domain such as yourname.com (no www.) only works when its DNS is on Cloudflare. If your domain is elsewhere, use www.yourname.com, or move the domain's DNS to Cloudflare. Cloudflare's free plan includes DNS.
Take a site offline
- Click Publish, then Take site offline....
- Read what it will do, then click Take offline.
Cloudflare deletes the project with everything that was published, so its addresses stop working. Make It Pretty also removes the DNS record it made for your own domain. Your design and its site folder stay as they are, and you can publish again any time.
If something goes wrong
The message says what's wrong and what to do, and Open Settings takes you to the fix. The usual causes:
- The token is refused: it was mistyped, expired or deleted. Make a new one (step 2) and save it.
- The token can't publish: it's missing Account, Cloudflare Pages, Edit. Edit the token and add it.
- Wrong account: the account ID doesn't match the token's account. Copy it again from Workers & Pages.
- A name is taken: someone else's project already uses that
pages.devname. Pick another. - Your domain needs a record or isn't connected: see Use your own domain.