Skip to content

Cloudflare www dns record and redirect setup

Introduction

Now my digital garden is running with a custom domain I wanted to make the www subdomain point to the root domain.

How To

Nameservers

My domain is not registrered by Cloudflare but by another external hoster so I used the Cloudflare name servers. After Cloudflare took over the DNS records, I deleted the DNS records that still referred to the external hoster.

Cloudflare DNS

  1. Add a new CNAME record
    • Go to DNS and Records and click Add record
    • Enter CNAME as Type
    • Enter www as the Name
    • Enter fictionbecomesfact.com as the Target
    • Leave Proxy status on Proxied and TTL on Auto
  2. Click on Save

Cloudflare Page Rule

  1. Add a new page rule
    • Go to Rules and Page Rules and click Create Page Rule
    • Enter your URL www.fictionbecomesfact.com/*
    • Enter these Settings:
      • Forwarding URL
      • 302 - Temporary Redirect
      • https://fictionbecomesfact.com/$1
  2. Click on Save and Deploy Page Rule

Favorites

Comments

    No comments found for this note.

    Join the discussion for this note on Github. Comments appear on this page instantly.

    Copyright 2021- Fiction Becomes Fact