DEV Community

Cover image for The step-by-step guide to create a domain redirect with Cloudflare
Hugo Di Francesco
Hugo Di Francesco

Posted on • Originally published at codewithhugo.com on

3 1

The step-by-step guide to create a domain redirect with Cloudflare

Be logged into your dashboard.

  1. Select the domain you want to redirect from
  2. Go to page rules

  3. Click “Create page rule”

  4. Enter your.domain/* (matches all traffic) for which URLs will have their traffic redirected

  5. Click “Add a Setting”

  6. Select “Forwarding URL”

  7. Select the type of redirect, I recommend 302s since they’re less aggressively cached (so if you ever want to use that domain to do something else other than redirect, you can)

  8. Enter your forwarding URL

  9. Click “Save and Deploy”

You’re done, you’ve just created a redirect from your domain to another one 🙂

Andrew Preble

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay