Cloudflare - Setup www DNS Record and Redirect
Here’s a quick note about setting up my www subdomain within Cloudflare.
After setting up the custom domain for Cloudflare Pages I wanted to make the www subdomain point to the root domain.
Nameservers
Because I have placed my domain with an external hoster, I first set up the CloudFlare name servers with the external hoster.
After CloudFlare took over the existing DNS records, I deleted the DNS records that still referred to the external hoster.
DNS
- Add a new CNAME record
- Enter
www
as theName
- Enter
fictionbecomesfact.com
as theTarget
- Leave
Proxy status
onProxied
andTTL
onAuto
- Click on
Save
Page Rule
- Enter as URL:
www.fictionbecomesfact.com/*
- Enter under
Settings
:Forwarding URL
302 - Temporary Redirect
https://fictionbecomesfact.com/$1
- Click on
Save and Deploy
I have chosen
302 - Temporary Redirect
. When in doubt problaby the best thing is to use 302. Although the www subdomain will always point to the root domain
Read other notes
Tags
Notes mentioning this note
- Obsidian - Setup a Digital Garden with GitHub and Cloudflare Pages
Here I describe my search for a static website generator.
Comments
No comments found for this note.
Join the discussion for this note on this ticket. Comments appear on this page instantly.