Domain Name Redirect – Namecheap + Cloudflare

Example for HowdyTees.com redirecting to TeePublic site.

Final setup (see Start here, below, for step-by-step)

Namecheap

  • Continues to own/register howdytees.com
  • Nameservers now point to Cloudflare
  • Namecheap’s old URL Redirect is no longer doing the forwarding

Cloudflare domain and DNS

  • Free plan
  • DNS handles @ and www (DNS A record)
  • Both point to 192.0.2.1 (DNS A record)
  • Both are 🟠 Proxied (DNS A record)
  • HTTPS is handled by Cloudflare
  • Active 302 Redirect Rule

Cloudflare redirect rule summary that Cloudflare has the exact configuration we intended:

  • Status: Active
  • Rule: HowdyTees → TeePublic
  • Match: http*://*howdytees.com/*
  • Action: 302 redirect

Cloudflare – Add Domain

Add domain name. Select free plan. Acquire Name Server (NS) records to add to domain name DNS on Namecheap.

Overview:

  • Add the domain to Cloudflare.
  • Create a proxied DNS record using 192.0.2.1.
  • Create a redirect rule to the destination.
  1. Cloudflare dashboard > Domains > Overview > click Add Domain button
  2. Under Add a site, choose Connect a domain
  3. Select a plan for howdytees.com: Choose Free plan
  4. Click Continue to activiation
  5. Change the proxied DNS record IP address to 192.0.2.1. for howdytees.com A record
  6. Change the proxied DNS record IP address to 192.0.2.1. for www.howdytees.com A record
  7. Note the Name Server (NS) records:
  • fiona.ns.cloudflare.com
  • mitch.ns.cloudflare.com

Namecheap – Add Name Server records

  1. Copy the Cloudflare Name Server (NS) records to: Namecheap > Domain > Nameservers > Custom DNS:
  • fiona.ns.cloudflare.com
  • mitch.ns.cloudflare.com

Cloudflare – Add Redirect Rule

  1. Cloudflare dashboard > Domains > Overview > click Domain name
  2. Rules (in left-hand menu) > Overview > Redirect to a new URL: Click Create from template
  3. Create new Single Redirect: add a Name: HowdyTees → https://www.teepublic.com/user/reidwalley/albums/179203-howdy-tees
  4. If incoming requests match…: choose Wildcard pattern
  5. Request URL: http*://*howdytees.com/* (By using the asterisk (*) character to create a pattern that can match many requests e.g. https://*.example.com/files/*)
  6. Target URL: https://www.teepublic.com/user/reidwalley/albums/179203-howdy-tees
  7. Status code: 302 – Temporary redirect
  8. Preserve query string: Off

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *