NameSnag Pro

Advanced domain tools

Seo Strategy

A Guide to Cloudflare URL Redirects for SEO and Domain Flipping

March 12, 2026 24 min read
A Guide to Cloudflare URL Redirects for SEO and Domain Flipping

Juggling website redirects can feel like a high-stakes poker game, and frankly, most people play it poorly. Getting a Cloudflare URL redirect right is non-negotiable for site migrations, rebrands, or, let's be real, making a newly acquired domain actually pay for itself. This is your command center for pointing traffic where it needs to go, and screwing it up has real consequences.

Your Guide to Mastering Cloudflare Redirects

Let's be blunt: redirects are intimidating for a reason. One bad rule and you’re flushing visitors down a 404-shaped drain, vaporizing your SEO rankings, or leaving valuable link equity on the table. But for those who know what they're doing—especially domain investors and savvy SEOs—they're a fundamental tool for creating value out of thin air.

Think about it. You just snagged a high-value domain with a killer backlink profile, maybe from a list of recently dropped names or a promising expiring domain auction. What’s the first thing you do? You make sure every last drop of its existing traffic and SEO juice funnels directly to your main project. This is precisely where Cloudflare's redirect toolkit proves its worth.

This guide will cut through the noise and show you what actually works. We'll walk through Cloudflare's redirect methods, from the simple to the complex, so you know which tool to grab for the job. For a more focused look at a single use case, you can also see our guide on how to forward a domain with Cloudflare.

Choosing the Right Redirect Method

Before you even touch the dashboard, you need to match the tool to the task. Cloudflare gives you several ways to handle redirects, and picking the wrong one is a common way to create a mess.

This flowchart gives you a simple decision path based on what you’re trying to accomplish.

A flowchart guiding the decision process for choosing a URL redirect method based on complexity and scale.

The key takeaway here is that there's a specific solution for every scale, from a single forwarding rule to a massive, code-driven migration. Don't use a sledgehammer to crack a nut.

To help you decide at a glance, here’s a quick breakdown of your options.

Choosing Your Cloudflare Redirect Method

Method Best For Complexity Example Use Case
Redirect Rules Most modern redirect needs, from single URLs to path-based rules. Low Forwarding old-site.com/blog to new-site.com/articles.
Page Rules Simple, legacy redirects on older accounts or Free plans. Low Redirecting an entire domain like www.oldsite.com to newsite.com.
Bulk Redirects Migrating hundreds or thousands of URLs at once via a CSV list. Medium A large-scale website re-platforming project with a long list of URL changes.
Workers Complex, conditional redirects based on custom logic. High Redirecting users to different pages based on their country, device, or cookies.

Think of these as a toolkit. You wouldn't use the same wrench for every bolt, and you shouldn't use the same redirect method for every task.

We'll cover these four primary methods in this guide:

  • Redirect Rules: Your go-to, modern, and flexible tool. This is what you should be using for most day-to-day forwarding.
  • Page Rules: The old guard. Still kicking around and useful in a pinch, especially if you're on a plan with limited Redirect Rules.
  • Bulk Redirects: The workhorse for managing redirects at scale. Perfect for those massive site migrations where you have a spreadsheet with thousands of old-to-new URL mappings.
  • Cloudflare Workers: The ultimate escape hatch for custom logic. Need to redirect based on a user's country, device type, or an A/B test cookie? This is where you do it.

Mastering redirects isn't just a technical skill; it's a core business strategy. When you acquire a new domain, setting up the right redirects from day one ensures you capture all its existing traffic and link equity. You're immediately maximizing the value of your investment.

Getting Your Hands Dirty with Redirect Rules

When you need to forward a URL on Cloudflare, your first stop should almost always be Redirect Rules. Think of them as the modern, flexible engine for most of the day-to-day forwarding you'll ever need to do.

This is what you'll use for the basics, like forcing HTTPS everywhere or standardizing on a www (or non-www) domain. But let's get past the documentation examples and into how these rules actually make you money or save your bacon.

Why Dynamic Redirects Matter

Let’s talk about a real-world situation. You’ve been patiently watching the domain lists and you finally grab a gem. Maybe it's a premium name from a list of expiring domains that will be dropping soon, or you spotted a diamond in the rough among the freshly dropped available domains on NameSnag that you can register right now.

This old domain has history. It has dozens of blog posts with established traffic, all sitting under old-domain.com/blog/. The problem? Your new site organizes content under a new /articles/ path. If you just set up a basic redirect, every visitor from those old links gets dumped on your new homepage. It's a jarring experience for them and a signal to search engines that your content has simply vanished, tanking your SEO value.

This is precisely where a dynamic Redirect Rule becomes your best friend. You don't just point the old domain to the new one; you create a rule that intelligently captures the article slug from the old URL and rebuilds it on the new one.

  • A visitor goes to: old-domain.com/blog/my-awesome-post
  • They land on: your-site.com/articles/my-awesome-post

The user's journey is seamless. They found what they were looking for. More importantly, you've told search engines exactly where that specific piece of content now lives, preserving that hard-earned link equity.

A Lesson from Experience: Don't ever just redirect everything to the homepage. I've seen people do it, and it's a fast way to burn the value of an acquired domain. If you're running an e-commerce store or a blog with affiliate links, failing to preserve the full URL path and its query strings is like setting money on fire with every click.

Building Your First Rule

Let's walk through creating one. The Cloudflare interface looks a little intimidating at first, but once you get the logic, it's surprisingly simple.

First, you set the trigger under "When incoming requests match...". This is your "if" statement. You can match against the hostname, the full URL, or get fancy and match on things like cookies or the user's country.

Then, you define the "Then..." part, which for us is the "Redirect" action. This is where you tell Cloudflare where to send the traffic and what kind of redirect to use.

A Few Common Redirect Rule Setups

Scenario When Incoming Requests Match... Then Redirect to... Status Code
Force HTTPS URI equals http.request.full_uri https://your-domain.com 301 Permanent
www to apex Hostname equals www.your-domain.com https://your-domain.com 301 Permanent
Old to New Domain Hostname equals old-domain.com https://new-domain.com 301 Permanent
Dynamic Path URI Path starts with /blog/ Use a Dynamic Expression 301 Permanent

That "Dynamic Expression" is where the real power is. You'd use a function to tell Cloudflare, "Take whatever came after /blog/ on the old URL and stick it at the end of the new one."

This ability to build surgical forwarding rules is a core tactic for anyone serious about domain investing or SEO. What used to be a complicated mess of server configs is now a few clicks. You can forward traffic with placeholders that preserve the integrity of both the URL path and any query strings. For example, a rule can redirect http://smallshop.example.com/admin/?logged_out=true to https://globalstore.example.net/admin/?logged_out=true, keeping everything after the hostname perfectly intact. This is absolutely critical for capturing the full value of a domain and its backlink profile. If you want to see just how much this has changed the game, there are some great deep dives on domain management strategies on YouTube.

Managing a Whole Portfolio of Redirects

Okay, but what if you're not just redirecting one domain? What if you're managing a portfolio? Maybe you've picked up several domains to protect your brand or to funnel traffic from different niches.

You don't need a separate rule for every single one. That's a path to madness.

  1. Use the "is in" Operator: Instead of Hostname equals old-domain.com, you can build a list right in the rule: Hostname is in {"old-domain1.com", "old-domain2.com", "old-domain3.com"}.
  2. Set Your Destination: Point the target URL to your primary site, like https://my-main-brand.com.
  3. Preserve the Path (Don't Forget This!): Make sure you tick the "Preserve query string" option and set up the rule to append the rest of the path. This is what ensures a request for old-domain2.com/contact actually lands on my-main-brand.com/contact.

This approach keeps your rule list clean. Instead of a screen cluttered with dozens of repetitive rules, you have one clean, elegant rule handling the whole portfolio. It's about working smarter, not harder.

When to Use Legacy Page Rules for Redirects

Before Redirect Rules were the main event, Page Rules were the only game in town for setting up a Cloudflare URL redirect. They're the old guard. And while they might feel a bit like a relic, they absolutely still have their place. You'll stumble across them on older sites all the time, or if you're trying to squeeze every drop of value out of a free Cloudflare plan.

Let's be honest about what they're good for, where they suck, and when they are genuinely the right tool for the job.

A person points to a laptop displaying Cloudflare URL redirection settings for domain migration.

Think of a Page Rule as a Swiss Army knife. A Redirect Rule is more like a specialized Phillips head screwdriver—it does one job perfectly. A Page Rule, on the other hand, can set up a redirect, tweak the cache level, and crank up security settings all at once for a given URL pattern. This jack-of-all-trades nature is its main strength.

Of course, there's a big catch: the rule limit. On the free plan, you're capped at just three Page Rules. That scarcity forces you to be clever. If you just need a simple forward, a Redirect Rule is the smarter play since they're more abundant. But if you need to bundle that redirect with another setting, the Page Rule is your only option.

Simple Redirects with Page Rules

Let's say you just bought a great name from the list of available domains that have just dropped, but it's a bit of a mouthful, like www.my-cool-project-llc.com. You just want to push all traffic to your clean, primary domain, coolproject.com.

This is a textbook case for a Page Rule's "Forwarding URL" setting. You'd create a rule matching www.my-cool-project-llc.com/* and have it forward to https://coolproject.com/$1.

That * and $1 are doing all the heavy lifting here.

  • The asterisk (*) is a wildcard. It matches whatever path comes after the domain.
  • The $1 is a variable. It takes whatever the first wildcard (*) caught and inserts it into the destination URL.

This combo ensures a request for www.my-cool-project-llc.com/about-us actually goes to https://coolproject.com/about-us. Without it, every visitor, no matter what they were looking for, gets unceremoniously dumped on your homepage. A terrible user experience.

Understanding Page Rules isn't just about learning a legacy feature; it's about being able to troubleshoot older setups. When you acquire an expiring domain that was previously on Cloudflare, there's a good chance its redirects are handled by Page Rules. Knowing how they work will save you a ton of time trying to figure out why traffic is flowing in a certain way.

When to Migrate to Redirect Rules

So, when do you keep a Page Rule and when do you make the switch? Here’s a quick mental model I use.

  • Stick with a Page Rule if: You need to do more than just redirect. If you’re already using a Page Rule to set "Cache Level," "Security Level," or "Always Use HTTPS" on a specific URL pattern, just add the redirect to that existing rule. It saves you from burning a separate rule.

  • Migrate to a Redirect Rule if: Your only goal is to forward traffic. Redirect Rules are far more flexible, give you better matching options (like AND/OR logic), and you get more of them on your plan. Moving simple forwards frees up your precious Page Rule slots for the complex, multi-action jobs they were built for.

Ultimately, Page Rules might feel like a part of an older Cloudflare, but they are far from useless. They’re a critical tool for specific, bundled actions and a necessary piece of knowledge for anyone managing websites today. By understanding their unique role, you can build a much cleaner and more efficient redirect strategy.

Redirects at Scale: Bulk Redirects and Workers

Simple redirect rules get the job done for a while. But what happens when you’re staring down a spreadsheet with thousands of URLs after a site migration or a big domain acquisition? Suddenly, creating rules one-by-one feels like a surefire path to carpal tunnel. You need bigger tools.

This is where we get into the heavy machinery of Cloudflare redirects. We'll look at two features built for when things get serious: Bulk Redirects for managing massive lists and Cloudflare Workers for when you need to invent your own redirect logic from scratch.

Taming the Beast with Bulk Redirects

Imagine you just bought a portfolio of domains. Maybe you found a dozen great brandables in the available domains list on NameSnag and want to funnel their traffic to a single money site. Or maybe you're merging two e-commerce stores and now have 5,000 product URLs that all need a new home.

This is exactly what Bulk Redirects was built for. Instead of creating thousands of individual rules—a task that would drive anyone mad—you manage everything from a simple list.

The idea is brutally effective. You create a list of source URLs and their destination URLs, upload it, and turn it on. Cloudflare takes care of the rest, running those redirects at the edge with incredible speed. It turns a potential week-long headache into an afternoon task.

This feature was a huge sigh of relief for SEOs and domainers. When Cloudflare launched Bulk Redirects in December 2021, it solved a massive pain point for anyone hitting rule limits. Enterprise plans often start with a quota of 10,000 redirects across 25 lists, letting you preserve paths and query strings across huge numbers of URLs. This is a common, critical task when you learn more about how to flip domains and need to consolidate their SEO value. You can read more about it straight from the source on Cloudflare's blog.

Formatting Your Bulk Redirect List

The heart of the whole operation is the redirect list. While you can create a list manually in the dashboard, you’ll almost always be uploading a CSV file for any real work.

Your CSV only needs two columns to get started:

  • Source URL: The full original URL, including the protocol (http:// or https://).
  • Target URL: The full destination URL where you're sending the traffic.

You can also add optional columns for things like status codes (301, 302) and parameters for preserving query strings. The real beauty here is that you can manage this whole thing in Google Sheets or Excel, which makes it dead simple to collaborate with your team.

Pro Tip: Always, always keep a master spreadsheet as your "source of truth" for your redirect lists. Document why each redirect exists. Six months from now, when you're auditing the site, you will thank your past self for leaving notes.

The Ultimate Power Move with Cloudflare Workers

Okay, but what if you need something more clever? What if you want to send mobile users to one landing page and desktop users to another? Or maybe you need to redirect visitors from Europe to a GDPR-compliant version of your site. Standard redirect rules just can't handle that kind of logic.

This is where Cloudflare Workers come in. Think of Workers as tiny bits of JavaScript that run on Cloudflare's edge network, intercepting requests before they even touch your server. This gives you almost god-like control over your traffic. With just a few lines of code, you can create a Cloudflare URL redirect based on pretty much any condition you can dream up.

  • A/B Testing: Send 50% of traffic to a new landing page and 50% to the old one.
  • Device-Based Redirects: Sniff out whether the user is on a phone, tablet, or desktop and route them to an optimized page.
  • Geolocation Redirects: Send users to country-specific versions of your site (/en-us/, /en-gb/, etc.).
  • Cookie-Based Logic: Redirect logged-in users to their dashboard while sending new visitors to the marketing homepage.

Workers are the ultimate "get out of jail free" card for complex redirect scenarios. It requires a bit of coding, sure, but the flexibility is just unmatched.

A Simple Worker Script for Geo-Targeting

The idea of writing code might sound intimidating, but many common redirect tasks can be handled with simple scripts you can basically copy and paste.

Let's say you want to redirect all visitors from Germany (DE) to a specific German-language page on your site, https://your-site.com/de.

Here’s what a basic Worker script for that could look like:

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request))
})

async function handleRequest(request) {
  // Get the country code from the request headers
  const country = request.headers.get('cf-ipcountry')?.toUpperCase();

  // Define the target URL for Germany
  const germanUrl = 'https://your-site.com/de';

  // If the user is from Germany (DE), perform the redirect
  if (country === 'DE') {
    return Response.redirect(germanUrl, 302); // 302 for temporary, use 301 for permanent
  }

  // For all other visitors, fetch the original requested page
  return fetch(request);
}

This little script just checks the visitor's country. If it's Germany, it sends them to the /de page with a temporary 302 redirect. If not, the request continues on as normal. This is just a tiny taste of what's possible.

Workers represent the absolute pinnacle of control for your Cloudflare URL redirect strategy. While Bulk Redirects gives you scale, Workers give you intelligence. Mastering both means you can handle any traffic-routing challenge you'll ever face, no matter how big or how weird.

SEO Best Practices for Your Cloudflare Redirects

So you've got your Cloudflare URL redirect up and running. Good. But don't pop the champagne just yet. This is where you can either give your SEO a serious boost or accidentally send it off a cliff. Setting up a redirect isn't just a technical chore; it's a critical SEO move.

Hand holding tablet showing URL redirect table connecting 'old-domain.com/page1' to Cloudflare Workers.

Getting this right means that every ounce of value from the domains you're managing passes cleanly to your main site. It's the difference between a smart asset and a wasted one.

The Big 301 vs. 302 Debate

Let's cut through the noise on one of the most consistently misunderstood parts of SEO. The choice between a 301 and a 302 redirect boils down to one thing: the story you're telling search engines.

  • 301 (Permanent Redirect): This tells Google, "This page has moved for good. Update your records, and send all the link equity and ranking power over to the new URL."
  • 302 (Temporary Redirect): This is more like, "Hey, this page is just over here for a bit. I plan on moving it back, so keep the SEO value tied to the original address."

My simple rule of thumb: When in doubt, use a 301. I'd estimate that 99% of the time, you're making a permanent move. Using a 302 when you really mean permanent is a great way to tell Google not to pass along that hard-earned link equity, effectively flushing it down the drain.

Think of it like this: a 301 is filing a permanent change-of-address form. A 302 is leaving a sticky note on the door for the mailman saying you'll be back in an hour.

Stop SEO Bleeding with Redirect Chains and Loops

Two of the quickest ways to murder your site's performance are redirect chains and loops. These are the silent killers that chew through your crawl budget and tank your page speed.

A redirect chain is when URL A points to B, which then points to C. Each of these "hops" adds latency for the user and can dilute a small amount of ranking signal. It’s death by a thousand cuts.

A redirect loop is even more toxic. It's an infinite circle where A points to B, and B points back to A. This dead-ends in an error page for your visitor and confuses search engine crawlers.

You can hunt these down with most SEO audit tools, or you can get your hands dirty by inspecting the network headers in your browser's developer tools. Auditing your redirects regularly isn't just good practice; it's non-negotiable, especially as your portfolio of domains grows.

Always Preserve Your Query Strings

Ever see that mess of text at the end of a URL like ?utm_source=newsletter? Those are query strings, and for anyone doing marketing or analytics, they're pure gold. They tell you where your traffic is coming from.

When you're setting up a redirect in Cloudflare, you'll almost always see an option to "Preserve query string." You want to tick this box. If you don't, a link like old-domain.com/product?utm_source=facebook will just redirect to new-domain.com/product.

Poof. You just lost the data telling you that click came from your Facebook campaign. By preserving the query string, you ensure the final URL is new-domain.com/product?utm_source=facebook, keeping your analytics data clean and your campaign tracking intact.

While getting Cloudflare redirects right is a huge piece of the puzzle, a truly healthy site requires a broader view. It's always a good idea to learn how to optimize website performance from all angles. And if you're curious about other ways to handle this, you can also read about how to implement a 301 redirect with .htaccess to see how it compares.

Troubleshooting Common Redirect Problems

So you've set up what you thought was the perfect Cloudflare URL redirect, clicked save, and... nothing. The redirect isn’t working. Before you start tearing your hair out or filing a bug report, let's walk through the usual suspects. Most of the time, the fix is something embarrassingly simple.

The first and most common culprit is your own browser. Browsers are aggressive about caching redirects to speed things up, which is great until it's not. This means you might just be seeing an old, cached version of reality. The first thing you should always do is test your new redirect in a private or incognito window. If it works there, you have your answer: clear your browser cache.

If it's not the cache, it's almost certainly a simple syntax error or a slight misunderstanding of how the rule expressions work. A missing forward slash, a misplaced wildcard, or picking the wrong field for your hostname can all cause a rule to fail silently. Go back and stare at your rule logic for a minute. Does the "When incoming requests match..." field really capture the URL you think it does?

When the Simple Fixes Don't Fix It

Alright, so it's not caching and you've checked the syntax three times. Now it's time to think about the order of operations. Cloudflare doesn't just look at your new rule in a vacuum; it executes rules in a very specific sequence. It's entirely possible a Page Rule is firing before your new Redirect Rule, or another Redirect Rule with a higher priority is snatching the traffic first.

Go look at your rule lists. See any potential fights? For example, a broad rule redirecting your-domain.com/* will always trigger before a more specific one for your-domain.com/special-page. You can literally drag and drop rules to change their order. Make sure your most specific rules get looked at first.

Here’s a quick mental checklist I run through when things get weird:

  • Is the DNS record actually proxied? Redirects only work on traffic going through Cloudflare. Look for the little orange cloud icon. If it’s grey, none of this will work.
  • Did you wait 30 seconds? Changes are usually instant, but sometimes you just need to take a breath and let the change propagate across the edge network.
  • Are there conflicting rules somewhere else? Don't just check Redirect Rules. Dig into your Page Rules and even your Workers. Something else could be overriding your intent.
  • Is the domain even active on Cloudflare? It sounds basic, but make sure your nameservers are still pointing to Cloudflare. It happens.

Keeping a Lid on Redirect Chaos

As your portfolio of domains grows—maybe you've been snapping up promising expiring domains—your redirect list will get messy. Fast. This is where the real challenge begins. The biggest problem with Cloudflare redirects at scale isn't a technical limit, but simple human oversight.

You can create huge lists with Bulk Redirects, but the real ceiling is your own ability to manage them. Given that a reported 94% of login attempts are from bots, keeping a tight ship on your redirects is more than just good housekeeping; it's a security measure. You can read more about what happens when a redirect strategy goes wrong.

A good redirect strategy is like tending a garden. You can’t just plant it and walk away. You have to periodically audit your rules, prune the dead ones that point to 404s, and make sure your naming conventions are clear enough that you’ll understand them a year from now.

Adopting a system of regular audits and clear naming conventions is the only way to avoid building a tangled mess of redirect chains that kill your site speed and torpedo your SEO. This bit of proactive work turns redirect management from a frustrating chore into a scalable part of your strategy.

Frequently Asked Questions

Man troubleshooting a broken link using a magnifying glass while reviewing a checklist with DNS, Cache, and Rules.

Let's tackle some of the most common questions that pop up when you're wrestling with a Cloudflare URL redirect. I've run into these myself plenty of times, so here are the straight answers.

How Long Does a Cloudflare Redirect Take to Work?

This is the number one question, and the answer is one of the best things about Cloudflare: redirects are almost instant. Because they're handled at the edge, you're looking at a propagation time of 30 seconds or less across their global network. It’s incredibly fast.

So, if you've set up a rule and it's not working, the culprit is almost always your own browser's cache. Your browser is stubbornly holding on to the old, non-redirected version of the page.

Pro Tip: Always test your new redirect rules in an incognito or private browser window. This gives you a clean slate and shows you what's actually happening on the live network, not what your cache remembers.

Can I Redirect a Domain Without Using Cloudflare Nameservers?

In a word, no. For any of Cloudflare's magic to work—whether it's Redirect Rules, Page Rules, or Workers—your domain's nameservers absolutely must point to Cloudflare.

Think of it this way: the redirect happens as traffic passes through Cloudflare's network. If your DNS isn't sending traffic to them in the first place, your rules will just sit there, completely unseen and untriggered.

What Is the Difference Between a 301 and 302 Redirect?

This one is crucial for SEO, so it's important to get it right.

  • A 301 redirect is a "Permanent Move." This should be your default choice. Use it when you're permanently moving a page, migrating to a new domain, or consolidating content. It tells search engines to transfer all the link equity and ranking power to the new URL.

  • A 302 redirect is a "Temporary Move." Only use this if you genuinely plan on bringing the old URL back. Good examples are redirecting users during short-term site maintenance or running an A/B test where the original page will be restored later.

Using a 302 by mistake can hamstring your SEO efforts, as search engines won't pass along the authority to the new page. When in doubt, use a 301.


Finding the right domain to redirect is the first step. NameSnag helps you discover high-value available domains you can register right now or find promising expiring domains before they hit the open market.

Find Your Perfect Domain

Get access to thousands of high-value expired domains with our AI-powered search.

Start Free Trial
NameSnag
Written by the NameSnag Team · Building tools for domain investors · @name_snag

Related Articles