You can move an entire domain to a new home without touching a single line of server code. In this quick guide you’ll use Cloudflare’s DNS and Rules to send every visitor-along with their original path and query string-straight to your new site with a clean, SEO-friendly 301 redirect.

Best part? The change goes live in under five minutes, costs nothing extra, and you can roll it back instantly if you ever need to.

  1. Open your DNS records
  2. Add a placeholder A (or AAAA) record
  3. Open Cloudflare Rules
  4. Create a new redirect rule
  5. Pick the “redirect all traffic” template
  6. Name the rule and set a custom filter
  7. Deploy the 301 redirect

Step-by-step walkthrough

  1. Open DNS Records

    Navigate to the DNS section to manage your domain's records.

    Cloudflare dashboard sidebar with DNS button highlighted.
  2. Click Add record

    Tap the blue Add record button to open the form and create a new DNS entry. Use the IP address 192.0.2.1 for the A record. This address does not route traffic to an origin server but allows Cloudflare to apply rules, redirects, and Workers to incoming traffic. The equivalent IP address for an AAAA record is 100::.

    Cloudflare DNS page with Add record button near top right.
  3. Click Rules

    Click the Rules button in the left menu to open rule settings for your site.

    Left sidebar with Rules button highlighted.
  4. Click Create rule

    Click the Create rule button to start building a new redirect rule for your site.

    Screenshot shows the Create rule button on the Cloudflare rules overview page.
  5. Click Redirect Rule

    Choose Redirect Rule so you can set up a new redirect.

    List of rule types with Redirect Rule link highlighted.
  6. Pick redirect template

    Click the card to redirect every request to a new domain while keeping the path.

    Template card labeled 'Redirect to a different domain' is highlighted.
  7. Name the redirect rule

    Type a clear name like 'Redirect to different domain' so you can spot this rule later and choose 'Custom Filter Expression.'

    Input field labeled Rule name with placeholder text inside.
  8. Deploy the redirect rule

    Click Deploy. The rule now sends old-domain.com traffic to new-domain.com with a 301.

    The Deploy button on the redirect rule form.

Pro Tips

  • curl -I a test path to confirm the 301 before you go live.
  • Set TTL to 2 min on the placeholder record for instant rollbacks.
  • Keep the old domain on Cloudflare for 180 days to preserve SEO juice.
  • Export rule JSON so you can recreate it in another account fast.

FAQ

Will the redirect pass SEO authority to the new domain?
Yes. A 301 tells search engines the move is permanent, so PageRank and most link equity flow to the new domain.
Do I need a paid Cloudflare plan?
No. Single Redirect Rules are free; just point DNS to Cloudflare first.
How long does the redirect take to go live?
After you click Deploy it’s active at the edge, usually under 30 seconds worldwide.

That’s it-your entire domain now 301-redirects to the new home, preserving rankings and backlinks without a single server tweak. The rule lives at Cloudflare’s edge, so it’s fast, free, and you can edit or remove it anytime in under a minute.

Join the discussion

0 Comments

Leave a comment

Your email address will not be published.